Skip to content

Commit

Permalink
Remove/replace refs to DATM_C*_YR_* variables
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Oct 30, 2024
1 parent f0566a6 commit 152f5d6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Because it takes so long to spinup the CN model (as we just saw previously), if

In this example we will use the ``I1850Clm50BgcSpinup compset`` to setup CLM to run with atmospheric forcing from a previous fully coupled simulation with data that is already stored on disk on Cheyenne. There are several simulations that have high frequency data for which we can do this. You can also do this on a machine other than Cheyenne, but would need to download the data from the Earth System Grid and change the datapath similar to Example :numref:`eg-sim-data-from-prev-sim`.

Example: Simulation with MOAR Data on cheyenne
Example: Simulation with MOAR Data on derecho
-------------------------------------------------------------
::

Expand All @@ -21,7 +21,7 @@ Example: Simulation with MOAR Data on cheyenne
> ./xmlchange DATM_CPL_CASE=b40.1850.track1.1deg.006a
# The following sets the align year and years to run over for atm forcing
# (you could also use an editor)
> ./xmlchange DATM_CPL_YR_ALIGN=1,DATM_CPL_YR_START=960,DATM_CPL_YR_END=1030
> ./xmlchange DATM_YR_ALIGN=1,DATM_YR_START=960,DATM_YR_END=1030
> ./case.setup
# Now build and run as normal
> ./case.build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,10 @@ For running "I" cases there are several other noteworthy configuration items tha
CCSM_BGC
DATM_MODE
DATM_PRESAERO
DATM_CLMNCEP_YR_ALIGN
DATM_CLMNCEP_YR_START
DATM_CLMNCEP_YR_END
DATM_YR_ALIGN
DATM_YR_START
DATM_YR_END
DATM_CPL_CASE
DATM_CPL_YR_ALIGN
DATM_CPL_YR_START
DATM_CPL_YR_END

``CCSM_CO2_PPMV``
Sets the mixing ratio of CO2 in parts per million by volume for ALL CESM components to use. Note that most compsets already set this value to something reasonable. Also note that some compsets may tell the atmosphere model to override this value with either historic or ramped values. If the ``CCSM_BGC`` variable is set to something other than "none" the atmosphere model will determine CO2, and CLM will listen and use what the atmosphere sends it. On the CLM side the namelist item ``co2_type`` tells CLM to use the value sent from the atmosphere rather than a value set on it's own namelist.
Expand Down Expand Up @@ -569,36 +566,27 @@ For running "I" cases there are several other noteworthy configuration items tha

``pt1_pt1`` = read in single-point or regional datasets

DATM_CLMNCEP_YR_START
``DATM_CLMNCEP_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes.
DATM_YR_START
``DATM_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes.

DATM_CLMNCEP_YR_END
``DATM_CLMNCEP_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes.
DATM_YR_END
``DATM_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes.

DATM_CLMNCEP_YR_ALIGN
``DATM_CLMNCEP_YR_START`` and ``DATM_CLMNCEP_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CLMNCEP_YR_ALIGN`` determines which year in that range of years the simulation will start with.
DATM_YR_ALIGN
``DATM_YR_START`` and ``DATM_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_YR_ALIGN`` determines which year in that range of years the simulation will start with.

DATM_CPL_CASE
``DATM_CPL_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_START
``DATM_CPL_YR_START`` sets the beginning year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_END
``DATM_CPL_YR_END`` sets the ending year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode.

DATM_CPL_YR_ALIGN
``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CPL_YR_ALIGN`` determines which year in that range of years the simulation will start with.

-----------------------------
Downloading DATM Forcing Data
-----------------------------

In Chapter One of the `CESM User's Guide <link-to-CESM-UG>`_ there is a section on "Downloading input data". The normal process of setting up cases will use the "scripts/ccsm_utils/Tools/check_input_data" script to retrieve data from the CESM subversion inputdata repository. This is true for the standard `CLM_QIAN` forcing as well.

The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on cheyenne for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data.
The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on derecho for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_YR_START`` and ``DATM_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data.

The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on cheyenne. The DATM assumes the path for the previous NCAR machine cheyenne of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``.
The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on derecho. The DATM assumes the path for derecho of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``.

