Skip to content

Commit

Permalink
Adjust to be closer to ESCOMP, remove accidental cam6_3_124 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Goldhaber committed Aug 25, 2023
1 parent 3fa48b2 commit e8aab8a
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 166 deletions.
3 changes: 2 additions & 1 deletion bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
<ncdata dyn="se" hgrid="ne3np4" nlev="32" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L32_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="58" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L58_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="93" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L93_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="30" ic_ymd="101" >atm/cam/inic/homme/cami-mam3_0000-01_ne5np4_L30.140707.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="32" ic_ymd="101" >atm/cam/inic/se/F2000climo_ne5pg3_mg37_L32_01-01-31_c230520.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="58" ic_ymd="101" >atm/cam/inic/se/F2000climo_ne5pg3_mg37_L58_01-01-31_c230520.nc</ncdata>

Expand Down Expand Up @@ -2960,6 +2961,7 @@
<fv3_nwat phys="adiabatic" > 1 </fv3_nwat>
<fv3_nwat phys="kessler" > 3 </fv3_nwat>
<fv3_nwat phys="tj2016" > 1 </fv3_nwat>
<fv3_nwat phys="grayrad" > 1 </fv3_nwat>
<fv3_fv_sg_adj > 0 </fv3_fv_sg_adj>
<fv3_grid_type > 0 </fv3_grid_type>
<fv3_hord_dp dyn="fv3" > -10 </fv3_hord_dp>
Expand Down Expand Up @@ -3185,7 +3187,6 @@
'SolIonRate_Tot = jeuv_1 + jeuv_2 + jeuv_3 + jeuv_4 + jeuv_5 + jeuv_6 + jeuv_7 + jeuv_8 + jeuv_9 + jeuv_10 + jeuv_11 + ',
'jeuv_14 + jeuv_15 + jeuv_16 + jeuv_17 + jeuv_18 + jeuv_19 + jeuv_20 + jeuv_21 + jeuv_22 + jeuv_23',
</rxn_rate_sums>

<rxn_rate_sums chem="trop_strat_mam5_ts2">
'O3_Prod = NO_HO2 + CH3O2_NO + HOCH2OO_NO + C2H5O2_NO + CH3CO3_NO + EO2_NO + C3H7O2_NO + PO2_NO + ',
'RO2_NO + ENEO2_NO + MACRO2_NOa + jhonitr + ',
Expand Down
4 changes: 3 additions & 1 deletion bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
This is an optional attribute that is mainly useful for variables
that have only a small number of allowed values.
-->

<!-- Frierson Simple Physics Parameters -->

<entry id="frierson_Wind_min" type="real" category="frierson"
Expand Down Expand Up @@ -2951,7 +2952,7 @@ Default: .false.
<entry id="hetfrz_bc_scalfac" type="real" category="microphys"
group="hetfrz_classnuc_nl" valid_values="" >
Heterogeneous freezing scaling factor for black carbon aerosols.
Default: 0.0
Default: 0.01
</entry>

<entry id="hetfrz_dust_scalfac" type="real" category="microphys"
Expand Down Expand Up @@ -5096,6 +5097,7 @@ Force emission year for HEMCO clock if positive. This will force cycling of data
Default: set by build-namelist for climo cases, otherwise -1 to use model clock.
</entry>


<!-- Reference Pressures -->

<entry id="trop_cloud_top_press" type="real" category="press_lim"
Expand Down
10 changes: 5 additions & 5 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<!--
===============
HEMCO Options
===============
-->
===============
-->
<desc option="HEMCO" >With Harmonized Emissions Component (HEMCO) for chemistry:</desc>

<!--
Expand All @@ -86,8 +86,8 @@
<desc option="ADIAB" >CAM dry adiabatic configurarion (no physics forcing):</desc>
<desc option="DABIP04" >CAM dry adiabatic baroclinic instability (Polvani et al., 2004):</desc>
<desc option="TJ16" >CAM moist Held-Suarez forcing (Thatcher and Jablonowski, 2016):</desc>
<desc option="HS94" >CAM dry Held-Suarez forcing (Held and Suarez (1994)):</desc>
<desc option="GRAYRAD" >CAM moist simple model (Frierson, 2006):</desc>
<desc option="HS94" >CAM dry Held-Suarez forcing (Held and Suarez (1994)):</desc>
<desc option="KESSLER" >CAM moist dynamical core test with Ullrich et al. (2014) baroclinic wave IC, Kessler physics and terminator chemistry:</desc>

