Skip to content

Commit 19d89c7

Browse files
peverwheeSteve Goldhaber
authored andcommitted
ESCOMP tag: cam6_4_048
Merge pull request ESCOMP#1147 from jedwards4b/timestamp_in_rpointer_name cam6_4_048: Timestamp in rpointer name ESCOMP commit: f429ebf
1 parent bc0c1a4 commit 19d89c7

File tree

9 files changed

+203
-58
lines changed

9 files changed

+203
-58
lines changed

components/clm

Submodule clm updated 734 files

doc/ChangeLog

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,142 @@
11
===============================================================
22

3+
Tag name: cam6_4_048
4+
Originator(s): jedwards4b, peverwhee
5+
Date: 20 December 2024
6+
One-line Summary: Timestamp in rpointer name
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1147
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
#1146 - Add timestep to rpointer file name
11+
- Updates to externals, nuopc cap, and cam control code to handle timestamp in
12+
rpointer file
13+
14+
Describe any changes made to build system: N/A
15+
16+
Describe any changes made to the namelist: N/A
17+
18+
List any changes to the defaults for the boundary datasets: N/A
19+
20+
Describe any substantial timing or memory changes: N/A
21+
22+
Code reviewed by: brian-eaton
23+
24+
List all files eliminated: N/A
25+
26+
List all files added and what they do: N/A
27+
28+
List all existing files that have been modified, and describe the changes:
29+
M .gitmodules
30+
- update externals for rpointer mods
31+
- cime6.1.49
32+
- cmeps1.0.32
33+
- cdeps1.0.61
34+
- share1.1.6
35+
- ctsm5.3.016
36+
37+
M src/control/cam_initfiles.F90
38+
- look for new timestamped rpointer file
39+
40+
M src/control/cam_restart.F90
41+
- remove unnecessary conditionals for optional variables
42+
43+
M src/cpl/nuopc/atm_comp_nuopc.F90
44+
- update variable names coming from coupler
45+
46+
If there were any failures reported from running test_driver.sh on any test
47+
platform, and checkin with these failures has been OK'd by the gatekeeper,
48+
then copy the lines from the td.*.status files for the failed tests to the
49+
appropriate machine below. All failed tests must be justified.
50+
51+
derecho/intel/aux_cam:
52+
53+
ERC_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq3s_cosp (Overall: NLFAIL) details:
54+
ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s (Overall: NLFAIL) details:
55+
ERC_D_Ln9.f19_f19_mg17.QPX2000.derecho_intel.cam-outfrq3s (Overall: NLFAIL) details:
56+
ERC_D_Ln9.ne16_ne16_mg17.FADIAB.derecho_intel.cam-terminator (Overall: NLFAIL) details:
57+
ERC_D_Ln9.ne16_ne16_mg17.QPC5HIST.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
58+
ERC_D_Ln9_P144x1.ne16pg3_ne16pg3_mg17.QPC6HIST.derecho_intel.cam-outfrq3s_ttrac_usecase (Overall: NLFAIL) details:
59+
ERC_D_Ln9.T42_T42_mg17.FDABIP04.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
60+
ERC_D_Ln9.T42_T42_mg17.FHS94.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
61+
ERI_D_Ln18.f45_f45_mg37.QPC41850.derecho_intel.cam-co2rmp_usecase (Overall: NLFAIL) details:
62+
ERP_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
63+
ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
64+
ERP_Ld3.f09_f09_mg17.FWHIST.derecho_intel.cam-reduced_hist1d (Overall: NLFAIL) details:
65+
ERS_Ln9.ne0TESTONLYne5x4_ne0TESTONLYne5x4_mg37.FADIAB.derecho_intel.cam-outfrq3s_refined (Overall: NLFAIL) details:
66+
SCT_D_Ln7.ne3_ne3_mg37.QPC5.derecho_intel.cam-scm_prep (Overall: NLFAIL) details:
67+
SCT_D_Ln7.T42_T42_mg17.QPC5.derecho_intel.cam-scm_prep (Overall: NLFAIL) details:
68+
SMS_D_Ld2.f19_f19_mg17.QPC5HIST.derecho_intel.cam-volc_usecase (Overall: NLFAIL) details:
69+
SMS_D_Ld5.f19_f19_mg17.PC4.derecho_intel.cam-cam4_port5d (Overall: NLFAIL) details:
70+
SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
71+
SMS_D_Ln9.f19_f19_mg17.QPC5M7.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
72+
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
73+
SMS_Ld5.f09_f09_mg17.PC6.derecho_intel.cam-cam6_port_f09 (Overall: NLFAIL) details:
74+
SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging (Overall: NLFAIL) details:
75+
SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s (Overall: NLFAIL) details:
76+
SMS_Ln9.f19_f19.F2000climo.derecho_intel.cam-silhs (Overall: NLFAIL) details:
77+
- NL diffs due to CMEPS & CTSM external updates
78+
79+
ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
80+
ERP_Ld3.ne30pg3_ne30pg3_mg17.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa (Overall: DIFF) details:
81+
ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
82+
ERP_Ln9.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 (Overall: DIFF) details:
83+
ERP_Ln9.f09_f09_mg17.F1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
84+
ERP_Ln9.f09_f09_mg17.F2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
85+
ERP_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
86+
ERP_Ln9.f09_f09_mg17.FHIST_BDRD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
87+
ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
88+
ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
89+
ERP_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
90+
ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
91+
ERS_Ln9.f19_f19_mg17.FSPCAMS.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
92+
ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
93+
ERS_Ln9_P288x1.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 (Overall: DIFF) details:
94+
SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday (Overall: DIFF) details:
95+
SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
96+
SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
97+
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
98+
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 (Overall: DIFF) details:
99+
SMS_D_Ln9.ne16pg3_ne16pg3_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
100+
SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
101+
SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
102+
SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mg17.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust (Overall: DIFF) details:
103+
SMS_D_Ln9.T42_T42.FSCAMARM97.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
104+
SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
105+
SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
106+
SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
107+
SMS_Ln9.f19_f19_mg17.FHIST.derecho_intel.cam-outfrq9s_nochem (Overall: DIFF) details:
108+
SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp (Overall: DIFF) details:
109+
- Diffs due to updated CTSM external
110+
111+
SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie (Overall: FAIL)
112+
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL)
113+
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update.
114+
115+
ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL)
116+
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF)
117+
- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856
118+
119+
derecho/nvhpc/aux_cam:
120+
ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: DIFF) details:
121+
- Diffs due to updated CTSM external
122+
123+
izumi/nag/aux_cam: !!due to izumi being down and the desire to make a CESM alpha
124+
tag, the izumi tests were not run!! this changelog entry will be updated once
125+
the tests are run
126+
127+
izumi/gnu/aux_cam: !!due to izumi being down and the desire to make a CESM alpha
128+
tag, the izumi tests were not run!! this changelog entry will be updated once
129+
the tests are run
130+
131+
CAM tag used for the baseline comparison tests if different than previous
132+
tag:
133+
134+
Summarize any changes to answers: answer changes thanks to updated CTSM tag
135+
- ran derecho intel & nvhpc tests on head of cam_development with ctsm5.3.015 vs baselines for
136+
this tag and confirmed that there were no DIFFs
137+
138+
===============================================================
139+
3140
Tag name: cam6_4_047
4141
Originator(s): jedwards4b, fvitt
5142
Date: 19 November 2024

share

src/control/cam_initfiles.F90

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ module cam_initfiles
4242

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

45-
! The restart pointer file contains name of most recently written primary restart file.
46-
! The contents of this file are updated by cam_write_restart as new restart files are written.
47-
character(len=cl), public, protected :: rest_pfile
48-
4945
! Filename for initial restart file.
5046
character(len=cl) :: restart_file = ' '
5147

@@ -68,16 +64,20 @@ subroutine cam_initfiles_readnl(nlfile)
6864
use spmd_utils, only: mpicom, mstrid=>masterprocid, mpir8=>mpi_real8, &
6965
mpichar=>mpi_character, mpi_logical
7066
use cam_instance, only: inst_suffix
71-
67+
use filenames, only: interpret_filename_spec
68+
7269
character(len=*), intent(in) :: nlfile ! filepath for file containing namelist input
7370

7471
! Local variables
7572
integer :: unitn, ierr
76-
7773
character(len=cl) :: locfn
7874
logical :: filefound
7975
integer :: xtype
8076
integer(pio_offset_kind) :: slen
77+
logical :: found
78+
79+
! The restart pointer file contains name of most recently written primary restart file.
80+
character(len=cl) :: rest_pfile
8181

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

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

115-
! Set pointer file name based on instance suffix
116-
rest_pfile = './rpointer.atm' // trim(inst_suffix)
117-
118115
! Set name of primary restart file
119116
if (restart_run) then
120117
! Read name of restart file from pointer file
121118
if (masterproc) then
119+
rest_pfile = interpret_filename_spec("rpointer.cam"//trim(inst_suffix)//".%y-%m-%d-%s", prev=.true.)
120+
inquire(file=trim(rest_pfile),exist=found)
121+
if(.not. found) then
122+
write(iulog, "INFO : rpointer file "//trim(rest_pfile)//" not found.")
123+
rest_pfile = "rpointer.cam"//trim(inst_suffix)
124+
write(iulog, " Try looking for "//trim(rest_pfile)//" ...")
125+
inquire(file=trim(rest_pfile),exist=found)
126+
if(.not. found) then
127+
call endrun(sub // ': ERROR: rpointer file: '//trim(rest_pfile) // ' not found')
128+
endif
129+
endif
122130
unitn = getunit()
123131
call opnfil(rest_pfile, unitn, 'f', status="old")
124132
read (unitn, '(a)', iostat=ierr) restart_file
125133
if (ierr /= 0) then
126-
call endrun(sub // ': ERROR: reading rpointer file')
134+
call endrun(sub // ': ERROR: reading rpointer file: '//trim(rest_pfile))
127135
end if
128136
close(unitn)
129137
call freeunit(unitn)

src/control/cam_restart.F90

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ subroutine cam_write_restart(cam_in, cam_out, dyn_out, pbuf2d, &
106106
! (%c = caseid, $y = year, $m = month, $d = day, $s = seconds in day, %t = number)
107107
rfilename_spec = '%c.cam' // trim(inst_suffix) //'.r.%y-%m-%d-%s.nc'
108108

109-
if (present(yr_spec).and.present(mon_spec).and.present(day_spec).and.present(sec_spec)) then
110-
fname = interpret_filename_spec( rfilename_spec, &
111-
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
112-
else
113-
fname = interpret_filename_spec( rfilename_spec )
114-
end if
109+
fname = interpret_filename_spec( rfilename_spec, &
110+
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
115111

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

135-
if (present(yr_spec).and.present(mon_spec).and.&
136-
present(day_spec).and.present(sec_spec)) then
137-
call write_restart_history(fh, yr_spec=yr_spec, mon_spec=mon_spec, &
138-
day_spec=day_spec, sec_spec= sec_spec )
139-
else
140-
call write_restart_history(fh)
141-
end if
131+
call write_restart_history(fh, yr_spec=yr_spec, mon_spec=mon_spec, &
132+
day_spec=day_spec, sec_spec= sec_spec )
142133

143134
! Close the primary restart file
144135
call pio_closefile(fh)
145136

146137
! Update the restart pointer file
147-
call write_rest_pfile(fname)
138+
call write_rest_pfile(fname, yr_spec=yr_spec, mon_spec=mon_spec, &
139+
day_spec=day_spec, sec_spec= sec_spec )
148140

149141
end subroutine cam_write_restart
150142

151143
!========================================================================================
152144

153-
subroutine write_rest_pfile(restart_file)
145+
subroutine write_rest_pfile(restart_file, yr_spec, mon_spec, day_spec, sec_spec)
154146

155147
! Write the restart pointer file
156-
157-
use cam_initfiles, only: rest_pfile
158-
148+
use cam_instance, only: inst_suffix
149+
use filenames, only: interpret_filename_spec
159150
character(len=*), intent(in) :: restart_file
151+
integer, optional, intent(in) :: yr_spec ! Simulation year
152+
integer, optional, intent(in) :: mon_spec ! Simulation month
153+
integer, optional, intent(in) :: day_spec ! Simulation day
154+
integer, optional, intent(in) :: sec_spec ! Seconds into current simulation day
160155

161156
integer :: nsds, ierr
157+
character(len=CL) :: rest_pfile
162158
character(len=*), parameter :: sub='write_rest_pfile'
163159
!---------------------------------------------------------------------------
164160

165161
if (masterproc) then
166-
162+
rest_pfile = interpret_filename_spec('rpointer.cam'//trim(inst_suffix)//'.'//'%y-%m-%d-%s',&
163+
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
167164
nsds = getunit()
168165
call opnfil(rest_pfile, nsds, 'f')
169166
rewind nsds

src/cpl/nuopc/atm_comp_nuopc.F90

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,51 +1296,51 @@ subroutine ModelSetRunClock(gcomp, rc)
12961296
call ESMF_LogWrite(subname//'setting alarms for' // trim(name), ESMF_LOGMSG_INFO)
12971297

12981298
!----------------
1299-
! Restart alarm
1299+
! Stop alarm
13001300
!----------------
1301-
call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc)
1301+
call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc)
13021302
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13031303

1304-
call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc)
1304+
call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc)
13051305
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1306-
read(cvalue,*) restart_n
1306+
read(cvalue,*) stop_n
13071307

1308-
call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc)
1308+
call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc)
13091309
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1310-
read(cvalue,*) restart_ymd
1310+
read(cvalue,*) stop_ymd
13111311

1312-
call alarmInit(mclock, restart_alarm, restart_option, &
1313-
opt_n = restart_n, &
1314-
opt_ymd = restart_ymd, &
1312+
call alarmInit(mclock, stop_alarm, stop_option, &
1313+
opt_n = stop_n, &
1314+
opt_ymd = stop_ymd, &
13151315
RefTime = mcurrTime, &
1316-
alarmname = 'alarm_restart', rc=rc)
1316+
alarmname = 'alarm_stop', rc=rc)
13171317
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13181318

1319-
call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc)
1319+
call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc)
13201320
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13211321

13221322
!----------------
1323-
! Stop alarm
1323+
! Restart alarm
13241324
!----------------
1325-
call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc)
1325+
call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc)
13261326
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13271327

1328-
call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc)
1328+
call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc)
13291329
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1330-
read(cvalue,*) stop_n
1330+
read(cvalue,*) restart_n
13311331

