Skip to content

Commit

Permalink
Merge pull request #1147 from jedwards4b/timestamp_in_rpointer_name
Browse files Browse the repository at this point in the history
cam6_4_048: Timestamp in rpointer name
  • Loading branch information
peverwhee authored Dec 20, 2024
2 parents 47dd341 + 19f0d96 commit f429ebf
Show file tree
Hide file tree
Showing 10 changed files with 208 additions and 63 deletions.
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,28 @@ fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
[submodule "cime"]
path = cime
url = https://github.com/ESMCI/cime
fxtag = cime6.1.41
fxtag = cime6.1.49
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/cime

[submodule "cmeps"]
path = components/cmeps
url = https://github.com/ESCOMP/CMEPS.git
fxtag = cmeps1.0.22
fxtag = cmeps1.0.32
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git

[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.53
fxtag = cdeps1.0.61
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git

[submodule "share"]
path = share
url = https://github.com/ESCOMP/CESM_share
fxtag = share1.1.2
fxtag = share1.1.6
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share

Expand All @@ -193,7 +193,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE
[submodule "clm"]
path = components/clm
url = https://github.com/ESCOMP/CTSM
fxtag = ctsm5.3.002
fxtag = ctsm5.3.016
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CTSM

Expand Down
2 changes: 1 addition & 1 deletion components/clm
Submodule clm updated 734 files
137 changes: 137 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,142 @@
===============================================================

Tag name: cam6_4_048
Originator(s): jedwards4b, peverwhee
Date: 20 December 2024
One-line Summary: Timestamp in rpointer name
Github PR URL: https://github.com/ESCOMP/CAM/pull/1147

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
#1146 - Add timestep to rpointer file name
- Updates to externals, nuopc cap, and cam control code to handle timestamp in
rpointer file

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: brian-eaton

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 .gitmodules
- update externals for rpointer mods
- cime6.1.49
- cmeps1.0.32
- cdeps1.0.61
- share1.1.6
- ctsm5.3.016

M src/control/cam_initfiles.F90
- look for new timestamped rpointer file

M src/control/cam_restart.F90
- remove unnecessary conditionals for optional variables

M src/cpl/nuopc/atm_comp_nuopc.F90
- update variable names coming from coupler

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:

ERC_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq3s_cosp (Overall: NLFAIL) details:
ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9.f19_f19_mg17.QPX2000.derecho_intel.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9.ne16_ne16_mg17.FADIAB.derecho_intel.cam-terminator (Overall: NLFAIL) details:
ERC_D_Ln9.ne16_ne16_mg17.QPC5HIST.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
ERC_D_Ln9_P144x1.ne16pg3_ne16pg3_mg17.QPC6HIST.derecho_intel.cam-outfrq3s_ttrac_usecase (Overall: NLFAIL) details:
ERC_D_Ln9.T42_T42_mg17.FDABIP04.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
ERC_D_Ln9.T42_T42_mg17.FHS94.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
ERI_D_Ln18.f45_f45_mg37.QPC41850.derecho_intel.cam-co2rmp_usecase (Overall: NLFAIL) details:
ERP_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ld3.f09_f09_mg17.FWHIST.derecho_intel.cam-reduced_hist1d (Overall: NLFAIL) details:
ERS_Ln9.ne0TESTONLYne5x4_ne0TESTONLYne5x4_mg37.FADIAB.derecho_intel.cam-outfrq3s_refined (Overall: NLFAIL) details:
SCT_D_Ln7.ne3_ne3_mg37.QPC5.derecho_intel.cam-scm_prep (Overall: NLFAIL) details:
SCT_D_Ln7.T42_T42_mg17.QPC5.derecho_intel.cam-scm_prep (Overall: NLFAIL) details:
SMS_D_Ld2.f19_f19_mg17.QPC5HIST.derecho_intel.cam-volc_usecase (Overall: NLFAIL) details:
SMS_D_Ld5.f19_f19_mg17.PC4.derecho_intel.cam-cam4_port5d (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.QPC5M7.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_Ld5.f09_f09_mg17.PC6.derecho_intel.cam-cam6_port_f09 (Overall: NLFAIL) details:
SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging (Overall: NLFAIL) details:
SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s (Overall: NLFAIL) details:
SMS_Ln9.f19_f19.F2000climo.derecho_intel.cam-silhs (Overall: NLFAIL) details:
- NL diffs due to CMEPS & CTSM external updates

ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ld3.ne30pg3_ne30pg3_mg17.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa (Overall: DIFF) details:
ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
ERP_Ln9.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 (Overall: DIFF) details:
ERP_Ln9.f09_f09_mg17.F1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.f09_f09_mg17.F2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.f09_f09_mg17.FHIST_BDRD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERP_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERS_Ln9.f19_f19_mg17.FSPCAMS.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
ERS_Ln9_P288x1.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 (Overall: DIFF) details:
SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday (Overall: DIFF) details:
SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 (Overall: DIFF) details:
SMS_D_Ln9.ne16pg3_ne16pg3_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mg17.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust (Overall: DIFF) details:
SMS_D_Ln9.T42_T42.FSCAMARM97.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
SMS_Ln9.f19_f19_mg17.FHIST.derecho_intel.cam-outfrq9s_nochem (Overall: DIFF) details:
SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp (Overall: DIFF) details:
- Diffs due to updated CTSM external

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.

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

derecho/nvhpc/aux_cam:
ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: DIFF) details:
- Diffs due to updated CTSM external

izumi/nag/aux_cam: !!due to izumi being down and the desire to make a CESM alpha
tag, the izumi tests were not run!! this changelog entry will be updated once
the tests are run

izumi/gnu/aux_cam: !!due to izumi being down and the desire to make a CESM alpha
tag, the izumi tests were not run!! this changelog entry will be updated once
the tests are run

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

Summarize any changes to answers: answer changes thanks to updated CTSM tag
- ran derecho intel & nvhpc tests on head of cam_development with ctsm5.3.015 vs baselines for
this tag and confirmed that there were no DIFFs

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

Tag name: cam6_4_047
Originator(s): jedwards4b, fvitt
Date: 19 November 2024
Expand Down
2 changes: 1 addition & 1 deletion share
28 changes: 18 additions & 10 deletions src/control/cam_initfiles.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ module cam_initfiles

real(r8), public, protected :: scale_dry_air_mass = 0.0_r8 ! Toggle and target avg air mass for MPAS dycore

! The restart pointer file contains name of most recently written primary restart file.
! The contents of this file are updated by cam_write_restart as new restart files are written.
character(len=cl), public, protected :: rest_pfile

! Filename for initial restart file.
character(len=cl) :: restart_file = ' '

Expand All @@ -68,16 +64,20 @@ subroutine cam_initfiles_readnl(nlfile)
use spmd_utils, only: mpicom, mstrid=>masterprocid, mpir8=>mpi_real8, &
mpichar=>mpi_character, mpi_logical
use cam_instance, only: inst_suffix

use filenames, only: interpret_filename_spec

character(len=*), intent(in) :: nlfile ! filepath for file containing namelist input

! Local variables
integer :: unitn, ierr

character(len=cl) :: locfn
logical :: filefound
integer :: xtype
integer(pio_offset_kind) :: slen
logical :: found

! The restart pointer file contains name of most recently written primary restart file.
character(len=cl) :: rest_pfile

character(len=*), parameter :: sub = 'cam_initfiles_readnl'

Expand Down Expand Up @@ -112,18 +112,26 @@ subroutine cam_initfiles_readnl(nlfile)
call mpi_bcast(scale_dry_air_mass, 1, mpir8, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": ERROR: mpi_bcast: scale_dry_air_mass")

! Set pointer file name based on instance suffix
rest_pfile = './rpointer.atm' // trim(inst_suffix)

! Set name of primary restart file
if (restart_run) then
! Read name of restart file from pointer file
if (masterproc) then
rest_pfile = interpret_filename_spec("rpointer.cam"//trim(inst_suffix)//".%y-%m-%d-%s", prev=.true.)
inquire(file=trim(rest_pfile),exist=found)
if(.not. found) then
write(iulog, "INFO : rpointer file "//trim(rest_pfile)//" not found.")
rest_pfile = "rpointer.cam"//trim(inst_suffix)
write(iulog, " Try looking for "//trim(rest_pfile)//" ...")
inquire(file=trim(rest_pfile),exist=found)
if(.not. found) then
call endrun(sub // ': ERROR: rpointer file: '//trim(rest_pfile) // ' not found')
endif
endif
unitn = getunit()
call opnfil(rest_pfile, unitn, 'f', status="old")
read (unitn, '(a)', iostat=ierr) restart_file
if (ierr /= 0) then
call endrun(sub // ': ERROR: reading rpointer file')
call endrun(sub // ': ERROR: reading rpointer file: '//trim(rest_pfile))
end if
close(unitn)
call freeunit(unitn)
Expand Down
35 changes: 16 additions & 19 deletions src/control/cam_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,8 @@ subroutine cam_write_restart(cam_in, cam_out, dyn_out, pbuf2d, &
! (%c = caseid, $y = year, $m = month, $d = day, $s = seconds in day, %t = number)
rfilename_spec = '%c.cam' // trim(inst_suffix) //'.r.%y-%m-%d-%s.nc'

if (present(yr_spec).and.present(mon_spec).and.present(day_spec).and.present(sec_spec)) then
fname = interpret_filename_spec( rfilename_spec, &
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
else
fname = interpret_filename_spec( rfilename_spec )
end if
fname = interpret_filename_spec( rfilename_spec, &
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )

call cam_pio_createfile(fh, trim(fname), 0)
ierr = cam_pio_set_fill(fh)
Expand All @@ -132,38 +128,39 @@ subroutine cam_write_restart(cam_in, cam_out, dyn_out, pbuf2d, &
call ionosphere_write_restart(fh)
call write_restart_physics(fh, cam_in, cam_out, pbuf2d)

if (present(yr_spec).and.present(mon_spec).and.&
present(day_spec).and.present(sec_spec)) then
call write_restart_history(fh, yr_spec=yr_spec, mon_spec=mon_spec, &
day_spec=day_spec, sec_spec= sec_spec )
else
call write_restart_history(fh)
end if
call write_restart_history(fh, yr_spec=yr_spec, mon_spec=mon_spec, &
day_spec=day_spec, sec_spec= sec_spec )

! Close the primary restart file
call pio_closefile(fh)

! Update the restart pointer file
call write_rest_pfile(fname)
call write_rest_pfile(fname, yr_spec=yr_spec, mon_spec=mon_spec, &
day_spec=day_spec, sec_spec= sec_spec )

end subroutine cam_write_restart

!========================================================================================

subroutine write_rest_pfile(restart_file)
subroutine write_rest_pfile(restart_file, yr_spec, mon_spec, day_spec, sec_spec)

! Write the restart pointer file

use cam_initfiles, only: rest_pfile

use cam_instance, only: inst_suffix
use filenames, only: interpret_filename_spec
character(len=*), intent(in) :: restart_file
integer, optional, intent(in) :: yr_spec ! Simulation year
integer, optional, intent(in) :: mon_spec ! Simulation month
integer, optional, intent(in) :: day_spec ! Simulation day
integer, optional, intent(in) :: sec_spec ! Seconds into current simulation day

integer :: nsds, ierr
character(len=CL) :: rest_pfile
character(len=*), parameter :: sub='write_rest_pfile'
!---------------------------------------------------------------------------

if (masterproc) then

rest_pfile = interpret_filename_spec('rpointer.cam'//trim(inst_suffix)//'.'//'%y-%m-%d-%s',&
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
nsds = getunit()
call opnfil(rest_pfile, nsds, 'f')
rewind nsds
Expand Down
Loading

0 comments on commit f429ebf

Please sign in to comment.