Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • submit job:  qsub ./run-cca.job

Generating the initial data for the experiment

See also the description here: Emission and IC preparation

Prior to running the model the initial experiment data needs to be generated. At present the model is set up to run from 2010-01-01 00:00 UTC. A series of scripts is run that collates the relevant data from MARS and other storage locations and compiles it in the appropriate format.

$OIFS_HOME/AC-experiments/ contains scripts to set up and carry out either a forecast or climate run.

Forecast experiments

The script to control the entire experiment workflow is forecast-workflow.sh which does the following:

  • sets environment from scripts/oifs-config.${platform}.sh
  • loads bash functions from scripts/lib_general.sh
  • loads general experiment configuration parameters from config-fc.h
  • creates experiment rundir on $SCRATCH space or clears it if necessary
  • checks if this is an initial run leg or a restart leg, works out the leg of the next run
  • submit initial experiment data preparation script forecast-prep.job to batch scheduler
  • submit run script for next leg forecast-run.job to batch scheduler

Required modifications

module load sms ??

The following alterations were required from vanilla version in the git repository to make the process independent from Vincent's environment.
Lines with prefix - need to be deleted, lines with prefix + need to be added.

./forecast-prep.job:

-#PBS -l EC_billing_account=nlchekli

./forecast-run.job:

-#PBS -l EC_billing_account=nlchekli

./forecast-prep.sh:

- mv ICMCL-INIT-COMPO-${leg_start_date_yyyymmddhh}-${leg_end_date_yyyymmddhh} \
+ mv ${AC_DATA_DIR}/ICMCL-INIT-COMPO-${leg_start_date_yyyymmddhh}-${leg_end_date_yyyymmddhh} \

platform/oifs-config.ecmwf-cca.sh:

-export OIFS_HOME="/perm/ms/nl/nk9/oifs43r3"
+export OIFS_HOME="/perm/rd/damk/oifs/openifs-ac"

A larger number of code changes was required in the following files:

Code Block
languagebash
titleconfig-fc.h
diff --git a/AC-experiments/config-fc.h b/AC-experiments/config-fc.h
index fd2f167..0c1c5cd 100644
--- a/AC-experiments/config-fc.h
+++ b/AC-experiments/config-fc.h
@@ -20,7 +20,7 @@
 EXP=oifc
 
 # Simulation start and end date. If setting time (not mandatory), **put it before** the date
-run_start_date="00:00 2013-07-01"
+run_start_date="00:00 2010-01-01"
 run_end_date="${run_start_date} + 2 days"
 
 # Restart frequency (a/k/a forecast length). Use any (reasonable) number and time unit you want.
@@ -56,19 +56,20 @@ LCHEM_OFFLINE_IC=false
 # a previous experiment
 #==========================================================
 # Experiment (can be different from the one used for METEO ICs)
-CHEM_INIEXP="b257"
+CHEM_INIEXP="b27y"
 CHEM_INIVER="ver15"             # default to CHEM_VER
 CHEM_INITYPE="fc"
 CHEM_INICLASS="nl"
 CHEM_INIFC=24                   # Time into the forecast to pickup IC  
-CHEM_INIDATE=2013070100         # Forecast start time. Default (if unset or 0) to run_start_date
-CHEM_INILEVELS="60"             # default to 60
+CHEM_INIDATE=2009123100         # Forecast start time. Default (if unset or 0) to run_start_date
+CHEM_INILEVELS="91"             # default to 60
 
-AERO_INIEXP="gbst"
+AERO_INIEXP="b27y"
 AERO_INITYPE="fc"
-AERO_INICLASS="rd"
-AERO_INIFC=744
-AERO_INIDATE=2012120100
+AERO_INICLASS="nl"
+AERO_INIFC=24
+AERO_INIDATE=2009123100
+AERO_INILEVELS="91"
 
 #==========================================================
 # Variables to retrieve METEO initial conditions from
@@ -78,15 +79,15 @@ AERO_INIDATE=2012120100
 # contains the right output. Note that MARS can regrid. Q: how flexible is that?
 
 INICLASS=nl
-INIEXPVER="b257"  # Also used for renaming output by get_gems_surface (aerosol sfc emiss), which is called by getgrb only => mot needed, do the renaming in getgrb!
+INIEXPVER="b27y"  # Also used for renaming output by get_gems_surface (aerosol sfc emiss), which is called by getgrb only => mot needed, do the renaming in getgrb!
 INISTREAM="OPER"
-BASEDATE="20130101" 
+BASEDATE="20100101" 
 BASETIME="00" 
-INILEVELS=60
+INILEVELS=91
 
 # model resolution we want to run
 RESOL=255
-LEVELS=60
+LEVELS=91
 GTYPE=l_2
 
 # Get Ozone from the METEO experiment
