Skip to content

Commit

Permalink
ESCOMP tag: cam6_4_031
Browse files Browse the repository at this point in the history
Merge pull request ESCOMP#1131 from brian-eaton/misc05

cam6_4_031: fix issues ESCOMP#1108, ESCOMP#1106, ESCOMP#1058, ESCOMP#1051, ESCOMP#1050; merge PR#1101

ESCOMP commit: 9f0cb73
  • Loading branch information
nusbaume authored and Steve Goldhaber committed Oct 16, 2024
1 parent c509b4a commit a6909e1
Show file tree
Hide file tree
Showing 26 changed files with 370 additions and 1,551 deletions.
77 changes: 0 additions & 77 deletions bld/namelist_files/use_cases/aquaplanet_cam3.xml

This file was deleted.

4 changes: 2 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def buildnml(case, caseroot, compname):
buildcpp = import_from_file("buildcpp", cmd)
_ = buildcpp.buildcpp(case)
except:
raise RuntimeError("CAM's 'buildcpp' script failed to run properly.")
logger.warning(" ...cam buildcpp exited with error")

# Verify that we have a config_cache file (generated by the call to buildcpp)
expect(os.path.isfile(filename),
" Missing config_cache.xml - cannot run build-namelist")
" Missing CAM's config_cache.xml - cannot run build-namelist")

#--------------------------------------------------------------------
# Invoke cam build-namelist - output will go in $CASEROOT/Buildconf/camconf
Expand Down
196 changes: 196 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,200 @@
===============================================================

Tag name: cam6_4_031
Originator(s): jedwards, eaton
Date: Sept 9, 2024
One-line Summary: fix issues #1108, #1106, #1058, #1051, #1050; merge PR#1101
Github PR URL: https://github.com/ESCOMP/CAM/pull/1131

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

Issue #1108 - More robust logic in gw_drag.F90 when deep_scheme='off'
- Modify build-namelist to set use_gw_convect_dp=.false. when
deep_scheme='off'. In gw_drag::gw_tend check whether field TTEND_DP is
in the pbuf. If so then associate the ttend_dp pointer. If not then
allocate the ttend_dp pointer and set to zero.

PR #1101 - improved fix for rh write performance
- reorder output fields. Merge Jim's PR into this one.

Issue #1106 - Report an error if a user uses --model_top with anything other than cam7
- configure reports this error, but the output in the log file gets
obscured by a stack traceback issued from buildnml which is not useful.
The fix implemented in buildnml replaces the "raise RuntimeError" call with
a warning message in the log file. Then, if a subsequent check for CAM's
config_cache.xml file fails, the execution is terminated by a call to
the CIME.utils "expect()" routine.

Issue #1058 - Remove unused pbuf variable smaw
- Remove both smaw and turbtype from physics buffer. Neither is used.
Remove the calculation of smaw entirely. Calculation of turbtype
remains. It is used locally, and may be written to history file
(UW_turbtype).

Issue #1051 - Bad logic in SE dycore "interpolate_vector" subroutines
- These subroutines are not currently used by CAM as they are restricted to
interpolating fields on the GLL grid. Fix the conditional logic and
update the endrun message.

Issue #1050 - Remove CAM3 as a compset or configure option

Describe any changes made to build system:

Describe any changes made to the namelist:
. build-namelist now sets use_gw_convect_dp=.false. when deep_scheme='off'.

List any changes to the defaults for the boundary datasets:

Describe any substantial timing or memory changes:

Code reviewed by: peverwhee, nusbaume

List all files eliminated:

bld/namelist_files/use_cases/aquaplanet_cam3.xml
src/physics/cam/cam3_aero_data.F90
src/physics/cam/cam3_ozone_data.F90

List all files added and what they do:

List all existing files that have been modified, and describe the changes:

bld/build-namelist
. add check to set use_gw_convect_dp=.false. when deep_scheme='off'.
. remove cam3 conditionals
. remove variables cam3_ozone_data_on, cam3_aero_data_on, bndtvo, bndtvaer
. remove cam3 ozone and aerosols from rad_climate specification.
. remove cam3 aerosol deposition fluxes
. remove add_default for fcrit2

bld/configure
. remove cam3 as valid physics package

bld/config_files/definition.xml
. remove cam3 as valid value for -phys

bld/namelist_files/namelist_defaults_cam.xml
. remove cam3 bulk aerosol files
. remove cam3 setting for fv_fft_flt

bld/namelist_files/namelist_definition.xml
. remove definitions for cam3_ozone_data_on, cam3_aero_data_on, bndtvo,
bndtvaer, ozncyc
. remove cam3 as valid value for cam_physpkg
. remove definition for fcrit2

cime_config/buildnml
. replace RuntimeError exception with message to logger.

cime_config/config_compsets.xml
. remove QPC3

cime_config/config_component.xml
. remove regexp matches for _CAM30

src/chemistry/modal_aero/modal_aero_rename.F90
. remove cam3 comments

src/chemistry/utils/prescribed_ozone.F90
. remove cam3 conditional

src/control/cam_history.F90
. The variables in the restart history files are reordered so that the nacs
variables are all written together rather than being next to their
corresponding fields.