<!--
Expand Down Expand Up @@ -181,8 +181,8 @@
<value compset="_CAM\d0%CC.*%SDYN">-nlev 56</value>
<value compset="_CAM\d0%WC.*%SDYN">-nlev 88</value>
<value compset="_CAM\d0%WX.*%SDYN">-nlev 145</value>
<value compset="_CAM.*%L58">-nlev 58 -model_top lt</value>
<value compset="_CAM.*%L93">-nlev 93 -model_top mt</value>
<value compset="_CAM.*%LT">-nlev 58 -model_top lt</value>
<value compset="_CAM.*%MT">-nlev 93 -model_top mt</value>

<!-- Simple models -->
<value compset="_CAM%ADIAB">-phys adiabatic</value>
Expand Down
11 changes: 5 additions & 6 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

<compset>
<alias>FLTHIST_v0d</alias>
<lname>HIST_CAM%DEV%GHGMAM4_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV</lname>
<lname>HIST_CAM%DEV%LT%GHGMAM4_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV</lname>
</compset>

<compset>
Expand Down Expand Up @@ -408,11 +408,6 @@
<lname>HIST_CAM60%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV</lname>
</compset>

<compset>
<alias>FGRAYRAD</alias>
<lname>2000_CAM%GRAYRAD_SLND_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>

<compset>
<alias>FMOZ</alias>
<lname>2000_CAM40%TMOZ_CLM45%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV</lname>
Expand All @@ -428,6 +423,10 @@
<lname>HIST_CAM60_CLM50%SP_CICE%PRES_DOCN%DOM_SROF_SGLC_SWAV</lname>
</compset>

<compset>
<alias>FGRAYRAD</alias>
<lname>2000_CAM%GRAYRAD_SLND_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>

<!-- ****************************** -->
<!-- WACCM science supported compsets -->
Expand Down
54 changes: 0 additions & 54 deletions cime_config/config_pes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,60 +333,6 @@
</grid>
<grid name="a%ne30" >
<mach name="cheyenne">
<pes pesize="any" compset="_CAM%DEV%LT%GHGMAM4_">
<comment>none</comment>
<ntasks>
<ntasks_atm>-8</ntasks_atm>
<ntasks_lnd>-8</ntasks_lnd>
<ntasks_rof>-8</ntasks_rof>
<ntasks_ice>-8</ntasks_ice>
<ntasks_ocn>-8</ntasks_ocn>
<ntasks_cpl>-8</ntasks_cpl>
</ntasks>
<nthrds>
<nthrds_atm>1</nthrds_atm>
<nthrds_lnd>1</nthrds_lnd>
<nthrds_rof>1</nthrds_rof>
<nthrds_ice>1</nthrds_ice>
<nthrds_ocn>1</nthrds_ocn>
<nthrds_cpl>1</nthrds_cpl>
</nthrds>
<rootpe>
<rootpe_atm>0</rootpe_atm>
<rootpe_lnd>0</rootpe_lnd>
<rootpe_rof>0</rootpe_rof>
<rootpe_ice>0</rootpe_ice>
<rootpe_ocn>0</rootpe_ocn>
<rootpe_cpl>0</rootpe_cpl>
</rootpe>
</pes>
<pes pesize="any" compset="_CAM%DEV%MT%GHGMAM4_">
<comment>none</comment>
<ntasks>
<ntasks_atm>-12</ntasks_atm>
<ntasks_lnd>-12</ntasks_lnd>
<ntasks_rof>-12</ntasks_rof>
<ntasks_ice>-12</ntasks_ice>
<ntasks_ocn>-12</ntasks_ocn>
<ntasks_cpl>-12</ntasks_cpl>
</ntasks>
<nthrds>
<nthrds_atm>1</nthrds_atm>
<nthrds_lnd>1</nthrds_lnd>
<nthrds_rof>1</nthrds_rof>
<nthrds_ice>1</nthrds_ice>
<nthrds_ocn>1</nthrds_ocn>
<nthrds_cpl>1</nthrds_cpl>
</nthrds>
<rootpe>
<rootpe_atm>0</rootpe_atm>
<rootpe_lnd>0</rootpe_lnd>
<rootpe_rof>0</rootpe_rof>
<rootpe_ice>0</rootpe_ice>
<rootpe_ocn>0</rootpe_ocn>
<rootpe_cpl>0</rootpe_cpl>
</rootpe>
</pes>
<pes pesize="any" compset="_CAM.*%(CC|WC|CV|CF)">
<comment>none</comment>
<ntasks>
Expand Down
89 changes: 0 additions & 89 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,94 +1,5 @@
===============================================================

