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

CAM4 Model History Files?

njujyq@163_com

New Member
I want to get all possible varabile of the CAM4

It is provided in CAM3 user guide

But I do not find it in CAM4 user guide

where can i find it?
 

eaton

CSEG and Liaisons
Look in the CAM output log file (you need to run cam to generate a log file). Search for the string "MASTER FIELD LIST". Following that string will be the complete list of available fields. And following that will be the lists of fields that are actually being written to each of the history files. The content of the first 6 files can be customized by the use of the finclN and fexclN namelist variables. The 7th file is the initial condition file which has contents that are hard coded.
 
Does anyone know of an easy way to get to all the long names for the full variable list? The master field list in the log file only has the short names and units, which is not enough description in many cases.

I tried one (very short) CAM run with all 500+ fields in the history file, but that doesn't seem to work. I get a PIO error when it tries to write to h1 with all 500+ fields.

Otherwise I could try using grep/find through all the fortran files - "call addfld" appears to be where the long names are actually defined, but some of the calls are split across multiple lines so this isn't so simple.
 

eaton

CSEG and Liaisons
I recently updated the CAM5 User's Guide with tables of the output fields, including long names, for several configurations.

http://www.cesm.ucar.edu/models/cesm1.0/cam/docs/users_guide/ug.html#hist_fields

Another way to obtain the long names is to make a small modification to the code that writes the master field list to the log file. For CAM5, at line 508 in cam_history.F90 modify the following lines:


Code:
write(iulog,9000)f,listentry%field%name,listentry%field%units
9000        format (i5,1x,a19,1x, a8 )
to read


Code:
write(iulog,9000)f,listentry%field%name,listentry%field%units, &
                          listentry%field%long_name
9000        format (i5,1x,a19,1x,a8,2x,a256)
A similar change will work in the CAM4 code base.
 
Top