@@ -179,7 +180,7 @@ NSSALT=1
 LINJ_AER=false
 LVOLC_ALTI=false
 LAERSOA_CHEM=true
-LFIRE=false
+LFIRE=true
 
 # --- NAEAER
 LAERRRTM=false
@@ -213,7 +214,7 @@ WAVE=$( ${LWAM} && echo yes ||  echo no )
 # Variables configuring climate
 #==========================================================
 INICLASS_SST="od"
-CLMSST=yes
+CLMSST=no
 LBCSST=false
 PERSST=true
 FORCE_SST=no
Code Block
languagebash
titlescripts/lib_icmcl_compo.sh
diff --git a/AC-experiments/scripts/lib_icmcl_compo.sh b/AC-experiments/scripts/lib_icmcl_compo.sh
index d273e69..1741877 100644
--- a/AC-experiments/scripts/lib_icmcl_compo.sh
+++ b/AC-experiments/scripts/lib_icmcl_compo.sh
@@ -862,9 +862,9 @@ EOF
             rm InjectionHeight4IFS.grb InjectionHeight4IFShr.grb
         fi
         
-        if $LMCC_COMPO ; then
+        #if $LMCC_COMPO ; then
             cat  bcgf_int  omgf_int sogf_int  >>  aer_fire_emis 
-        fi
+        #fi
 
         rm -f  bcgf bcgf_int omgf omgf_int sogf sogf_int
     fi
Code Block
languagebash
titlescripts/lib_initcond.sh
diff --git a/AC-experiments/scripts/lib_initcond.sh b/AC-experiments/scripts/lib_initcond.sh
index 8df85cc..22b9e6e 100644
--- a/AC-experiments/scripts/lib_initcond.sh
+++ b/AC-experiments/scripts/lib_initcond.sh
@@ -258,20 +258,17 @@ prep_chem_init (){
gribIDsold=($($SCRIPTDIR/get_tablecol $tablefile_old grib))
gribIDs=($($SCRIPTDIR/get_tablecol $tablefile grib))

- # use aerosol scheme for SO4
- if [[ $LAERCHEM == true ]]; then
- gribso4=$($SCRIPTDIR/get_tablecol -w name=SO4 $tablefile_old grib)
- fi
-
for gribID in ${gribIDsold[*]}
do
chem_ml=$chem_ml/$gribID
done
chemml=$(echo $chem_ml|sed "s;//; ;")

- if [[ $LAERCHEM == true ]]; then 
- chemml=$(echo $chemml|sed "s;$gribso4/;;")
- fi
+ # if [[ $LAERCHEM == true ]]; then 
+ # for now always exclude SO4 from retrieval..
+ gribso4=$($SCRIPTDIR/get_tablecol -w name=SO4 $tablefile_old grib)
+ chemml=$(echo $chemml|sed "s;$gribso4/;;")
+ # fi

$MARS_CMD << EOF
retrieve,type=$typexp,levtype=ml,levelist=1/TO/$iclevels,date=$date_old,
@@ -282,6 +279,18 @@ prep_chem_init (){
expver=$expver,class=$class
EOF

+ # Add missing entry for SO4..
+ if [[ $LAERCHEM == false ]] ; then
+ # Get a zero-fiel
+ gribso4=$($SCRIPTDIR/get_tablecol -w name=SO4 $tablefile_old grib)
+ gribparam=$(printf %03d ${gribso4%.*})
+ gribtable=$(printf %03d ${gribso4#*.})
+ grib_copy -w paramId=210203 $gribfile_chem_final dumm_ic
+ grib_set -s paramId=${gribtable}${gribparam},scaleValuesBy=0.0 dumm_ic dumm_icb
+ cat dumm_icb >> $gribfile_chem_final
+ rm -rf dumm_ic dumm_icb
+ fi
+
# Correct grib number if different table files (ie CHEM_INIVER != CHEM_VER)
# 
# ! NOTE ! Assume that the species are in the same order in both tables!!
@@ -359,6 +368,14 @@ EOF
step=$fclen,param=${aeroml},grid=$grid,gaussian=reduced,target=$gribfile_aero_final,repres=gg,
expver=$expver,class=$class
EOF+                # In case LAERCHEM== false, make sure to include a dummy SO2 field
+                if [[ $LAERCHEM == false ]] ; then
+           info "generate dummy 210012 field (SO2-aer) "
+                  grib_copy -w paramId=210001 $gribfile_aero_final dumm_ic
+                  grib_set  -s paramId=210012,scaleValuesBy=0.0 dumm_ic dumm_icb
+                  cat dumm_icb >> $gribfile_aero_final
+                  rm -rf dumm_ic dumm_icb        
+         fi
                 # Now some further manipulation, to include aerosol sum (48.210) - not needed??
                 # simply get a zero-field?
                 grib_copy -w paramId=210001 $gribfile_aero_final dumm_ic