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

To get the CLMCN model to a steady state, you first run it from arbitrary initial conditions using the "accelerated decomposition spinup" (-ad_spinup in configure) mode for 600 simulation years. After this you branch from this mode in the "exit spinup" (-exit_spinup in 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 CLMCN

  1. AD_SPINUP

    For the first step of running 600 years in "-ad_spinup" mode, you will setup a case, and then edit the values in env_conf.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-3. Example AD_SPINUP Simulation

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

  2. EXIT_SPINIP

    Example 4-4. Example EXIT_SPINUP Simulation

    
> cd scripts
    > ./create_newcase -case CN_exitspinup -res f19_g16 -compset ICN -mach bluefire
    > cd CN_exitspinup
    # Append "-exit_spinup on" to CLM_CONFIG_OPTS in env_conf.xml
    > ./xmlchange -file env_conf.xml -id CLM_CONFIG_OPTS -val "-exit_spinup on" -append
    # Change run type to branch and branch from the last year of the last simulation
    > ./xmlchange -file env_conf.xml -id RUN_TYPE    -val branch
    > ./xmlchange -file env_conf.xml -id RUN_REFCASE -val CN_spinup
    > ./xmlchange -file env_conf.xml -id RUN_REFDATE -val 0601-01-01
    > ./xmlchange -file env_conf.xml -id GET_REFCASE -val FALSE
    > ./configure -case
    # Go ahead and build, so that the run directory is created
    > ./CN_exitspinup.bluefire.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 -file env_run.xml -id STOP_OPTION -val nyears
    > ./xmlchange -file env_run.xml -id STOP_N      -val 1
    # Now run normally
    > ./CN_exitspinup.bluefire.submit
    

  3. Final spinup

    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-5. Example Final CN Spinup Simulation

    
> cd scripts
    > ./create_newcase -case CN_finalspinup -res f19_g16 -compset ICN -mach bluefire
    > cd CN_finalspinup
    # The following sets CLM_FORCE_COLDSTART to "on" in env_conf.xml (you could also use an editor)
    > ./xmlchange -file env_conf.xml -id CLM_FORCE_COLDSTART -val 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 '&clm_inparm finidat = "CN_exitspinup.clm2.r.0602-01-01-00000.nc" /' > user_nl_clm
    # Now configure
    > ./configure -case
    > $EDITOR Buildconf/clm.buildnml.csh
    > Now build
    > .CN_finalspinup.bluefire.build
    # The following sets RESUBMIT to 5 times in env_run.xml (you could also use an editor)
    > ./xmlchange -file env_run.xml -id RESUBMIT -val 5
    # The following sets STOP_OPTION to "nyears" in env_run.xml (you could also use an editor)
    > ./xmlchange -file env_run.xml -id STOP_OPTION -val nyears
    # The following sets STOP_N to 10 years in env_run.xml (you could also use an editor)
    > ./xmlchange -file env_run.xml -id STOP_N -val 10
    > Now run as normal
    > .CN_finalspinup.bluefire.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.