src/control/cam_snapshot_common.F90
. change npbuf_all from 327 to 314
. fill_pbuf_info
- remove smaw, turbtype
- remove 11 fields: cam3_*

src/control/runtime_opts.F90
. remove refs to cam3_aero_data and cam3_ozone_data

src/dynamics/fv/cd_core.F90
src/dynamics/fv/dynamics_vars.F90
. remove cam3 comments

src/dynamics/se/dycore/interpolate_mod.F90
. interpolate_vector2d and interpolate_vector3d
- fix conditional logic and clarify endrun message to indicate that the
input fields must be on the GLL grid.

src/physics/cam/convect_shallow.F90
. remove cam3 from conditional

src/physics/cam/eddy_diff.F90
. caleddy
- remove intent(out) arg sm_aw

src/physics/cam/eddy_diff_cam.F90
. eddy_diff_tend
- remove intent(out) args sm_aw and turbtype
. compute_eddy_diff
- remove intent(out) arg sm_aw
- remove intent(out) arg turbtype. use local storage for turbtype.

src/physics/cam/gw_common.F90
. remove cam3 comment

src/physics/cam/gw_drag.F90
. check that field TTEND_DP is in the pbuf before trying to associate the
pointer ttend_dp. If TTEND_DP is not in pbuf then allocate the ttend_dp
pointer and fill with zeros.
. remove fcrit2 from the namelist. Hardcode to 1.0 in GWBand call that
sets band_oro, just like all the other calls to GWBand.

src/physics/cam/rk_stratiform.F90
. remove cam3 from conditional

src/physics/cam/uwshcu.F90
. remove cam3 comment

src/physics/cam/vertical_diffusion.F90
. remove smaw and turbtype from physics buffer
. vertical_diffusion_tend
- remove smaw and turbtype as actual args in call to eddy_diff_tend

src/physics/cam/zm_conv_intr.F90
. remove cam3 conditional

src/physics/camrt/radlw.F90
. remove cam3 conditional

src/physics/rrtmg/aer_src/rrtmg_sw_init.f90
. remove cam3 comment


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:

ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL)
- 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
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: PEND)
- pre-existing failures -- need fix in CLM external

derecho/nvhpc/aux_cam: ALL PASS

izumi/nag/aux_cam:

DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL)
- pre-existing failure - issue #670

izumi/gnu/aux_cam: ALL PASS

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

Summarize any changes to answers: BFB

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

Tag name: cam6_4_030
Expand Down
9 changes: 0 additions & 9 deletions src/chemistry/modal_aero/modal_aero_rename.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ subroutine modal_aero_rename_sub( &
real(r8), intent(inout) :: dqqcwdt(ncol,pver,pcnstxx)
real(r8), intent(in) :: dqdt_other(ncol,pver,pcnstxx)
! tendencies for "other" continuous growth process
! currently in cam3
! dqdt is from gas (h2so4, nh3) condensation
! dqdt_other is from aqchem and soa
! *** NOTE ncol and pcnstxx dimensions
real(r8), intent(in) :: dqqcwdt_other(ncol,pver,pcnstxx)
logical, intent(inout) :: dotendrn(pcnstxx) ! identifies the species for which
Expand Down Expand Up @@ -286,9 +283,6 @@ subroutine modal_aero_rename_no_acc_crs_sub( &
real(r8), intent(inout) :: dqqcwdt(ncol,pver,pcnstxx)
real(r8), intent(in) :: dqdt_other(ncol,pver,pcnstxx)
! tendencies for "other" continuous growth process
! currently in cam3
! dqdt is from gas (h2so4, nh3) condensation
! dqdt_other is from aqchem and soa
! *** NOTE ncol and pcnstxx dimensions
real(r8), intent(in) :: dqqcwdt_other(ncol,pver,pcnstxx)
logical, intent(inout) :: dotendrn(pcnstxx) ! identifies the species for which
Expand Down Expand Up @@ -878,9 +872,6 @@ subroutine modal_aero_rename_acc_crs_sub( &
real(r8), intent(inout) :: dqqcwdt(ncol,pver,pcnstxx)
real(r8), intent(in) :: dqdt_other(ncol,pver,pcnstxx)
! tendencies for "other" continuous growth process
! currently in cam3
! dqdt is from gas (h2so4, nh3) condensation
! dqdt_other is from aqchem and soa
! *** NOTE ncol and pcnstxx dimensions
real(r8), intent(in) :: dqqcwdt_other(ncol,pver,pcnstxx)
logical, intent(inout) :: dotendrn(pcnstxx) ! identifies the species for which
Expand Down
9 changes: 2 additions & 7 deletions src/chemistry/utils/prescribed_ozone.F90
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,8 @@ subroutine prescribed_ozone_adv( state, pbuf2d)

if( .not. has_prescribed_ozone ) return

if( cam_physpkg_is('cam3') .and. aqua_planet ) then
molmass = 48._r8
amass = 28.9644_r8
else
molmass = 47.9981995_r8
amass = mwdry
end if
molmass = 47.9981995_r8
amass = mwdry

call advance_trcdata( fields, file, state, pbuf2d )

Expand Down
Loading

0 comments on commit a6909e1

Please sign in to comment.