#!/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}
|