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

Using history files as initial conditions in cesm1

Camille013

Camille Hankel
New Member
I'm trying to do a CESM1.2.2.1 startup run (B1850 compset) using history files from a previous run of mine (unfortunately I don't have the necessary restart files to just do a branch run). My idea was just to set the appropriate initial condition namelist variables for the atmosphere, ice, and ocean components (i.e. 'ncdata', 'ice_ic', and 'init_ts_file'), but I seem to be getting the following error. Is there something else I need to do to initialize the ocean component correctly? (note, I did set init_ts_file_format = 'nc')

From the cesm.log I get:

"60:POP aborting...
60: Error in getting varid for netCDF field"

The ocn.log file doesn't contain any error information, the last line is just:
"Initial 3-d T,S read from file: /glade/{my file path}"

Thanks in advance!
Camille
 

klindsay

CSEG and Liaisons
Staff member
The POP source code for initializing from a file has hardwired variable names for potential temperature and salinity, TEMPERATURE and SALINITY respectively, that differ from the variable names in the history files, TEMP and SALT respectively. So the variable names need to be changed for POP to be able to read them. Also, when POP reads this file, it doesn't check for or apply the scale_factor attribute that is present in POP history file output. So if you use a POP history file that has the scale_factor on SALT, POP won't initialize the model properly. So do the following:

ncpdq -O -U -v TEMP,SALT histfile_name pop_ic.nc # ncpdq -U unpacks, i.e., applies scale_factor
ncrename -v TEMP,TEMPERATURE -v SALT,SALINITY pop_ic.nc

Then set init_ts_file in user_nl_pop to the full path of pop_ic.nc, and set init_ts_file_fmt = 'nc' (as you are already doing).
 

Camille013

Camille Hankel
New Member
Thank you, this solved my problem! Do you happen to know if there are any similar steps I need to take for setting the ice initial condition? The ocean module now initializes properly, but the ice module similarly stops working (with no error message in the ice log file) on the read of the initial condition (the last line of output is "Using restart dump= <my file>").

Thank you again.
 
Top