...
Volet |
---|
#!/bin/bash
# Set the following parameters exp=domain_name # Domain name (name of geophys files) geo_dir=/Full/path/of/Geophys/directory # Full(!) path of destination directory containing already(!!!) the file 'tape1.model' # -> must NOT be in the home!!!
# Example: exp=/Full/path/of/Geophys/directory/Geophys_${exp} email="your.email@address" # Email address to which a confirmation email will get send after completion
# Set following parameters to dataset of your choice, following above examples: TOPO=... VEGE=... MASK=... SOIL=...
# ======================================================================================
module load utils/SPI
geophys=geophys_${exp}
GENPHYSX=GenPhysX
tictacs=tape1_model
cd ${geo_dir}
# Using Ayrton's new sharp low pass filter:
cat > parameter_file.txt << EOF
set GenX::Param(DBase) /BIG3home/data/Geophys/Database/Dorval
set GenX::Settings(GRD_TYP_S) LU
set GenX::Settings(TOPO_DGFMS_L) False
set GenX::Settings(TOPO_DGFMX_L) False
set GenX::Settings(TOPO_FILMX_L) False
set GenX::Settings(TOPO_CLIP_ORO_L) False
#
set Log::Param(Level) DEBUG
set GeoPhysX::Opt(LegacyMode) False
set GenX::Param(Z0Topo) LEGACY
set GenX::Settings(TOPO_ZREF_ZV_RATIO_C) True
set GenX::Settings(TOPO_RUGV_ZVG2) True
set GenX::Settings(TOPO_RUGV_MG) True
set GenX::Settings(TOPO_ZV_MIN_THRESHOLD) 0.0003
set GenX::Settings(TOPO_WATER_RUGV) 0.001
# ne pas filter le champs MENF a l entree du calcul de Z0, ZP
set GenX::Param(MEFilterForZ0) None
# Ayrton's new sharp low pass filter
set GenX::Settings(LPASSFLT_RC_DELTAX) 5.0
set GenX::Settings(LPASSFLT_P) 20
set GenX::Settings(LPASSFLT_MASK_OPERATOR) 1
set GenX::Settings(LPASSFLT_MASK_THRESHOLD) 100.0
set GenX::Settings(LPASSFLT_APPLY_MINMAX) True
# Mapping tables
set GenX::Path(CCILC_LUT_CSV) /home/winger/Scripts/GenPhysX/CCI_LC/CCI_LC_lut.csv
set GenX::Path(USGS_GLCC_LUT_CSV) /home/winger/Scripts/GenPhysX/CCI_LC/USGS_GLCC_lut2.csv
set GenX::Path(NALCMS_LUT_CSV) /home/winger/Scripts/GenPhysX/CCI_LC/NALCMS_lut2.csv
set GenX::Param(UseVegeLUT) True
#set GenX::Param(AddHydroLakesToMask) True
EOF
# Execute GenPhysX
$GENPHYSX-gridfile${tictacs}-param parameter_file.txt -mask$MASK-vege$VEGE-topo$TOPO-soil$SOIL-check STD -celldim 2-z0topo LEGACY -mefilter LPASS -result${geophys}-subgrid STD -mail${email}
|
...
The original datasets do in general not have the same 26 surface fractionstypes GEM reads from the geophysical fields. Therefore, mapping tables are used to map a surface type from the original dataset to our 26 surface fractionstypes. Depending on the dataset the following different mapping tables are used:
CCI CCI-LC: /home/winger/Scripts/GenPhysX/CCI_LC/CCI_LC_lut.csv
USGS USGS : /home/winger/Scripts/GenPhysX/CCI_LC/USGS_GLCC_lut2.csv
NALCMS NALCMS: /home/winger/Scripts/GenPhysX/CCI_LC/NALCMS_lut2.csv
See in the above script example under "# Mapping tables". If you want to modify a mapping table, just take a copy of the existing one, modify it to your liking and then use specify its name it in your script instead of the existing one.
The mapping table for CCI-LC is build the following way:
- There is one row per original surface fractiontype - plus a header.
- The first column contains the number of said surface fractiontype. The following columns are for each of our GEM's 26 surface types.
- The values written in the table are the fraction of the original surface type that will be mapped to one of GEM's surface types. Therefore, the sum of all the values in one row needs to be 1.
The mapping tables for USGS and NALCMS are build the following way:
- There is one row per original surface type - plus a header.
- The first column contains the number of said surface type. The second column contains the number of GEM surface type this one will get mapped to. This is a one-to-one mapping. There are no fractions as for CCI-LC.
d) Copy geophys to running machine
...