Skip to content

Commit

Permalink
Merge pull request #1231 from PeterHjortLauritzen/issue1222_1208_club…
Browse files Browse the repository at this point in the history
…b_bugfix_and_namelist_chg

cam6_4_058: Fix Exner bug in CLUBB interface and change CLUBB namelist
  • Loading branch information
nusbaume authored Feb 4, 2025
2 parents 89b3664 + f7f3731 commit 014626a
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@
<clubb_l_intr_sfc_flux_smooth phys="cam7" > .true. </clubb_l_intr_sfc_flux_smooth>
<clubb_l_lmm_stepping > .false. </clubb_l_lmm_stepping>
<clubb_l_lscale_plume_centered > .false. </clubb_l_lscale_plume_centered>
<clubb_l_min_wp2_from_corr_wx > .true. </clubb_l_min_wp2_from_corr_wx>
<clubb_l_min_wp2_from_corr_wx > .false. </clubb_l_min_wp2_from_corr_wx>
<clubb_l_min_xp2_from_corr_wx > .true. </clubb_l_min_xp2_from_corr_wx>
<clubb_l_mono_flux_lim_rtm > .true. </clubb_l_mono_flux_lim_rtm>
<clubb_l_mono_flux_lim_spikefix > .true. </clubb_l_mono_flux_lim_spikefix>
Expand Down
104 changes: 102 additions & 2 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
===============================================================

Tag name: cam6_4_058
Originator(s): PeterHjortLauritzen, adamrher, bstephens82, jimmielin, nusbaume
Date: Jan 31 2025
One-line Summary: Fix Exner bug in CLUBB interface and change CLUBB namelist
Github PR URL: https://github.com/ESCOMP/CAM/pull/1231

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

The computation of the Exner function in the CLUBB interface code currently passes an incorrect version to the PBL utilities.
The PBL utilities expect the "Stull" definition of the Exner function rather than the traditional "atmospheric" Exner function.
(Github issue #1222)

The CLUBB group has recommended a namelist change to address this issue.
(Github issue #1208)

Snapshots of tphysbc/tphysac subroutine-level variables are always in the "after" state for both tapes
(Github issue #1241)

Describe any changes made to build system: none

Describe any changes made to the namelist:

M bld/namelist_files/namelist_defaults_cam.xml
- Turn off 'clubb_l_min_wp2_from_corr_wx' option in CLUBB

List any changes to the defaults for the boundary datasets: none

Describe any substantial timing or memory changes: not evaluated

Code reviewed by: cacraigucar

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:

M src/physics/cam/cam_snapshot.F90
- Switch to correct tape for tphysac/tphysbc snapshot

M src/physics/cam/clubb_intr.F90
- Replace CLUBB exner with "Stull" Exner, which is what is actually expected.

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.

NLCOMP and baseline failures for all applications using CLUBB.

derecho/intel/aux_cam:

ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL)
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF)
- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856

SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie (Overall: FAIL)
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL)
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update

derecho/nvhpc/aux_cam:

ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: FAIL)
- pre-existing failure -- issue #1220

izumi/nag/aux_cam:

All non-CAM6/CAM7 tests pass (CAM6 and CAM7 differences expected)

izumi/gnu/aux_cam:

All non-CAM6/CAM7 tests pass (CAM6 and CAM7 differences expected)

CAM tag used for the baseline comparison tests if different than previous
tag:

Summarize any changes to answers, i.e.,
- what code configurations:
- what platforms/compilers:
- nature of change (roundoff; larger than roundoff but same climate; new
climate):

If bitwise differences were observed, how did you show they were no worse
than roundoff?

If this tag changes climate describe the run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced, i.e.,
- source tag (all code used must be in the repository):
- platform/compilers:
- configure commandline:
- build-namelist command (or complete namelist):
- MSS location of output:

MSS location of control simulations used to validate new climate:

URL for AMWG diagnostics output used to validate new climate:

===============================================================
===============================================================

Tag name: cam6_4_057
Originator(s): brianpm, eaton, nusbaume
Date: Jan 29 2025
Expand Down Expand Up @@ -66,12 +166,12 @@ SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF)

SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie (Overall: FAIL)
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL)
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update

derecho/nvhpc/aux_cam:

ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: FAIL)
- pre-existing failure -- issue #1220
- pre-existing failure -- issue #1220

izumi/nag/aux_cam: ALL PASS

Expand Down
47 changes: 47 additions & 0 deletions src/physics/cam/cam_snapshot.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,53 @@ subroutine cam_snapshot_all_outfld_tphysbc(file_num, state, tend, cam_in, cam_ou

lchnk = state%lchnk

call cam_history_snapshot_activate('tphysbc_flx_heat', file_num)
call outfld('tphysbc_flx_heat', flx_heat, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_flx_heat')

call cam_history_snapshot_activate('tphysbc_cmfmc', file_num)
call outfld('tphysbc_cmfmc', cmfmc, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_cmfmc')

call cam_history_snapshot_activate('tphysbc_cmfcme', file_num)
call outfld('tphysbc_cmfcme', cmfcme, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_cmfcme')

call cam_history_snapshot_activate('tphysbc_zdu', file_num)
call outfld('tphysbc_zdu', zdu, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_zdu')

call cam_history_snapshot_activate('tphysbc_rliq', file_num)
call outfld('tphysbc_rliq', rliq, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_rliq')

call cam_history_snapshot_activate('tphysbc_rice', file_num)
call outfld('tphysbc_rice', rice, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_rice')

call cam_history_snapshot_activate('tphysbc_dlf', file_num)
call outfld('tphysbc_dlf', dlf, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_dlf')

call cam_history_snapshot_activate('tphysbc_dlf2', file_num)
call outfld('tphysbc_dlf2', dlf2, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_dlf2')

call cam_history_snapshot_activate('tphysbc_rliq2', file_num)
call outfld('tphysbc_rliq2', rliq2, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_rliq2')

call cam_history_snapshot_activate('tphysbc_det_s', file_num)
call outfld('tphysbc_det_s', det_s, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_det_s')

call cam_history_snapshot_activate('tphysbc_det_ice', file_num)
call outfld('tphysbc_det_ice', det_ice, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_det_ice')

call cam_history_snapshot_activate('tphysbc_net_flx', file_num)
call outfld('tphysbc_net_flx', net_flx, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysbc_net_flx')

call cam_snapshot_all_outfld(file_num, state, tend, cam_in, cam_out, pbuf)

Expand Down Expand Up @@ -163,10 +198,22 @@ subroutine cam_snapshot_all_outfld_tphysac(file_num, state, tend, cam_in, cam_ou

lchnk = state%lchnk

call cam_history_snapshot_activate('tphysac_fh2o', file_num)
call outfld('tphysac_fh2o', fh2o, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysac_fh2o')

call cam_history_snapshot_activate('tphysac_surfric', file_num)
call outfld('tphysac_surfric', surfric, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysac_surfric')

call cam_history_snapshot_activate('tphysac_obklen', file_num)
call outfld('tphysac_obklen', obklen, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysac_obklen')

call cam_history_snapshot_activate('tphysac_flx_heat', file_num)
call outfld('tphysac_flx_heat', flx_heat, pcols, lchnk)
call cam_history_snapshot_deactivate('tphysac_flx_heat')


call cam_snapshot_all_outfld(file_num, state, tend, cam_in, cam_out, pbuf)

Expand Down
4 changes: 2 additions & 2 deletions src/physics/cam/clubb_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4700,8 +4700,8 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
! --------------------------------------------------------------------------------- !
do i=1,ncol
do k=1,pver
!use local exner since state%exner is not a proper exner
th(i,k) = state1%t(i,k)*inv_exner_clubb(i,k)
!subroutine pblind expects "Stull" definition of Exner
th(i,k) = state1%t(i,k)*state1%exner(i,k)
!thv should have condensate loading to be consistent with earlier def's in this module
thv(i,k) = th(i,k)*(1.0_r8+zvir*state1%q(i,k,ixq) - state1%q(i,k,ixcldliq))
enddo
Expand Down

0 comments on commit 014626a

Please sign in to comment.