How do I change history file output frequency and content for CAM and CLM during a run?

If you want to change the frequency of output for CAM or CLM (i.e. generate output every 6 model hours instead of once a model day) in the middle of a run, or if you want to change the fields that are output, in the middle of a run, you need to stop the run, rebuild and rerun it with the same casename and branch from the same casename. See the steps below for doing a branch run while retaining the casename.

Rebuilding the case and restarting it where you left off, are necessary because CAM and CLM only read namelist variables once, at the beginning of a run. This is not the case for POP and CICE, they read the namelist input on every restart, and therefore for POP and CICE, you can change output fields and frequency by modifying the appropriate namelist variables and then doing a restart.

The following example shows case B40.20th.1deg which runs from 1850 to 2005, and will generate high frequency output for years 1950 through 2005. CAM will output data every six hours instead of once a day. Also starting at year 1950 additional fields will be output by the model.

  1. The first step is to create case b40.20th.1deg and run the case for years 1850 through 1949 with your initial settings for output.

  2. Next move your entire case directory, $CASEDIR, somewhere else, because you need to rebuild and rerun the case using the same name.

> cd $CASEDIR 
    > mv b40.20th.1deg b40.20th.1deg.1850-1949
  3. Now move your run directory, $RUNDIR, somewhere else as well.

> cd $RUNDIR 
    > mv b40.20th.1deg b40.20th.1deg.1850-1949
  4. Next create a new case in your case directory with the same name, b40.20th.1deg.

> cd $CASEDIR/scripts
    > create_newcase -mach yellowstone -compset B_1850-2000_CN -res f09_g16 -case b40.20th.1deg 
    cd $RUNDIR
  5. Next edit the namelist file, env_conf.xml, in the run directory, $RUNDIR, as follows:

> cd $RUNDIR
    > xmlchange -file env_conf.xml -id RUN_TYPE -val 'branch'
    > xmlchange -file env_conf.xml -id RUN_REFCASE -val 'b40.20th.1deg'
    > xmlchange -file env_conf.xml -id RUN_REFDATE -val '1948-01-01'
    > xmlchange -file env_conf.xml -id CAM_NML_USE_CASE -val '1850-2005_cam4'
    > xmlchange -file env_conf.xml -id BRNCH_RETAIN_CASENAME -val 'TRUE'
    > xmlchange -file env_conf.xml -id GET_REFCASE -val 'FALSE'
  6. Next configure the case and edit the coupler and CAM namelists.

    1. Configure case.

   > configure -case
    2. Edit Buildconf/cpl.buildnml.csh. Replace existing brnch_retain_casename line with the following line brnch_retain_casename = .true.

      Edit Buildconf/cam.buildnml.csh. Check that bndtvghg = '$DIN_LOC_ROOT' and add:

             doisccp = .true.        
             isccpdata = '/fis/cgd/cseg/csm/inputdata/atm/cam/rad/'        
             mfilt   = 1,365,30,120,240        
             nhtfrq  = 0,-24,-24,-6,-3        
             fincl2  = 'TREFHTMN','TREFHTMX','TREFHT','PRECC','PRECL','PSL'        
             fincl3  = 'CLDICE','CLDLIQ','CLDTOT','CLOUD','CMFMC','CMFMCDZM','FISCCP1',        
             fincl4  = 'PS:I','PSL:I','Q:I','T:I','U:I','V:I','Z3:I'        
             fincl5  = 'CLDTOT','FLDS','FLDSC','FLNS','FLNSC','FSDS','FSDSC','FSNS',        

  1. Now build and run the case.

> b40.20th.1deg.$
    > bsub < b40.20th.1deg.$