Skip to content

convert the e3sm land model outputs following cmip conventions for analysis using ILAMB

Notifications You must be signed in to change notification settings

rubisco-sfa/elm2ilamb_wkflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert/rewrite climate model outputs following CMIP conventions for analysis in ILAMB

This is a Bourne Again SHell (BASH) script package to rewrite the E3SM model outputs following the CMIP5/6 conventions for analysis in the [ILAMB] (https://github.com/rubisco-sfa/ILAMB) multi-model benchmarking software.

Required software:

  • The netCDF Operators (NCO) tookit version 4.6.9 or newer
  • The Earth System Modeling Framework (ESMF)'s tool named "ESMF_RegridWeightGen" generally included in the NCL package

Major functions:

  1. Time serialization of model raw output
  2. Conservative remapping of the time serial variables from the above time serialization
  3. Conversion of the time serial or remapped variables to CF convention and CMIP5/6 standards

Basic usage:

Just running "elm_singlevar_ts.bash" without any command line arguments will show a very short usage message as follows:

> ./elm_singlevar_ts.bash


Usage: elm_singlevar_ts.bash --caseid[-c] --year_range[-y] --align_year[-a] --caseidpath[-i] --outputpath[-o] 
                  --experiment[-e] --model[-m] --numcc [--cmip] [--ilamb] [--addfxflds] --srcgrid[-s] --dstgrid[-g] -v --no-gents
                  --skip_genmap --ncclimo|--pyreshaper --ncremap|--cremap3|--linkfil



         --caseid, -c           : the case name
         --year_range, -y       : the year range of the simulations that is used in the name construction of the output files.
                                  Format: YYYY-YYYY, i.e. first year and last year. When it is combined with the --align_year, the model years
                                  between first_year+align_year to last_year+align_year are processed
         --year_align, -a       : the year used to align the model year and real years set in the --year_range, it equals
                                  model year minus real year
         --caseidpath, -i       : the directory of outputs from atm and lnd components, please provide two directory names seperated 
                                  by comma if they are different
         --outputpath, -o       : the directory for the outputs generated by this script
         --experiment, -e       : the experiment name following CMIP conventions used in the name construction of the output files
         --model, -m            : the model name, used in the name construnction of the output files and the subdirectory name under outputpath
         --skip_genmap          : 0 means not to skip map generation, positive integer number is to skip it and use mapXXXX.nc instead
         --srcgrid, -s          : if do remapping, source grid description in the SCRIP format is required
         --dstgrid, -g          : if do remapping, target grid description in the SCRIP format is required
         --numcc                : number of concurrent processes to do time serialzation. if 0 or not set use the total number of variables
         --no-gen-ts            : switch of not generating time serialization (i.e. the ts files were generated before)
         --ncclimo|pyreshaper   : switch of time serialization methods either using ncclimo or PyReshaper
         --ncreamp|creamp3      : switch of remapping methods either using ncremap or conv_remap3, cannot be used together or with -linkfil
         --linkfil              : switch to link the original to remapped files instead of actual remapping
         --cmip                 : switch to rewrite model outputs following CMIP conventions
         --skip_rename          : switch to skip renaming for cmip conversion (the renaming was done in a previous run
         --ilamb                : switch to rewrite the variables for analysis in ILAMB following CMIP conventions
         --addfxflds            : switch to rewrite the two fixed datasets 'sftlf' and 'areacella' and exit. Default they won't be written out

For example, if you ran a case of E3SM v1.1-CTC historical experiments from 1850-2005, the case name is 20181217.BCRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison and its results are stored in the directory /project/projectdirs/acme/CBGC_outputs/CTC/BCRD/. Now you want to rewrote its results following CMIP conventions into the directory /global/cscratch1/sd/minxu/ILAMB_CBGCv1/cbgc_data/CTC for analysis in ILAMB. Then try to run the command as follows:

clm_singlevar_ts.bash -c 20181217.BCRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison. -y 1850-2005  -a 0 \
          -s SCRIPgrid_ne30np4_nomask_c101123.nc -g cmip6_180x360_scrip.20181001.nc \
          -m E3SMv1.1-CTC -e CBGCv1     
          --ilamb --cmip --ncclimo -- ncremap

If you want to output the "sftlf" and "areacella" too, please add "--addfxflds" option in the above command, in default, they are not generated.

Output directory structure :

Under the output directory:

 -- $caseid
    |-- log
    |-- map
    |-- org
    |   |-- atm
    |   `-- lnd
    |-- rgr
    |   |-- atm
    |       `-- CMOR
    |   |-- fx
    |   `-- lnd
    |       `-- CMOR
    `-- tmp
  • log: store the log files
  • map: store conservative remapping coefficient files
  • org: store the time serialization files
    • atm: atmospheric variables
    • lnd: land variables
  • rgr: store the remapped files
    • atm: atmospheric variables
      • CMOR: cmorized atmospheric variables
    • lnd: land variables
      • CMOR: cmorized land variables
    • fx: cmorized fixed variables (sftlf and areacella)
  • tmp: temporary files

Examples:

Under the example directory, they are some examples.

About

convert the e3sm land model outputs following cmip conventions for analysis using ILAMB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages