Spinning up the CLM4.0 biogeochemistry Carbon-Nitrogen Model (CN spinup)

To get the CLM4.0-CN model to a steady state, you first run it from arbitrary initial conditions using the "accelerated decomposition spinup" (-spinup AD in CLM configure) mode for 600 simulation years. After this you branch from this mode in the "exit spinup" (-spinup exit in CLM configure), run for a simulation year, and then save a restart from that and use it as initial conditions for further spinup of CN (at least 50 simulation years).

Spinup of CLM4.0-CN

  1. AD_SPINUP

    For the first step of running 600 years in "-spinup AD" mode, you will setup a case, and then edit the values in env_build.xml and env_run.xml so that the right configuration is turned on and the simulation is setup to run for the required length of simulation time. So do the following:

    Example 4-5. Example AD_SPINUP Simulation for CLM4.0-CN

    
> cd scripts
    > ./create_newcase -case CN_spinup -res f19_g16 -compset ICN -mach yellowstone_intel
    > cd CN_spinup
    # Append "-spinup AD" to CLM_CONFIG_OPTS
    > ./xmlchange CLM_CONFIG_OPTS="-spinup AD" -append
    # The following sets CLM_FORCE_COLDSTART to "on" (you could also use an editor)
    > ./xmlchange CLM_FORCE_COLDSTART=on
    # Make the output history files only annual, by adding the following to the user_nl_clm namelist
    > echo 'hist_nhtfrq = -8760' >> user_nl_clm
    # Now setup
    > ./cesm_setup -case
    # Now build
    > ./CN_spinup.build
    # The following sets RESUBMIT to 30 times in env_run.xml (you could also use an editor)
    # The following sets STOP_DATE,STOP_N and STOP_OPTION to Jan/1/601, 20, "nyears" in env_run.xml (you could also use an editor)
    > ./xmlchange RESUBMIT=30,STOP_N=20,STOP_OPTION=nyears,STOP_DATE=6010101
    # Now run normally
    > ./CN_spinup.submit
    
    Afterwards save the last restart file from this simulation to use in the next step.

  2. EXIT_SPINIP

    Example 4-6. Example EXIT_SPINUP Simulation for CLM4.0-CN

    
> cd scripts
    > ./create_newcase -case CN_exitspinup -res f19_g16 -compset ICN -mach yellowstone_intel
    > cd CN_exitspinup
    # Append "-spinup exit" to CLM_CONFIG_OPTS
    > ./xmlchange CLM_CONFIG_OPTS="-spinup exit" -append
    # Change run type to branch and branch from the last year of the last simulation
    > ./xmlchange RUN_TYPE=branch,RUN_REFCASE=CN_spinup,RUN_REFDATE=0601-01-01,GET_REFCASE=FALSE
    > ./cesm_setup
    # Go ahead and build, so that the run directory is created
    > ./CN_exitspinup.build
    # Now, Copy the last restart files from the earlier case into your run directory
    > cp /ptmp/$LOGIN/archive/CN_spinup/rest/CN_spinup.*.r*.0601-01-01-00000* /ptmp/$LOGIN/CN_exitspinup
    # And copy the rpointer files for datm and drv from the earlier case
    > cp /ptmp/$LOGIN/archive/CN_spinup/rest/rpointer.atm /ptmp/$LOGIN/CN_exitspinup
    > cp /ptmp/$LOGIN/archive/CN_spinup/rest/rpointer.drv /ptmp/$LOGIN/CN_exitspinup
    # The following sets STOP_OPTION to "nyears" in env_run.xml (you could also use an editor)
    > ./xmlchange STOP_OPTION=nyears,STOP_N=1
    # Now run normally
    > ./CN_exitspinup.submit
    

  3. Final spinup for CLM4.0-CN

    Next save the last restart file from this step and use it as the "finidat" file to use for one more spinup for at least 50 years in normal mode. So do the following:

    Example 4-7. Example Final CN Spinup Simulation for CLM4.0-CN

    
> cd scripts
    > ./create_newcase -case CN_finalspinup -res f19_g16 -compset ICN -mach yellowstone_intel
    > cd CN_finalspinup
    # The following sets CLM_FORCE_COLDSTART to "on" in env_build.xml (you could also use an editor)
    > ./xmlchange CLM_FORCE_COLDSTART=on
    # Now, Copy the last CLM restart file from the earlier case into your run directory
    > cp /ptmp/$LOGIN/archive/CN_exitspinup/rest/CN_exitspinup.clm*.r*.0602-01-01-00000.nc \
    /ptmp/$LOGIN/CN_finalspinup
    # And copy the rpointer files for datm and drv from the earlier case
    > cp /ptmp/$LOGIN/archive/CN_exitspinup/rest/rpointer.atm /ptmp/$LOGIN/CN_finalspinup
    > cp /ptmp/$LOGIN/archive/CN_exitspinup/rest/rpointer.drv /ptmp/$LOGIN/CN_finalspinup
    # Set the finidat file to the last restart file saved in previous step
    > echo ' finidat = "CN_exitspinup.clm2.r.0602-01-01-00000.nc"' > user_nl_clm
    # Now setup
    > ./cesm_setup
    > $EDITOR Buildconf/clm.buildnml.csh
    > Now build
    > .CN_finalspinup.build
    # The following sets RESUBMIT to 5 times in env_run.xml (you could also use an editor)
    # The following sets STOP_N and STOP_OPTION to 10 and "nyears" in env_run.xml (you could also use an editor)
    > ./xmlchange RESUBMIT=5,STOP_OPTION=nyears,STOP_N=10
    > Now run as normal
    > .CN_finalspinup.submit
    

    To assess if the model is spunup plot trends of CN variables of interest. If you see a trend, you may need to run the simulation longer. Finally save the restart file from the end of this simulation to use as an "finidat" file for future simulations.