1332-
call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc)
1332+
call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc)
13331333
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1334-
read(cvalue,*) stop_ymd
1334+
read(cvalue,*) restart_ymd
13351335

1336-
call alarmInit(mclock, stop_alarm, stop_option, &
1337-
opt_n = stop_n, &
1338-
opt_ymd = stop_ymd, &
1336+
call alarmInit(mclock, restart_alarm, restart_option, &
1337+
opt_n = restart_n, &
1338+
opt_ymd = restart_ymd, &
13391339
RefTime = mcurrTime, &
1340-
alarmname = 'alarm_stop', rc=rc)
1340+
alarmname = 'alarm_restart', rc=rc)
13411341
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13421342

1343-
call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc)
1343+
call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc)
13441344
if (ChkErr(rc,__LINE__,u_FILE_u)) return
13451345

13461346
end if
@@ -1967,22 +1967,25 @@ subroutine cam_write_clockrest( clock, yr_spec, mon_spec, day_spec, sec_spec, rc
19671967
call shr_cal_ymd2date(yy,mm,dd,start_ymd)
19681968

19691969
call ESMF_TimeGet( nextTime, yy=yy, mm=mm, dd=dd, s=curr_tod, rc=rc )
1970-
!call ESMF_TimeGet( currTime, yy=yy, mm=mm, dd=dd, s=curr_tod, rc=rc )
19711970
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1971+
19721972
call shr_cal_ymd2date(yy,mm,dd,curr_ymd)
19731973

19741974
! Open clock info restart dataset
19751975
restart_file = interpret_filename_spec( '%c.cpl.r.%y-%m-%d-%s.nc', &
19761976
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
19771977

19781978
if (masterproc) then
1979+
restart_pfile = interpret_filename_spec('rpointer.cpl.%y-%m-%d-%s',&
1980+
yr_spec=yr_spec, mon_spec=mon_spec, day_spec=day_spec, sec_spec= sec_spec )
1981+
19791982
write(iulog,*) " In this configuration, there is no mediator"
19801983
write(iulog,*) " Normally, the mediator restart file provides the restart time info"
19811984
write(iulog,*) " In this case, CAM will create the rpointer.cpl and cpl restart file"
19821985
write(iulog,*) " containing this information"
19831986
write(iulog,*) " writing rpointer file for driver clock info, rpointer.cpl"
19841987
write(iulog,*) " writing restart clock info for driver= "//trim(restart_file)
1985-
open(newunit=unitn, file='rpointer.cpl', form='FORMATTED')
1988+
open(newunit=unitn, file=trim(restart_pfile), form='FORMATTED')
19861989
write(unitn,'(a)') trim(restart_file)
19871990
close(unitn)
19881991
endif

0 commit comments

Comments
 (0)