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

Running CESM2.2 for a particular short run

nuvolet

Toni Viudez
Member
Hi all,

We are trying to run a short case using CESM2.2 in order to understand how to customize future simulations.

Our case is something like this:

./create_newcase --case cam60f2000_2days --compset F2000climo --res f09_f09_mg17
cd cam60f2000_2days
./case.setup

Then we want to modify the run time by a simulation for 2 days:

./xmlchange RUN_STARTDATE=20000101,STOP_OPTION=nhours,STOP_N=2,STOP_DATE=20000102

Then:

./case.build
./case.submit

Once our case is completed and we go to the $CASEROOT/cime/output/cam60f2000_2days/run/, we do not have more *.nc files than this:

finidat_interp_dest.nc
cam60f2000_2days.mosart.rh0.2000-01-01-10800.nc
cam60f2000_2days.mosart.r.2000-01-01-10800.nc
cam60f2000_2days.cice.r.2000-01-01-07200.nc
cam60f2000_2days.clm2.rh0.2000-01-01-07200.nc
cam60f2000_2days.clm2.r.2000-01-01-07200.nc
cam60f2000_2days.cam.rh0.2000-01-01-07200.nc
cam60f2000_2days.cam.r.2000-01-01-07200.nc
cam60f2000_2days.cam.rs.2000-01-01-07200.nc
cam60f2000_2days.cpl.r.2000-01-01-07200.nc
cam60f2000_2days.cism.tavg_helper.0000-00-00-00000.nc

Should we expect more files?.

Thanks in advance
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
All the files of the format {CASE}.{component}.r*.nc are restart files that are used to let users continue runs from where they previously ended. Diagnostic output is typically found in {CASE}.{component}.h*.nc, and you do not have any of those listed. I think the main reason you do not have any output in your run directory is that you set STOP_OPTION=nhours, which means you are running for 2 hours rather than two days. Try ./xmlchange STOP_OPTION=ndays to run for two days instead.

After running for two days, you might find that you still have no output in the run directory; by default, CESM may be using the short-term archiver to reorganize the output by component. I suspect you will have some files in $CASEROOT/cime/output/archive/cam60f2000_2days, but you can run ./xmlquery DOUT_S,DOUT_S_ROOT to find out for sure -- if DOUT_S=TRUE then the archiver is enabled,and output will be moved to DOUT_S_ROOT (otherwise output remains in the run directory).

Also note that most of the model output is written in monthly averages - so you should have some daily output available in your 2-day test run but if you run with STOP_N=1,STOP_OPTION=nmonths then you will be able to see the monthly fields as well.
 

nuvolet

Toni Viudez
Member
Ok, I made those changes before build the case like:

./xmlchange RUN_STARTDATE=20000101,STOP_OPTION=nmonths,STOP_N=1,STOP_DATE=20000102

Then I bust and submitted the case and now I do not have any *.nc files with the exception of:

cam60f2000_2_day_STOP_N_1_STOP_OPTION_nmonths.cism.tavg_helper.0000-00-00-00000.nc

Then I run ./xmlquery DOUT_S,DOUT_S_ROOT
with this output:

Results in group run_data_archive

DOUT_S: TRUE

Results in group run_dout

DOUT_S_ROOT: /$myroot/CESM2.2/cime/output/archive/cam60f2000_2_day_STOP_N_1_STOP_OPTION_nmonths

There I have several folders:

logs/
atm/
lnd/
ice/
ocn/
rof/
glc/
cpl/
esp/

all of them with another folder called hist/ and all of them are empty.

Thanks for your reply.
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
I'm surprised all of the hist/ directories are empty, maybe the short-term archiver isn't configured properly? The easiest thing to do would be to run ./xmlchange DOUT_S=FALSE from your case directory and then resubmit the job -- this will turn off the short-term archiver, and then then history files should remain in your run directory.
 

nuvolet

Toni Viudez
Member
I am still not getting the h*.nc files as a diagnostic outputs.
Where I could find all the option I use using the ./xmlchange command?.
Thanks in a advance for your reply.
 

nuvolet

Toni Viudez
Member
I'm surprised all of the hist/ directories are empty, maybe the short-term archiver isn't configured properly? The easiest thing to do would be to run ./xmlchange DOUT_S=FALSE from your case directory and then resubmit the job -- this will turn off the short-term archiver, and then then history files should remain in your run directory.
Hi Michael,

I still do not have those diagnostic *nc. files after doing what you suggested.
Do you think there is a test I should do in order to check if the CESM2.2 has been compiled correctly?. Or maybe there is another thing I should check before, like a more simple test to get these kind of files.

Thanks in advance for your responses and help.
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
From your case directory, could you run tail -n 15 CaseStatus and paste the results here? I'd also be interested to see the results of ./xmlquery -p STOP. The CaseStatus file contains information about the case -- every time you build the model or run the model, it is logged in that file (along with information about whether it completed successfully).

One possible issue is that you don't want to use STOP_DATE if you are relying on STOP_OPTION and STOP_N, so perhaps ./xmlchange STOP_DATE=-999 could help.
 

nuvolet

Toni Viudez
Member
From your case directory, could you run tail -n 15 CaseStatus and paste the results here? I'd also be interested to see the results of ./xmlquery -p STOP. The CaseStatus file contains information about the case -- every time you build the model or run the model, it is logged in that file (along with information about whether it completed successfully).

One possible issue is that you don't want to use STOP_DATE if you are relying on STOP_OPTION and STOP_N, so perhaps ./xmlchange STOP_DATE=-999 could help.
Hi,

Here it its the results after running tail n 15 CaseStatus:

[@mymachine cam60f2000_2days]$ tail -n 15 CaseStatus
---------------------------------------------------
2022-02-22 15:21:07: case.run starting
---------------------------------------------------
2022-02-22 15:21:12: model execution starting
---------------------------------------------------
2022-02-22 15:52:35: model execution success
---------------------------------------------------
2022-02-22 15:52:35: case.run success
---------------------------------------------------
2022-02-22 15:52:42: st_archive starting
---------------------------------------------------
2022-02-22 15:53:00: st_archive success
---------------------------------------------------
2022-02-22 15:53:00: case.submit success
---------------------------------------------------

And for ./xmlquery -p STOP:

[@mymachine cam60f2000_2days]$ ./xmlquery -p STOP
Results in group run_begin_stop_restart
STOP_DATE: 20000102
STOP_N: 2
STOP_OPTION: nhours

Thanks
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
Code:
STOP_N: 2
STOP_OPTION: nhours

There is no output because you are only running for two hours.

I think the main reason you do not have any output in your run directory is that you set STOP_OPTION=nhours, which means you are running for 2 hours rather than two days. Try ./xmlchange STOP_OPTION=ndays to run for two days instead.

you may also want to run ./xmlchange STOP_DATE=-999 to ensure the model is basing stop time on STOP_OPTION and STOP_N
 

nuvolet

Toni Viudez
Member
Thanks , I will try that instead.
Could I run the case from the same folder where I have this?.
Should from the same directory run again ./case.setup , then
./xmlchange RUN_STARTDATE=20000101,STOP_OPTION=nmonths,STOP_N=2,STOP_DATE=-999
Then:
./case.build
./case.submit

?..

Thanks in advance
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
You don't need to run ./case.setup or ./case.build, just the xmlchange call and then ./case.submit (the parameters that control how long the model runs for are runtime parameters, so they do not require a rebuild)
 
Top