CESM2.2_ Clm5.0 single point simulation

Keywords: Linux

(use MobaXterm)

1. Create Case 

$ cd /workdir/hcdu/CESM/cime/scripts/
$ ./create_newcase --case ~/CESM_Clm/US_NR1_2014 --res CLM_USRDAT --compset I1PtClm50SpRsGs --mach sofie --run-unsupported    

#This compset is especially suitable for single point simulation. Most modules are closed except CLM

#If the case name is not in the default format (e.g. I1850CLM50SP), run unsupported is added at the end  

2.0 some general xml settings

Path $CESM/cime/config/cesm/machines

config_machines.xml         Settings for the running machine, including the input and output directory (search [machine name])

config_compilers.xml         About the settings of compilation tools

config_batch.xml               Settings for batch command operation (search [machine name])

2. Case xml variable setting (before case.setup)

. / xmlquery [variablename] query variables

. / xmlchange [variablename] set variable

Under the $CASEROOT path

$ ./xmlchange DATM_MODE=CLM1PT    #The operation mode is single point simulation
$ ./xmlchange DATM_CLMNCEP_YR_START=2014    #Start year of operation
$ ./xmlchange DATM_CLMNCEP_YR_END=2014      #End year of operation
$ ./xmlchange RUN_STARTDATE=2014-01-01    #Run from date

# DATM_CLMNCEP_YR_ALIGN is the consolidation year, which is the same as the starting year by default

$ ./xmlchange ATM_DOMAIN_PATH=~/data/CESM_Clm/US_NR1/domain_US_NR1_2014/    
$ ./xmlchange LND_DOMAIN_PATH=~/data/CESM_Clm/US_NR1/domain_US_NR1_2014/    
              # domain file path
$ ./xmlchange ATM_DOMAIN_FILE=domain.lnd.US_NR1_2014.210923.nc
$ ./xmlchange LND_DOMAIN_FILE=domain.lnd.US_NR1_2014.210923.nc              
              # domain file name
$ ./xmlchange DIN_LOC_ROOT=/workdir/MODCESM/tcraig/IRESM/inputdata/    
              #inputdata path
$ ./xmlchange DIN_LOC_ROOT_CLMFORC=~/data/CESM_Clm/US_NR1/forcingdata_US_NR1_2014/    
              #Atmospheric forcing data path entered
$ ./xmlchange CLM_FORCE_COLDSTART=on    # Forced cold start: on

#Domain file creation with the help of $CESM/cime/tools/mapping/gen_domain_files / tools

(reference article: Clm5 surface data production)

#If forced cold start is enabled, the starting data inidata is ignored

#The Spinup mode is used to make the initial data, clm_accepted_Spinup = on

$ ./xmlchange STOP_OPTION=nyears    # Single operation unit
$ ./xmlchange STOP_N=1    # Number of runs

#Run the set operation unit n times in a single run, and then run it again after resubmit

#Rest _optionand _nare the settings after resubmit, which are consistent with STOP _bydefault

$ ./xmlchange NTASKS=1    # Number of calling CPU cores (per module)
$ ./xmlchange --force JOB_QUEUE=debug    # Change queue
$ ./xmlchange --force JOB_QUEUE=debug

#Run the change queue twice because the model will have two processes: case.run and case.st_archive

$ ./case.setup

3. Write user_nl_and prepare streams file (before case.build)

Open $CASEROOT/user_nl_clm and write (or use echo "" > >)

hist_mfilt = 365
hist_nhtfrq = -24
hist_empty_htapes = .true.
fsurdat = "/home/hcdu/data/CESM_Clm/US_NR1/surfdata_US_NR1_2014/surfdata_US_NR1_2014_hist_78pfts_CMIP6_simyr2000_c210926.nc"

#hist_mfilt number of results in a single output file (default=1)

#Time frequency / resolution n of hist_nhtfrq data results (default n=0, monthly)

   n>0 : n * half hour || n<0 : (-n) * hour

#The above setting: a single output file records 365 (1 year) daily data

#fsurdat is the path of land surface data surfdata *. NC. Double quotation marks are required

#surfdata is made with the help of $CESM/components/clm/tools / tool   (reference article: Clm5 surface data production)

Under $CASEROOT

$ ./preview_namelists
$ cp ./CaseDocs/datm.streams.txt.CLM1PT.CLM_USRDAT user_datm.streams.txt.CLM1PT.CLM_USRDAT
$ cp ./CaseDocs/datm.streams.txt.topo.observed user_datm.streams.txt.topo.observed
$ cp ./CaseDocs/datm.streams.txt.presaero.clim_2000 user_datm.streams.txt.presaero.clim_2000

After execution, generate datm.streams.txt file in. / CaseDocs,. / BuildConf/datmconf:

a) Meteorological data stream file. Official documents: Precip, Solar, TPHWL, etc;

    Single point analog input: CLM1PT.CLM_USRDAT

b) terrain stream file:.topo.observed; aerogel stream file:.presaero.clim_2000

Copy the three stream files to $CASEROOT, plus the user_ prefix

Open user_datm.streams.txt.CLM1PT.CLM_USRDAT (the other two stream files need not be changed), and change filepath, fileNames and variableNames

be careful:

There should be no blank line under! variableNames. The first column is the variable name in the input file, and the last column is the model variable name

The long and short wave radiation data in! forcing data cannot have negative values

Copy the contents of datm_in under. / CaseDocs to user_nl_datm, which is the description of user_datm.streams.txt.CLM1PT.CLM_USRDAT

$ ./preview_namelists
$ ./check_input_data

Run. / preview_namelists again. The model updates the file information under. / BuildConf according to the modified stream file. The key is the content of datm.input_data_list

Execute. / check_input_data to check the input data, and check whether the input forcing data is complete

$ ./case.build --skip-provenance-check

4. case.submit ✔

$ ./case.submit

[reference article] cesm single point simulation _by cluck - pigeon https://blog.csdn.net/z894730988/article/details/118816783https://blog.csdn.net/z894730988/article/details/118816783run cesm2.1.3 with my own forcing dataset_by Dayu marine https://blog.csdn.net/jerry003/article/details/111356760https://blog.csdn.net/jerry003/article/details/111356760

Posted by malikah on Fri, 15 Oct 2021 14:48:20 -0700