wiki:CDB_Tutorial

Version 8 (modified by lalibert, 8 years ago) (diff)

--

Tutorial

This short tutorial shows how to use the CDB to compute the simple tas_zonal diagnostic.

Find and setup the models to be used

  1. Go to CDB_ROOT_DIR/driver and find the optimal set of models for the diagnostic:
    >>./find_optimset.sh tas_zonal
    
  2. Look at the output and copy the models in the intersection:
    Models that are found in some but not all of experiments  historical:1965,2004 rcp45:2060,2099
    BCC,bcc-csm1-1:r1i1p1;\
    CSIRO-QCCCE,CSIRO-Mk3-6-0:r1i1p1;\
    IPSL,IPSL-CM5A-LR:r5i1p1;\
    IPSL,IPSL-CM5B-LR:r1i1p1;\
    LASG-IAP,FGOALS-s2:r1i1p1;\
    MIROC,MIROC4h:r1i1p1;\
    MIROC,MIROC5:r1i1p1;\
    MIROC,MIROC-ESM-CHEM:r1i1p1;\
    MIROC,MIROC-ESM:r1i1p1;\
    MOHC,HadCM3:r1i1p1;\
    MPI-M,MPI-ESM-P:r1i1p1;\
    NCAR,CCSM4:r1i1p1;\
    NOAA-GFDL,GFDL-CM3:r1i1p1;\
    NOAA-GFDL,GFDL-ESM2G:r1i1p1;\
    NOAA-GFDL,GFDL-ESM2M:r1i1p1;\
    Intersection of models for experiments  historical:1965,2004 rcp45:2060,2099
    CCCma,CanESM2:r1i1p1;\
    CNRM-CERFACS,CNRM-CM5:r1i1p1;\
    INM,inmcm4:r1i1p1;\
    IPSL,IPSL-CM5A-LR:r1i1p1;\
    IPSL,IPSL-CM5A-LR:r2i1p1;\
    IPSL,IPSL-CM5A-LR:r3i1p1;\
    IPSL,IPSL-CM5A-LR:r4i1p1;\
    IPSL,IPSL-CM5A-MR:r1i1p1;\
    MOHC,HadGEM2-CC:r1i1p1;\
    MOHC,HadGEM2-ES:r1i1p1;\
    MPI-M,MPI-ESM-LR:r1i1p1;\
    MRI,MRI-CGCM3:r1i1p1;\
    NCC,NorESM1-M:r1i1p1;\
    You can copy and paste this list into your diagnostic file, assigning it to the variable CDB_MODEL_LIST
    
  1. Edit the diagnostic file CDB_ROOT_DIR/diags/tas_zonal.sh and paste this list in the CDB_MODEL_LIST variable on line 38:
    ################ MODELS USED IN THIS SCRIPT  ##############
    #
    CDB_MODEL_LIST="\
    CCCma,CanESM2:r1i1p1;\
    CNRM-CERFACS,CNRM-CM5:r1i1p1;\
    INM,inmcm4:r1i1p1;\
    IPSL,IPSL-CM5A-LR:r1i1p1;\
    IPSL,IPSL-CM5A-LR:r2i1p1;\
    IPSL,IPSL-CM5A-LR:r3i1p1;\
    IPSL,IPSL-CM5A-LR:r4i1p1;\
    IPSL,IPSL-CM5A-MR:r1i1p1;\
    MOHC,HadGEM2-CC:r1i1p1;\
    MOHC,HadGEM2-ES:r1i1p1;\
    MPI-M,MPI-ESM-LR:r1i1p1;\
    MRI,MRI-CGCM3:r1i1p1;\
    NCC,NorESM1-M:r1i1p1;\
    "
    #
    ################ END MODELS USED IN THIS SCRIPT  ##############
    

