Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

CTSM restart using LILAC coupler

Yuan Sun

Yuan Sun
Active Member
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
 
Top