Tag name: cam6_3_124
Originator(s): fvitt
Date: 23 Aug 2023
One-line Summary: Fix issues exposed by FMTHIST; add regression tests for FLTHIST and FMTHIST
Github PR URL: https://github.com/ESCOMP/CAM/pull/872

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

Fix memory issue in code that reads input data on the native unstructured model grid.
Fix floating point exception issue in aerosol wet deposition caused by undefined values in
BERGSO (conversion of cloud water to snow) above above pumus active region

Address github issues:
Increase PE layout for MT runs #812
Introduce regression tests for FLTHIST and FMTHIST #841

Describe any changes made to build system: n/a

Describe any changes made to the namelist: n/a

List any changes to the defaults for the boundary datasets: n/a

Describe any substantial timing or memory changes: n/a

Code reviewed by: cacraigucar nusbaume

List all files eliminated: n/a

List all files added and what they do: n/a

List all existing files that have been modified, and describe the changes:
M Externals.cfg
M bld/namelist_files/namelist_defaults_cam.xml
- default spun-up IC file for L93 ne30 CAM-Chem-SE

M cime_config/config_compsets.xml
- remove "_v0d" from FLTHIST and FMTHIST compset short names

M cime_config/config_pes.xml
- set default PE layouts for FLTHIST and FMTHIST compsets

M cime_config/testdefs/testlist_cam.xml
- add cheyenne regression tests for FLTHIST and FMTHIST compsets

M src/chemistry/utils/tracer_data.F90
- remove unused ps field that was allocated using undefined sizes when
the input file was on the native unsctructured model grid

M src/dynamics/se/dyn_comp.F90
- write "Molecular viscosity" message only if masterproc

M src/physics/cam_dev/micro_pumas_cam.F90
- zero bergo field above top_lev

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.

