diff --git a/.gitmodules b/.gitmodules index 817bb1ff6b..0176e8431c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -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 diff --git a/cime b/cime index 1236c0fede..b2f271b174 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 1236c0feded460aef3e5bdba18e4b850f1997346 +Subproject commit b2f271b1742533715a05701b1bdd80a24bb2ad77 diff --git a/components/cdeps b/components/cdeps index f6bc97483a..0750c91753 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit f6bc97483a1bfb7352c6c5610a13ed898a86990b +Subproject commit 0750c9175395d3ba3bf8eba65703dee230d08572 diff --git a/components/clm b/components/clm index 16cf4ac469..f437651ee4 160000 --- a/components/clm +++ b/components/clm @@ -1 +1 @@ -Subproject commit 16cf4ac469614f4b329c7da206c3d6b9b773bb03 +Subproject commit f437651ee449789af9325882bb0acc09576c9411 diff --git a/components/cmeps b/components/cmeps index 1355710f04..a91cedfe58 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 1355710f04fa6286a13e8056e35c6736e7250e3d +Subproject commit a91cedfe58658a9fc391195481137a2d83372c25 diff --git a/doc/ChangeLog b/doc/ChangeLog index 746fead140..cf2aa2517d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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 diff --git a/share b/share index f6f31fd61c..a48ff8790a 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit f6f31fd61cb8f80aee97311fcca64b3e26b0202c +Subproject commit a48ff8790a21d3831873ed9f023a43c606a1ef03 diff --git a/src/control/cam_initfiles.F90 b/src/control/cam_initfiles.F90 index 3b48f1ab0e..08de6340ad 100644 --- a/src/control/cam_initfiles.F90 +++ b/src/control/cam_initfiles.F90 @@ -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 = ' ' @@ -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' @@ -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) diff --git a/src/control/cam_restart.F90 b/src/control/cam_restart.F90 index 124cf3b4b5..35087aa89b 100644 --- a/src/control/cam_restart.F90 +++ b/src/control/cam_restart.F90 @@ -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) @@ -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 diff --git a/src/cpl/nuopc/atm_comp_nuopc.F90 b/src/cpl/nuopc/atm_comp_nuopc.F90 index 8b2ba903d0..bfde73912d 100644 --- a/src/cpl/nuopc/atm_comp_nuopc.F90 +++ b/src/cpl/nuopc/atm_comp_nuopc.F90 @@ -1296,51 +1296,51 @@ subroutine ModelSetRunClock(gcomp, rc) call ESMF_LogWrite(subname//'setting alarms for' // trim(name), ESMF_LOGMSG_INFO) !---------------- - ! Restart alarm + ! Stop alarm !---------------- - call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) restart_n + read(cvalue,*) stop_n - call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) restart_ymd + read(cvalue,*) stop_ymd - call alarmInit(mclock, restart_alarm, restart_option, & - opt_n = restart_n, & - opt_ymd = restart_ymd, & + call alarmInit(mclock, stop_alarm, stop_option, & + opt_n = stop_n, & + opt_ymd = stop_ymd, & RefTime = mcurrTime, & - alarmname = 'alarm_restart', rc=rc) + alarmname = 'alarm_stop', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc) + call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return !---------------- - ! Stop alarm + ! Restart alarm !---------------- - call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) stop_n + read(cvalue,*) restart_n - call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) stop_ymd + read(cvalue,*) restart_ymd - call alarmInit(mclock, stop_alarm, stop_option, & - opt_n = stop_n, & - opt_ymd = stop_ymd, & + call alarmInit(mclock, restart_alarm, restart_option, & + opt_n = restart_n, & + opt_ymd = restart_ymd, & RefTime = mcurrTime, & - alarmname = 'alarm_stop', rc=rc) + alarmname = 'alarm_restart', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc) + call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return end if @@ -1967,8 +1967,8 @@ subroutine cam_write_clockrest( clock, yr_spec, mon_spec, day_spec, sec_spec, rc call shr_cal_ymd2date(yy,mm,dd,start_ymd) call ESMF_TimeGet( nextTime, yy=yy, mm=mm, dd=dd, s=curr_tod, rc=rc ) - !call ESMF_TimeGet( currTime, yy=yy, mm=mm, dd=dd, s=curr_tod, rc=rc ) if (ChkErr(rc,__LINE__,u_FILE_u)) return + call shr_cal_ymd2date(yy,mm,dd,curr_ymd) ! Open clock info restart dataset @@ -1976,13 +1976,16 @@ subroutine cam_write_clockrest( clock, yr_spec, mon_spec, day_spec, sec_spec, rc yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec ) if (masterproc) then + restart_pfile = interpret_filename_spec('rpointer.cpl.%y-%m-%d-%s',& + yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec ) + write(iulog,*) " In this configuration, there is no mediator" write(iulog,*) " Normally, the mediator restart file provides the restart time info" write(iulog,*) " In this case, CAM will create the rpointer.cpl and cpl restart file" write(iulog,*) " containing this information" write(iulog,*) " writing rpointer file for driver clock info, rpointer.cpl" write(iulog,*) " writing restart clock info for driver= "//trim(restart_file) - open(newunit=unitn, file='rpointer.cpl', form='FORMATTED') + open(newunit=unitn, file=trim(restart_pfile), form='FORMATTED') write(unitn,'(a)') trim(restart_file) close(unitn) endif