Skip to content

Commit

Permalink
ESCOMP tag: cam6_3_124
Browse files Browse the repository at this point in the history
Merge pull request ESCOMP#872 from fvitt/unstr_emis_fix

cam6_3_124: Fix memory issue, default PE layout for FMTHIST

ESCOMP commit: f5aec67
  • Loading branch information
fvitt authored and Steve Goldhaber committed Aug 24, 2023
1 parent 654446c commit 7c4d42a
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 18 deletions.
54 changes: 54 additions & 0 deletions cime_config/config_pes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,60 @@
</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: 89 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,94 @@
===============================================================

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: 4 additions & 16 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
integer :: nlat
integer :: nlev
integer :: nilev
integer :: nlon = 0
integer :: nlat = 0
integer :: nlev = 0
integer :: nilev = 0
integer :: ps_coords(3) ! LATDIM | LONDIM | TIMDIM
integer :: ps_order(3) ! LATDIM | LONDIM | TIMDIM
real(r8), pointer, dimension(:) :: lons => null()
Expand All @@ -104,7 +104,6 @@ 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 @@ -340,12 +339,6 @@ 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 @@ -435,11 +428,6 @@ 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: 4 additions & 2 deletions src/dynamics/se/dyn_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,10 @@ subroutine dyn_init(dyn_in, dyn_out)
(hvcoord%hyam(:)+hvcoord%hybm(:))*hvcoord%ps0,km_sponge_factor,&
kmvis_ref,kmcnd_ref,rho_ref)

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):"
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
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: 2 additions & 0 deletions src/physics/cam_dev/micro_pumas_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,7 @@ 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 @@ -2628,6 +2629,7 @@ 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 7c4d42a

Please sign in to comment.