What version of the code are you using?
ctsm5.3.024
Describe every step you took leading up to the problem:
Hi all,
I know LILAC is of low priority so far. But I appreciate your patience and insights for my understanding of the CTSM restart.
I tried to restart WRF-CTSM simulation but met an error:
******** CLM Time Manager Configuration ********
Calendar type: GREGORIAN
Timestep size (seconds): 6
Start date (yr mon day tod): 2022 1 19 0
Reference date (yr mon day tod): 2022 1 19 0
Current step number: 0
Current date (yr mon day tod): 2022 1 19 0
************************************************
(GETFIL): attempting to find local file
ctsm_lilac.clm2.r.2022-01-19-00000.nc
(GETFIL): using ctsm_lilac.clm2.r.2022-01-19-00000.nc in current working directory
Reading restart dataset: ctsm_lilac.clm2.r.2022-01-19-00000.nc
Opened existing file ctsm_lilac.clm2.r.2022-01-19-00000.nc 140
ERROR: clm::timemgr_restartERROR: mismatch in start date with restart file
I traced the code in CTSM/src/cpl/lilac/lnd_comp_esmf.F90, where:
if (trim(starttype) == trim('startup')) then
nsrest = nsrStartup
else if (trim(starttype) == trim('continue') ) then
nsrest = nsrContinue
else
call shr_sys_abort( subname//' ERROR: unknown starttype'//trim(starttype) )
end if
The code sets a restart LILAC-CTSM simulation in a continue mode, using ctsm_lilac.clm2.r.CURRENT_DATE-TOD.nc, ctsm_lilac.lilac.r.CURRENT_DATE-TOD.nc, and ctsm_lilac.clm2.rh0.CURRENT_DATE-TOD.nc. But WRF did not save any start date or reference date information for restart as CTSM.
So I modified the code to:
if (trim(starttype) == trim('startup')) then
nsrest = nsrStartup
else if (trim(starttype) == trim('continue') ) then
nsrest = nsrBranch
else
call shr_sys_abort( subname//' ERROR: unknown starttype'//trim(starttype) )
end if
The modified code restarts CTSM in a branch mode, requiring only ctsm_lilac.clm2.r.CURRENT_DATE-TOD.nc, ctsm_lilac.lilac.r.CURRENT_DATE-TOD.nc. I manipulated the start_ymd in these two files to the current date. Since manipulated restart files have the same start date, reference date, and current date, WRF-CTSM restart simulation worked successfully.
******** CLM Time Manager Configuration ********
Calendar type: GREGORIAN
Timestep size (seconds): 6
Start date (yr mon day tod): 2022 1 19 0
Reference date (yr mon day tod): 2022 1 19 0
Current step number: 0
Current date (yr mon day tod): 2022 1 19 0
************************************************
(GETFIL): attempting to find local file
ctsm_lilac.clm2.r.2022-01-19-00000.nc
(GETFIL): using ctsm_lilac.clm2.r.2022-01-19-00000.nc in current working directory
Reading restart dataset: ctsm_lilac.clm2.r.2022-01-19-00000.nc
Opened existing file ctsm_lilac.clm2.r.2022-01-19-00000.nc 140
Skip balance checking for the first 601 time steps
My concerns are that:
1) Is this manipulation correct?
2) Will restarting CTSM in a branch type provide initial conditions as precise as in a continue type.
Thanks for any comments.
Best,
Yuan
ctsm5.3.024
Describe every step you took leading up to the problem:
Hi all,
I know LILAC is of low priority so far. But I appreciate your patience and insights for my understanding of the CTSM restart.
I tried to restart WRF-CTSM simulation but met an error:
******** CLM Time Manager Configuration ********
Calendar type: GREGORIAN
Timestep size (seconds): 6
Start date (yr mon day tod): 2022 1 19 0
Reference date (yr mon day tod): 2022 1 19 0
Current step number: 0
Current date (yr mon day tod): 2022 1 19 0
************************************************
(GETFIL): attempting to find local file
ctsm_lilac.clm2.r.2022-01-19-00000.nc
(GETFIL): using ctsm_lilac.clm2.r.2022-01-19-00000.nc in current working directory
Reading restart dataset: ctsm_lilac.clm2.r.2022-01-19-00000.nc
Opened existing file ctsm_lilac.clm2.r.2022-01-19-00000.nc 140
ERROR: clm::timemgr_restartERROR: mismatch in start date with restart file
I traced the code in CTSM/src/cpl/lilac/lnd_comp_esmf.F90, where:
if (trim(starttype) == trim('startup')) then
nsrest = nsrStartup
else if (trim(starttype) == trim('continue') ) then
nsrest = nsrContinue
else
call shr_sys_abort( subname//' ERROR: unknown starttype'//trim(starttype) )
end if
The code sets a restart LILAC-CTSM simulation in a continue mode, using ctsm_lilac.clm2.r.CURRENT_DATE-TOD.nc, ctsm_lilac.lilac.r.CURRENT_DATE-TOD.nc, and ctsm_lilac.clm2.rh0.CURRENT_DATE-TOD.nc. But WRF did not save any start date or reference date information for restart as CTSM.
So I modified the code to:
if (trim(starttype) == trim('startup')) then
nsrest = nsrStartup
else if (trim(starttype) == trim('continue') ) then
nsrest = nsrBranch
else
call shr_sys_abort( subname//' ERROR: unknown starttype'//trim(starttype) )
end if
The modified code restarts CTSM in a branch mode, requiring only ctsm_lilac.clm2.r.CURRENT_DATE-TOD.nc, ctsm_lilac.lilac.r.CURRENT_DATE-TOD.nc. I manipulated the start_ymd in these two files to the current date. Since manipulated restart files have the same start date, reference date, and current date, WRF-CTSM restart simulation worked successfully.
******** CLM Time Manager Configuration ********
Calendar type: GREGORIAN
Timestep size (seconds): 6
Start date (yr mon day tod): 2022 1 19 0
Reference date (yr mon day tod): 2022 1 19 0
Current step number: 0
Current date (yr mon day tod): 2022 1 19 0
************************************************
(GETFIL): attempting to find local file
ctsm_lilac.clm2.r.2022-01-19-00000.nc
(GETFIL): using ctsm_lilac.clm2.r.2022-01-19-00000.nc in current working directory
Reading restart dataset: ctsm_lilac.clm2.r.2022-01-19-00000.nc
Opened existing file ctsm_lilac.clm2.r.2022-01-19-00000.nc 140
Skip balance checking for the first 601 time steps
My concerns are that:
1) Is this manipulation correct?
2) Will restarting CTSM in a branch type provide initial conditions as precise as in a continue type.
Thanks for any comments.
Best,
Yuan