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

Questions about model output

Shreya Bhowmick

Shreya Bhowmick
New Member
Hi everyone,

I have questions about customising the model output.
1) The atmospheric model output needs to be written on standard pressure levels and not default model levels. How to do that?
2) The time stamp on every monthly output (history) file is incremented exactly by 30 days right now which makes it difficult to be analyzed in GrADS. We need the the format YYYY_MM_DD and the DD to be 01 for every month.
3) How to select the restart file writing frequency? Right now the interim restart files are getting deleted and it needs to be controlled.

Thank you for your time,
Shreya
 

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi Shreya,

In response to your questions:

1. There is currently no way to directly output CAM quantities on pressure levels. Instead you’ll need to do this yourself as a post-processing step. There are several tools out there already that can do this for you depending on what language you are comfortable with. The one my group currently uses is the interp_hybrid_to_pressure function in the GeoCAT python library. A description of it can be found online here:


Alternatively, you can always do the interpolation yourself by first calculating the actual pressure value for each grid cell using the hybrid equation described here:


And then using your favorite 1-D interpolation tool to interpolate your variables of interest to whatever pressure levels you would like to have.

2. Are you referring to the "h0" files that are output by default, or are you generating additional files with higher-frequency output? The h0 files will always be monthly averages unless you explicitly change it, and should be incrementing by exactly one month each time. However, if you are outputting your own files you can control the number of entries in each non-h0 history file by using the mfilt namelist variable, which is described here (just search for “mfilt” and then click on the blue plus):


However, I don’t think CAM can currently output differently sized time amounts based on the month, so every output file will still have the same number of outputs. You also can change the date format in the file name itself by using the hfilename_spec, which should be described in that same website above, but that still wouldn’t fix the varying month problem. So sadly if you need the model output in that format you’ll likely just have to post-process it using the language or tool of your choice.

3. If you just want to save your interim restart files, then make sure the variable DOUT_S_SAVE_INTERIM_RESTART_FILES is set to TRUE in env_run.xml. Then you can control the frequency of restart file generation by setting REST_OPTION and REST_N in the same XML file.

Anyways, I hope that helps, and please let me know if you are still un-sure about any of my responses.

Thanks, and have a great day!

Jesse
 

Shreya Bhowmick

Shreya Bhowmick
New Member
Hi Jesse,

Thank you so much for the reply. I understood the first and second answer and I will try them out. Regarding the third reply, I did a 3 day run of a F compset making the changes in the env_run.xml file but I still got the restart file for the end day only when I wanted the restart file for 3 days. The file is attached. Can you please tell if anything is wrong in it?
Thank you for your time.

Have a nice day!
Shreya
 

Attachments

  • env_run.xml.txt
    22.1 KB · Views: 11

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi Shreya,

It looks like the issue is that your REST_OPTION and REST_N variables (which are also in env_run.xml) are set to match STOP_N and STOP_OPTION, which means only one set of restart files will be output at the end of the run regardless of any other settings. If instead you want restarts every day, for example, then set REST_N to one while keeping everything else the same.

Hope that helps, and good luck with the model run!

Jesse
 

Shreya Bhowmick

Shreya Bhowmick
New Member
Hi Jesse,

Your solution worked perfectly. Now all the restart files are saved. I have another question. I want to plot these restart files (preferably in GrADS), but the .nc files have variables in terms of pft, column, etc., not latitude and longitude. How can I plot these files to carry out sensitivity tests?

Thanks a lot for your time and patience!
Shreya
 

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi Shreya,

The restart files are designed for restarting the model at a particular model time or state, and generally can't be used for plotting. Instead you'll want to modify the CAM namelist (via the user_nl_cam file in your case directory) to output high frequency history files. A tutorial presentation describing the model namelists along with an example for how to modify the CAM history file output can be found online here:

https://www2.cesm.ucar.edu/events/t...Tutorial-2022-Namelist-code-modifications.pdf

You can start at the beginning if you want a high-level overview, otherwise you can start on slide 20 for the specific CAM namelist variables. Of course feel free to let me know if you any additional questions.

Thanks, and have a great day!

Jesse
 

CGL

CGL
Member
Hi Shreya,

The restart files are designed for restarting the model at a particular model time or state, and generally can't be used for plotting. Instead you'll want to modify the CAM namelist (via the user_nl_cam file in your case directory) to output high frequency history files. A tutorial presentation describing the model namelists along with an example for how to modify the CAM history file output can be found online here:

https://www2.cesm.ucar.edu/events/t...Tutorial-2022-Namelist-code-modifications.pdf

You can start at the beginning if you want a high-level overview, otherwise you can start on slide 20 for the specific CAM namelist variables. Of course feel free to let me know if you any additional questions.

Thanks, and have a great day!

Jesse
Hi Jesse!

I want to know how to output specific variable in default variable for cam. I don't see the way to output one or some specific variables in pdf, but add some variables. Because I want to output hourly Cloud data that means the dataset is huge(If I keep the default output.)

Thanks,
CGL
 
Top