Creating and debugging the run scripts

  1. Back in CDB_ROOT_DIR/driver, execute the debuggable CDB driver:
    >>./driver.sh -D tas_zonal
    
    CDB driver version 0.1
    
    Creating debugging scripts.
    STDOUT and STDERR are output to prompt.
    DO NOT RUN SCRIPTS IN THIS MODE IF NOT MONITORING THE JOB.
    
    cdo has a tendency of swarming STDERR for some errors, which can create files
    that are several gigabytes. If STDOUT and STDERR are not dumped direcly, it can
    easily crash compute nodes.
    
    Scripts files created. Submit, run or debug from $CDB_OUT_DIR/run_scripts/tas_zonal
    
    >> ls  $CDB_OUT_DIR/run_scripts/tas_zonal
    
    tas_zonal_CCCma,CanESM2:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_CCCma,CanESM2:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_CCCma,CanESM2:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_CNRM-CERFACS,CNRM-CM5:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_CNRM-CERFACS,CNRM-CM5:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_CNRM-CERFACS,CNRM-CM5:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_INM,inmcm4:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_INM,inmcm4:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_INM,inmcm4:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_IPSL,IPSL-CM5A-LR:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_IPSL,IPSL-CM5A-LR:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_IPSL,IPSL-CM5A-LR:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_IPSL,IPSL-CM5A-LR:r2i1p1_r2i1p1_historical:1965,1970
    tas_zonal_IPSL,IPSL-CM5A-LR:r2i1p1_r2i1p1_historical:1965,2004
    tas_zonal_IPSL,IPSL-CM5A-LR:r2i1p1_r2i1p1_rcp45:2060,2099
    tas_zonal_IPSL,IPSL-CM5A-LR:r3i1p1_r3i1p1_historical:1965,1970
    tas_zonal_IPSL,IPSL-CM5A-LR:r3i1p1_r3i1p1_historical:1965,2004
    tas_zonal_IPSL,IPSL-CM5A-LR:r3i1p1_r3i1p1_rcp45:2060,2099
    tas_zonal_IPSL,IPSL-CM5A-LR:r4i1p1_r4i1p1_historical:1965,1970
    tas_zonal_IPSL,IPSL-CM5A-LR:r4i1p1_r4i1p1_historical:1965,2004
    tas_zonal_IPSL,IPSL-CM5A-LR:r4i1p1_r4i1p1_rcp45:2060,2099
    tas_zonal_IPSL,IPSL-CM5A-MR:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_IPSL,IPSL-CM5A-MR:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_IPSL,IPSL-CM5A-MR:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_MOHC,HadGEM2-CC:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_MOHC,HadGEM2-CC:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_MOHC,HadGEM2-CC:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_MOHC,HadGEM2-ES:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_MOHC,HadGEM2-ES:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_MOHC,HadGEM2-ES:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_MPI-M,MPI-ESM-LR:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_MPI-M,MPI-ESM-LR:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_MPI-M,MPI-ESM-LR:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_MRI,MRI-CGCM3:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_MRI,MRI-CGCM3:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_MRI,MRI-CGCM3:r1i1p1_r1i1p1_rcp45:2060,2099
    tas_zonal_NCC,NorESM1-M:r1i1p1_r1i1p1_historical:1965,1970
    tas_zonal_NCC,NorESM1-M:r1i1p1_r1i1p1_historical:1965,2004
    tas_zonal_NCC,NorESM1-M:r1i1p1_r1i1p1_rcp45:2060,2099
    
  1. Go to $CDB_OUT_DIR/run_scripts/tas_zonal and simply execute one of the script, i.e.:
    bash tas_zonal_IPSL,IPSL-CM5A-LR:r1i1p1_r1i1p1_historical:1965,1970
    

This script will compute the daily zonal-mean surface temperature, the daily zonal-mean surface temperature variance, the monthly-mean surface temperature and the monthly surface temperature variance for 1965-1970. This script create three run scripts per model: one for historical 1965-1970, one for historical 1965-2004 and one for RCP4.5 2060-2099.

  1. The job can be monitored from STDOUT, STDERR and from the temporary directory CDB_TEMP_DIR/$USER.pid , where "pid" is the process id of the run script.
  1. The output is found in CDB_OUT_DIR/tas_zonal:
    ls $CDB_OUT_DIR/tas_zonal
    
    in/
    tas_zonal_IPSL-CM5A-LR_historical_1965_1970_r1i1p1.daily
    tas_zonal_IPSL-CM5A-LR_historical_1965_1970_r1i1p1.monthly
    

The in/ directory contains the variables that were requested to be output with the ESG naming convention. The other files are the diagnostics output.