cheyenne/intel/aux_cam:
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s COMPARE_base_rest
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h (Overall: DIFF) details:
FAIL SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_123: DIFF
ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_wcm_ne30 (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_wcm_ne30 RUN time=287
PEND ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_wcm_ne30 COMPARE_base_rest
- pre-extisting failures

ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s (Overall: DIFF) details:
FAIL ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s NLCOMP
FAIL ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_123: ERROR BFAIL baseline directory '/glade/p/cesm/amwg/cesm_baselines/cam6_3_123/ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s' does not exist
SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s (Overall: DIFF) details:
FAIL SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s NLCOMP
FAIL SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_123: ERROR BFAIL baseline directory '/glade/p/cesm/amwg/cesm_baselines/cam6_3_123/SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s' does not exist
- new tests

izumi/nag/aux_cam:
DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
FAIL DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae RUN time=10
- pre-extisting failure

izumi/gnu/aux_cam: All PASS

Summarize any changes to answers: bit-for-bit unchanged

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

Tag name: cam6_3_123
Originator(s): cacraig, jedwards, fvitt
Date: August 16, 2023
Expand Down
20 changes: 16 additions & 4 deletions src/chemistry/utils/tracer_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ module tracer_data
real(r8) :: one_yr = 0
real(r8) :: curr_mod_time ! model time - calendar day
real(r8) :: next_mod_time ! model time - calendar day - next time step
integer :: nlon = 0
integer :: nlat = 0
integer :: nlev = 0
integer :: nilev = 0
integer :: nlon
integer :: nlat
integer :: nlev
integer :: nilev
integer :: ps_coords(3) ! LATDIM | LONDIM | TIMDIM
integer :: ps_order(3) ! LATDIM | LONDIM | TIMDIM
real(r8), pointer, dimension(:) :: lons => null()
Expand All @@ -104,6 +104,7 @@ module tracer_data
real(r8), pointer, dimension(:) :: ilevs => null()
real(r8), pointer, dimension(:) :: hyam => null()
real(r8), pointer, dimension(:) :: hybm => null()
real(r8), pointer, dimension(:,:) :: ps => null()
real(r8), pointer, dimension(:) :: hyai => null()
real(r8), pointer, dimension(:) :: hybi => null()
real(r8), pointer, dimension(:,:) :: weight_x => null(), weight_y => null()
Expand Down Expand Up @@ -339,6 +340,12 @@ subroutine trcdata_init( specifier, filename, filelist, datapath, flds, file, &
lat_dimid = old_dimid
endif

allocate( file%ps(file%nlon,file%nlat), stat=astat )
if( astat /= 0 ) then
write(iulog,*) 'trcdata_init: file%ps allocation error = ',astat
call endrun('trcdata_init: failed to allocate x array')
end if

call pio_seterrorhandling(File%curr_fileid, PIO_BCAST_ERROR, oldmethod=err_handling)
ierr = pio_inq_varid( file%curr_fileid, 'PS', file%ps_id )
file%has_ps = (ierr==PIO_NOERR)
Expand Down Expand Up @@ -428,6 +435,11 @@ subroutine trcdata_init( specifier, filename, filelist, datapath, flds, file, &
ierr = pio_get_var( file%curr_fileid, varid, file%hybi )
endif

allocate( file %ps (pcols,begchunk:endchunk), stat=astat )
if( astat/= 0 ) then
write(iulog,*) 'trcdata_init: failed to allocate file%ps array; error = ',astat
call endrun
end if
allocate( file%ps_in(1)%data(pcols,begchunk:endchunk), stat=astat )
if( astat/= 0 ) then
write(iulog,*) 'trcdata_init: failed to allocate file%ps_in(1)%data array; error = ',astat
Expand Down
6 changes: 2 additions & 4 deletions src/dynamics/se/dyn_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -763,10 +763,8 @@ subroutine dyn_init(dyn_in, dyn_out)
(hvcoord%hyam(:)+hvcoord%hybm(:))*hvcoord%ps0,km_sponge_factor,&
kmvis_ref,kmcnd_ref,rho_ref)

if (masterproc) then
write(iulog,*) "Molecular viscosity and thermal conductivity reference profile"
write(iulog,*) "k, p, z, km_sponge_factor, kmvis_ref/rho_ref, kmcnd_ref/(cp*rho_ref):"
end if
write(iulog,*) "Molecular viscoity and thermal conductivity reference profile"
write(iulog,*) "k, p, z, km_sponge_factor, kmvis_ref/rho_ref, kmcnd_ref/(cp*rho_ref):"
do k=1,nlev
! only apply molecular viscosity where viscosity is > 1000 m/s^2
if (MIN(kmvis_ref(k)/rho_ref(k),kmcnd_ref(k)/(cpair*rho_ref(k)))>1000.0_r8) then
Expand Down
2 changes: 0 additions & 2 deletions src/physics/cam_dev/micro_pumas_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,6 @@ subroutine micro_pumas_cam_tend(state, ptend, dtime, pbuf)

!Copy pbuf field from proc_rates back to pbuf pointer
bergstot(:ncol,top_lev:) = proc_rates%bergstot(:ncol,1:nlev)
bergstot(:ncol,1:top_lev-1) = 0._r8

! ------------------------------------------------------ !
! ------------------------------------------------------ !
Expand Down Expand Up @@ -2629,7 +2628,6 @@ subroutine micro_pumas_cam_tend(state, ptend, dtime, pbuf)
nmultgo_grid(:ncol,:top_lev-1) = 0._r8
nmultrgo_grid(:ncol,:top_lev-1) = 0._r8
npsacwgo_grid(:ncol,:top_lev-1) = 0._r8
bergso_grid(:ncol,:top_lev-1) = 0._r8

! These pbuf fields need to be assigned. There is no corresponding subcol_field_avg
! as they are reset before being used, so it would be a needless calculation
Expand Down

0 comments on commit e8aab8a

Please sign in to comment.