From c230fa99196394f89f545a3a775f72fa9fea83ad Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Wed, 24 Jul 2024 09:30:12 -0400 Subject: [PATCH 1/4] mods to RRTMGP for MT configs --- src/physics/rrtmgp/radiation.F90 | 11 ++++++++++- src/physics/rrtmgp/rrtmgp_inputs.F90 | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/physics/rrtmgp/radiation.F90 b/src/physics/rrtmgp/radiation.F90 index 18488bedb7..ca81be4326 100644 --- a/src/physics/rrtmgp/radiation.F90 +++ b/src/physics/rrtmgp/radiation.F90 @@ -453,6 +453,7 @@ subroutine radiation_init(pbuf2d) ! pressure interfaces below 1 Pa. When the entire model atmosphere is ! below 1 Pa then an extra layer is added to the top of the model for ! the purpose of the radiation calculation. + nlay = count( pref_edge(:) > 1._r8 ) ! pascals (0.01 mbar) if (nlay == pverp) then @@ -461,6 +462,14 @@ subroutine radiation_init(pbuf2d) ktopcam = 1 ktoprad = 2 nlaycam = pver + else if (nlay == (pverp-1)) then + ! Special case nlay == (pverp-1) -- topmost interface outside bounds (CAM MT config), treat as if it is ok. + ktopcam = 1 + ktoprad = 2 + nlaycam = pver + nlay = nlay+1 ! reassign the value so later code understands to treat this case like nlay==pverp + write(iulog,*) 'RADIATION_INIT: Special case of 1 model interface at p < 1Pa. Top layer will be INCLUDED in radiation calculation.' + write(iulog,*) 'RADIATION_INIT: nlay = ',nlay, ' same as pverp: ',nlay==pverp else ! nlay < pverp. nlay layers are used in radiation calcs, and they are ! all CAM layers. @@ -468,7 +477,7 @@ subroutine radiation_init(pbuf2d) ktoprad = 1 nlaycam = nlay end if - + ! Create lowercase version of the gaslist for RRTMGP. The ty_gas_concs objects ! work with CAM's uppercase names, but other objects that get input from the gas ! concs objects don't work. diff --git a/src/physics/rrtmgp/rrtmgp_inputs.F90 b/src/physics/rrtmgp/rrtmgp_inputs.F90 index 2f2b125e09..4f73ae9029 100644 --- a/src/physics/rrtmgp/rrtmgp_inputs.F90 +++ b/src/physics/rrtmgp/rrtmgp_inputs.F90 @@ -150,11 +150,20 @@ subroutine rrtmgp_set_state( & ! Add extra layer values if needed. if (nlay == pverp) then - t_rad(:,1) = state%t(:ncol,1) - pmid_rad(:,1) = 0.5_r8 * state%pint(:ncol,1) + t_rad(:,1) = state%t(:ncol,1) ! The top reference pressure from the RRTMGP coefficients datasets is 1.005183574463 Pa ! Set the top of the extra layer just below that. pint_rad(:,1) = 1.01_r8 + + ! next interface down in LT will always be > 1Pa + ! but in MT we apply adjustment to have it be 1.02 Pa if it was too high + where (pint_rad(:,2) <= pint_rad(:,1)) pint_rad(:,2) = pint_rad(:,1)+0.01_r8 + + ! set the highest pmid (in the "extra layer") to the midpoint (guarantees > 1Pa) + pmid_rad(:,1) = pint_rad(:,1) + 0.5_r8 * (pint_rad(:,2) - pint_rad(:,1)) + + ! For case of CAM MT, also ensure pint_rad(:,2) > pint_rad(:,1) & pmid_rad(:,2) > max(pmid_rad(:,1), min_pressure) + where (pmid_rad(:,2) <= kdist_sw%get_press_min()) pmid_rad(:,2) = pint_rad(:,2) + 0.01_r8 else ! nlay < pverp, thus the 1 Pa level is within a CAM layer. Assuming the top interface of ! this layer is at a pressure < 1 Pa, we need to adjust the top of this layer so that it From 622f957d9bc46046195615c6be6b10c24f36daec Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Wed, 24 Jul 2024 10:33:04 -0400 Subject: [PATCH 2/4] update HEMCO in .gitmodules; start ChangeLog entry --- .gitmodules | 2 +- doc/ChangeLog | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 9e80e983eb..f133ebeb38 100644 --- a/.gitmodules +++ b/.gitmodules @@ -57,7 +57,7 @@ [submodule "hemco"] path = src/hemco url = https://github.com/ESCOMP/HEMCO_CESM.git - fxtag = hemco-cesm1_2_1_hemco3_6_3_cesm_rme + fxtag = hemco-cesm1_2_1_hemco3_6_3_cesm_rme01 fxrequired = AlwaysRequired fxDONOTUSEurl = https://github.com/ESCOMP/HEMCO_CESM.git diff --git a/doc/ChangeLog b/doc/ChangeLog index b198448dc7..45227bf590 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,66 @@ =============================================================== +Tag name: +Originator(s): brianpm, eaton +Date: +One-line Summary: Modify RRTMGP interface for MT configurations. +Github PR URL: + +Purpose of changes (include the issue number and title text for each relevant GitHub issue): + +. Modify the RRTMGP interface for the special case when the minimum valid + pressure for RRTMGP (1 Pa) falls in the top model layer (as it does in + CAM's 93 level MT configuration). The modification is to use the "extra + layer" code path, and add a very thin extra layer just below 1 Pa. + +Issue #1097 - HEMCO reference in .gitmodules is a branch not a tag. +. Modify .gitmodules to resolve #1097 + +Describe any changes made to build system: none + +Describe any changes made to the namelist: none + +List any changes to the defaults for the boundary datasets: none + +Describe any substantial timing or memory changes: none + +Code reviewed by: + +List all files eliminated: none + +List all files added and what they do: none + +List all existing files that have been modified, and describe the changes: + +.gitmodules +- hemco-cesm1_2_1_hemco3_6_3_cesm_rme => hemco-cesm1_2_1_hemco3_6_3_cesm_rme01 + +src/physics/rrtmgp/radiation.F90 +src/physics/rrtmgp/rrtmgp_inputs.F90 +. Identify special case of 1 Pa pressure level being contained in the top + model layer. Treat that case as though an "extra layer" is needed, and + add a very thin extra layer just below 1 Pa. + +If there were any failures reported from running test_driver.sh on any test +platform, and checkin with these failures has been OK'd by the gatekeeper, +then copy the lines from the td.*.status files for the failed tests to the +appropriate machine below. All failed tests must be justified. + +derecho/intel/aux_cam: + +izumi/nag/aux_cam: + +izumi/gnu/aux_cam: + +CAM tag used for the baseline comparison tests if different than previous +tag: + +Summarize any changes to answers: BFB except answer changes expected for +FMT compsets using RRTMGP. + +=============================================================== +=============================================================== + Tag name: cam6_4_015 Originator(s): jedwards, eaton Date: 23 July 2024 From 353e37260c671d018e080d8372d81e83a44003fa Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Wed, 24 Jul 2024 15:12:43 -0400 Subject: [PATCH 3/4] update ChangeLog --- doc/ChangeLog | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 45227bf590..fb9abfc7e2 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,13 +1,14 @@ =============================================================== -Tag name: +Tag name: cam6_4_016 Originator(s): brianpm, eaton Date: One-line Summary: Modify RRTMGP interface for MT configurations. -Github PR URL: +Github PR URL: https://github.com/ESCOMP/CAM/pull/1100 Purpose of changes (include the issue number and title text for each relevant GitHub issue): +Issue #1063 - Possible modification to RRTMG-P for ~80km top model . Modify the RRTMGP interface for the special case when the minimum valid pressure for RRTMGP (1 Pa) falls in the top model layer (as it does in CAM's 93 level MT configuration). The modification is to use the "extra @@ -24,7 +25,7 @@ List any changes to the defaults for the boundary datasets: none Describe any substantial timing or memory changes: none -Code reviewed by: +Code reviewed by: cacraig List all files eliminated: none From e8e7b085133b6ad534e5dbd09e7df7f2c2a5932c Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Thu, 25 Jul 2024 12:56:54 -0400 Subject: [PATCH 4/4] update ChangeLog --- doc/ChangeLog | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index fb9abfc7e2..745825d004 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,7 +2,7 @@ Tag name: cam6_4_016 Originator(s): brianpm, eaton -Date: +Date: 25 July 2024 One-line Summary: Modify RRTMGP interface for MT configurations. Github PR URL: https://github.com/ESCOMP/CAM/pull/1100 @@ -11,8 +11,15 @@ Purpose of changes (include the issue number and title text for each relevant Gi Issue #1063 - Possible modification to RRTMG-P for ~80km top model . Modify the RRTMGP interface for the special case when the minimum valid pressure for RRTMGP (1 Pa) falls in the top model layer (as it does in - CAM's 93 level MT configuration). The modification is to use the "extra - layer" code path, and add a very thin extra layer just below 1 Pa. + CAM's 93 level MT configuration). The modification is to use the "extra + layer" code path, and add a very thin extra layer just below 1 Pa. The + algorithm to calculate the midpoint pressure in the "extra layer" has + changed from the original (which assumed a model top at 0 Pa). Hence the + change affects answers for the low top model configurations (cam7-LT and cam6) + as well as the cam7-MT configuration. + + Note that this modification is still being tested for scientific validity + in the cam7-MT configuration. Issue #1097 - HEMCO reference in .gitmodules is a branch not a tag. . Modify .gitmodules to resolve #1097 @@ -49,15 +56,35 @@ appropriate machine below. All failed tests must be justified. derecho/intel/aux_cam: +ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s_rrtmgp (Overall: DIFF) details: +- diffs due to change in RRTMGP interface + +ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL) details: +- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856 + +SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: PEND) details: +SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: PEND) details: +- pre-existing failures -- need fix in CLM external + +SMS_D_Ln9.T42_T42.FSCAM.derecho_intel.cam-outfrq9s (Overall: FAIL) details: +- pre-existing failure -- need fix in CICE external + izumi/nag/aux_cam: +DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details: +- pre-existing failure - issue #670 + izumi/gnu/aux_cam: +ERP_D_Ln9.ne3pg3_ne3pg3_mg37.QPC6.izumi_gnu.cam-outfrq9s_rrtmgp (Overall: DIFF) +SMS_Ld5.f09_f09_mg17.PC6.izumi_gnu.cam-cam6_port_f09_rrtmgp (Overall: DIFF) +- diffs due to change in RRTMGP interface + CAM tag used for the baseline comparison tests if different than previous tag: Summarize any changes to answers: BFB except answer changes expected for -FMT compsets using RRTMGP. +configurations using cam7MT, cam7LT, and cam6 with RRTMGP =============================================================== ===============================================================