wiki:CDB_Tutorial

Version 5 (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
    
  1. The driver indicates the location of the run scripts. Go to that directory and simply execute one of the script, i.e.:
    bash tas_zonal_IPSL,IPSL-CM5A-LR:r1i1p1_r1i1p1_historical:1965,1970
    
  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.