CAM/CLM: 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 bluefire -compset B_1850-2000_CN -res f09_g16 -case b40.20th.1deg 
    cd $RUNDIR
    
  5. Next invoke the following commands

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

    1. Set up the case.

      
  > ./cesm_setup -case
        
    2. Edit user_nl_cpl. Add the following to the end of the file. brnch_retain_casename = .true.

      Edit user_nl_cam. Check that bndtvghg = '$DIN_LOC_ROOT' and add the following to the end of the file

      
       doisccp = .true.        
             isccpdata = '/fis/cgd/cseg/csm/inputdata/atm/cam/rad/isccp.tautab_invtau.nc'        
             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',        
                       'FLDS','FLDSC','FLNS','FLUT','FLUTC','FSDS','FSDSC','FSNS',        
                       'FSNSC','FSNTOA','FSNTOAC','LHFLX','OMEGA','OMEGA500',         
                       'PRECSC','PRECSL','PS','Q','QREFHT','RELHUM','RHREFHT','SHFLX',        
                       'SOLIN','T','TGCLDIWP','TGCLDLWP','U','V','Z3'        
             fincl4  = 'PS:I','PSL:I','Q:I','T:I','U:I','V:I','Z3:I'        
             fincl5  = 'CLDTOT','FLDS','FLDSC','FLNS','FLNSC','FSDS','FSDSC','FSNS',        
                       'LHFLX','PRECC','PRECL','PRECSC','PRECSL','SHFLX',        
                       'PS:I','QREFHT:I','TREFHT:I','TS:I'        
                        /
         

  1. Now build and run the case.

    
> b40.20th.1deg.build
    > bsub < b40.20th.1deg.run