--------------------------------------
Customizing via the build script files
Expand Down
2 changes: 1 addition & 1 deletion src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ module clm_varctl
logical, public :: spinup_matrixcn = .false. !.false. ! true => use acc spinup
logical, public :: hist_wrt_matrixcn_diag = .false.!.false. ! true => use acc spinup
! SASU
integer, public :: nyr_forcing = 10 ! length of forcing years for the spin up. eg. if DATM_CLMNCEP_YR_START=1901;DATM_CLMNCEP_YR_END=1920, then nyr_forcing = 20
integer, public :: nyr_forcing = 10 ! length of forcing years for the spin up. eg. if DATM_YR_START=1901;DATM_YR_END=1920, then nyr_forcing = 20
integer, public :: nyr_SASU = 1 ! length of each semi-analytic solution. eg. nyr_SASU=5, analytic solutions will be calculated every five years.
! nyr_SASU=1: the fastest SASU, but inaccurate; nyr_SASU=nyr_forcing(eg. 20): the lowest SASU but accurate
integer, public :: iloop_avg = -999 ! The restart file will be based on the average of all analytic solutions within the iloop_avg^th loop.
Expand Down
12 changes: 6 additions & 6 deletions tools/contrib/run_clm_historical
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ cp original_user_nl_clm user_nl_clm
./xmlchange STOP_N=21
./xmlchange CONTINUE_RUN=FALSE
./xmlchange RESUBMIT=0
./xmlchange DATM_CLMNCEP_YR_ALIGN=1901
./xmlchange DATM_CLMNCEP_YR_START=1901
./xmlchange DATM_CLMNCEP_YR_END=1920
./xmlchange DATM_YR_ALIGN=1901
./xmlchange DATM_YR_START=1901
./xmlchange DATM_YR_END=1920

# need to use user_nl_datm files to get years right
cp user_nl_datm1901-1920 user_nl_datm
Expand Down Expand Up @@ -203,9 +203,9 @@ gzip $DDIR$CASENAME*.bin
# we have to resubmit the job 3 times.
./xmlchange STOP_OPTION=nyears
./xmlchange STOP_N=22
./xmlchange DATM_CLMNCEP_YR_ALIGN=1901
./xmlchange DATM_CLMNCEP_YR_START=1901
./xmlchange DATM_CLMNCEP_YR_END=2014
./xmlchange DATM_YR_ALIGN=1901
./xmlchange DATM_YR_START=1901
./xmlchange DATM_YR_END=2014
./xmlchange CONTINUE_RUN=TRUE
./xmlchange RESUBMIT=3

Expand Down
14 changes: 7 additions & 7 deletions tools/contrib/run_clmtowers
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ foreach mysite ( $sites )
./xmlchange --id STOP_OPTION --val nyears
./xmlchange --id STOP_N --val $numyears
./xmlchange --id RUN_STARTDATE --val $startyear[$cnt]-01-01
./xmlchange --id DATM_CLMNCEP_YR_ALIGN --val $startyear[$cnt]
./xmlchange --id DATM_CLMNCEP_YR_START --val $startyear[$cnt]
./xmlchange --id DATM_CLMNCEP_YR_END --val $endyear[$cnt]
./xmlchange --id DATM_YR_ALIGN --val $startyear[$cnt]
./xmlchange --id DATM_YR_START --val $startyear[$cnt]
./xmlchange --id DATM_YR_END --val $endyear[$cnt]
./xmlchange --id CALENDAR --val GREGORIAN
if ($BGC == ON) then
./xmlchange --id CLM_BLDNML_OPTS --val "-mask navy -bgc bgc -crop"
Expand All @@ -240,9 +240,9 @@ foreach mysite ( $sites )
else
./xmlchange --id RUN_STARTDATE --val $startyear[$cnt]-01-01
endif
./xmlchange --id DATM_CLMNCEP_YR_ALIGN --val $alignyear
./xmlchange --id DATM_CLMNCEP_YR_START --val $startyears
./xmlchange --id DATM_CLMNCEP_YR_END --val $endyears
./xmlchange --id DATM_YR_ALIGN --val $alignyear
./xmlchange --id DATM_YR_START --val $startyears
./xmlchange --id DATM_YR_END --val $endyears
if ($alignyear == 1) then
./xmlchange --id CALENDAR --val NO_LEAP
endif
Expand All @@ -263,7 +263,7 @@ foreach mysite ( $sites )
./preview_namelists
# Have to force this for some reason
if ($SPINUP_P1 == FALSE) then
./xmlchange --id DATM_CLMNCEP_YR_END --val $endyear[$cnt]
./xmlchange --id DATM_YR_END --val $endyear[$cnt]
./preview_namelists
endif
if ( $status != 0 )then
Expand Down

0 comments on commit 152f5d6

Please sign in to comment.