I-case spinup CCSM4/CESM1.0.5

 Generating high-frequency output for I-case

The B-case will write all the high-frequency history fields that the I-case will need, written at 3hr intervals.  Per Dave Lawrence, you don't need half-hour solar output, if your are not doing prognostic CO2.  The difference btwn half-hour solar estimates, and interpolated 3-hr solar forcing can result in considerable GPP changes.  But if you are not worried about these changes, you can use the 3-hr solar fields, particularly since the half-hour solar fields require an enourmous amount of space for a 30y spinup.

Configuring a B-CASE for high frequency output

  • SourceMods/src.drv/ccsm_driver.F90 (or ccsm_comp_mod.F90 (clm4_0_21)) - tag dependent

    The I-case simulation (datm.buildnml.csh) needs monthly files with 3hr variables.
    The hi-freq coupler output is daily. 

Write  3hr variables (solar, prec, SA) needed for I-case (18vars)

character(CL) :: hist_a2x3hr_flds  = 'Sa_z:Sa_u:Sa_v:Sa_tbot:Sa_ptem:Sa_shum:Sa_dens:

    Sa_pbot:Sa_pslv:Faxa_lwdn:Faxa_swndr:Faxa_swvdr:
    Faxa_swndf:Faxa_swvdf:Faxa_rainc:Faxa_rainl:Faxa_snowc:Faxa_snowl'

 

  •   Buildconf/cpl.buildnml.csh

        histaux_a2x     = .false.
        histaux_a2x3hr  = .true.
        histaux_a2x3hrp = .false.

  • Run B-CASE with high-frequency output:

 

  • Check B-CASE output to be sure you extracted all the required 3 hrly variables:

        breeze-/biptmp/nanr/icase.mh6ka/hf_input/monthly % nh b40mh6ka1d002_3h.0899-01.nc | grep float
        float a2x3h_Sa_z(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_u(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_v(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_tbot(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_ptem(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_shum(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_dens(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_pbot(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_pslv(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_lwdn(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_rainc(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_rainl(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_snowc(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_snowl(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_swndr(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_swvdr(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_swndf(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_swvdf(time, a2x3h_ny, a2x3h_nx) ;

 

Post process HF daily files into monthly files

        src1:    concatFiles.pl         (See below)
        input:  /hf_input/dailyFiles
        output: /hf_input/monthlyFiles

Modify datm.buildnml.csh to point to your monthly HF driver files (see example script below)

 

Configuring an I-case to run from the B-case HF output

 I-case will spinup from scratch using AD_SPINUP for 600 yrs.
 Set cold start for spinup from scratch in I-case.

        Setup:
           spinup:    0001-0600 (AD_spinup)
           exit:        0601-0602 (AD_exit)
           normal:   0602-0800 (AD_off)

  be1005en.ucar.edu-/fis/cgd/cseg/csm/collections/cesm1_0_beta05/scripts %
        ./create_newcase -case /fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001
                        -res f09_g16
                        -compset I_1850_SPINUP_3HrWxHfHrSol_CN
                        -mach bluefire

  --  env_conf.xml
        be1005en.ucar.edu-/fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001 %
                diff env_conf.xml /ptmp/nanr/icase.mh6ka/
                < <entry id="DATM_MODE"   value="CPLHIST3HrWxHfHrSol"  />   
                > <entry id="DATM_MODE"   value="CPLHIST3HrWx"  />   

        % xmlchange -file env_conf.xml -id DATM_MODE -val CPLHIST3HrWx

        Notes:    startdate: 0001              !! b/c we are starting from scratch; "cold start"

        Default Compset points to: ls /fs/cgd/csm/inputdata/ccsm4_init/I1850CN_f09_g16_c100503/

Buildconf/cpl.buildnml.csh
        histaux_a2x3hr  = .false.
        orb_iyear_ad  =  -4050        !! Set to appropriate orbital year
        start_ymd      =  00010101  !! Start from year 1

 Buildconf/clm.buildnml.csh
        OLD:  finidat                = 'I1850CN_f09_g16_c100503.clm2.r.0001-01-01-00000.nc'
        NEW:  finidat                = ''              

 Buildconf/clm.buildexe.csh

Step1: AD_ON:   set clmdefs = "  -DMAXPATCH_PFT=numpft+1 -DPROGSSLT -DRTM -DDUST -DCN -DCLAMP -D_USEBOX -D_NETCDF -DSPMD -DAD_SPINUP"
Step2: AD_EXIT: set clmdefs = "  -DMAXPATCH_PFT=numpft+1 -DPROGSSLT -DRTM -DDUST -DCN -DCLAMP -D_USEBOX -D_NETCDF -DSPMD -DEXIT_SPINUP"
Step3: AD_OFF   set clmdefs = "  -DMAXPATCH_PFT=numpft+1 -DPROGSSLT -DRTM -DDUST -DCN -DCLAMP -D_USEBOX -D_NETCDF -DSPMD"


   1)  -- Turn on AD_SPINUP in clm.buildexe.csh and run 600 yrs (yr 601 restart).
       
   2)  -- Turn off AD_SPINUP in clm.buildexe.csh and turn on EXIT_SPINUP: rebuild and run 1yr;

   % Buildconf/clm.buildexe.csh

   -- Remove object code for clm (could also have run a clean_build.
        % cd /ptmp/nanr/i40.mh6ka.1deg.001/run/lnd
        % rm -r obj/

   -- Rebuild
        % cd /fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001/
        %  ./i40.mh6ka.1deg.001.build

   -- Run for 1 year to exit ADspinup
        % cd /fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001/
        % xmlchange -file env_run -id STOP_N -val 12

   3)  -- Turn off EXIT_SPINUP in clm.buildexe.csh and run normally for 200 yrs; watching LAI and NEE

   % Buildconf/clm.buildexe.csh

   -- Remove object code for clm (could also have run a clean_build.
        % cd /ptmp/nanr/i40.mh6ka.1deg.001/run/lnd
        % rm -r obj/

   -- Rebuild
        % cd /fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001/
        %  ./i40.mh6ka.1deg.001.build

   -- Run for 200 more years
        % cd /fis/cgd/cseg/csm/runs/ccsm4_0/i40.mh6ka.1deg.001/
        % xmlchange -file env_run -id STOP_N -val 120

Checking results of AD spinup: 

per Sam Levis:  run lnd_diag and look at trends for CO2, NDEP and T and PPT to be sure they are VERY similar to the B-case for
the same 30yr period.  CO2 and NDEP should be zero difference.  T and PPT should be very close to 0. 

Check DEFAULT  I-case compset for required 3hrly variables:

 

be1005en.ucar.edu-/fis/cgd/tss/BCN1850TR1f09g16_3Hrly % nh BCN1850TR1f09g16_3Hrly.cpl.ha2x3h_prec.0005-01.nc | grep
float
        float a2x3h_prec_Faxa_rainc(time, a2x3h_prec_ny, a2x3h_prec_nx) ;
        float a2x3h_prec_Faxa_rainl(time, a2x3h_prec_ny, a2x3h_prec_nx) ;
        float a2x3h_prec_Faxa_snowc(time, a2x3h_prec_ny, a2x3h_prec_nx) ;
        float a2x3h_prec_Faxa_snowl(time, a2x3h_prec_ny, a2x3h_prec_nx) ;
be1005en.ucar.edu-/fis/cgd/tss/BCN1850TR1f09g16_3Hrly % nh BCN1850TR1f09g16_3Hrly.cpl.ha2x3h_solar.0005-01.nc | grep
float   
        float a2x3h_solar_Faxa_swndr(time, a2x3h_solar_ny, a2x3h_solar_nx) ;
        float a2x3h_solar_Faxa_swvdr(time, a2x3h_solar_ny, a2x3h_solar_nx) ;
        float a2x3h_solar_Faxa_swndf(time, a2x3h_solar_ny, a2x3h_solar_nx) ;
        float a2x3h_solar_Faxa_swvdf(time, a2x3h_solar_ny, a2x3h_solar_nx) ;
be1005en.ucar.edu-/fis/cgd/tss/BCN1850TR1f09g16_3Hrly % nh BCN1850TR1f09g16_3Hrly.cpl.ha2x3h.0005-01.nc | grep float     
        float a2x3h_Sa_z(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_u(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_v(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_tbot(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_ptem(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_shum(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_dens(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_pbot(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Sa_pslv(time, a2x3h_ny, a2x3h_nx) ;
        float a2x3h_Faxa_lwdn(time, a2x3h_ny, a2x3h_nx) ;