Update version info for release v4.6.1 (#2122)
[WRF.git] / var / scripts / gen_be / gen_be_set_defaults.ksh
blob44e38a58c8a5072560d4687fdad996ed21fb8439
1 #!/bin/ksh
2 #-----------------------------------------------------------------------
3 # Script: gen_be_set_defaults.ksh
5 # Purpose: This scripts sets the environment variables used within the
6 # entire scripts system to values corresponding to a "standard case".
7 # The standard case currently used is the con200 application.
8 # The namelist parameters specified here is that sub-set of the entire
9 # range of parameters for all namelists that we have found necessary
10 # to change through experience of the applications tested so far. As
11 # new applications are tests, additional environment valiables may
12 # be added.
14 #-----------------------------------------------------------------------
15 # [1] Set defaults for required environment variables:
16 #-----------------------------------------------------------------------
18 # Decide which stages to run (run if true):
20 export RUN_GEN_BE_STAGE0=${RUN_GEN_BE_STAGE0:-false} # Run stage 0 (create perturbation files).
21 export RUN_GEN_BE_STAGE1=${RUN_GEN_BE_STAGE1:-false} # Run stage 1 (Remove mean, split variables).
22 export RUN_GEN_BE_STAGE2=${RUN_GEN_BE_STAGE2:-false} # Run stage 2 (Regression coefficients).
23 export RUN_GEN_BE_STAGE2A=${RUN_GEN_BE_STAGE2A:-false} # Run stage 2a (Regression coefficients).
24 export RUN_GEN_BE_STAGE3=${RUN_GEN_BE_STAGE3:-false} # Run stage 3 (Vertical Covariances).
25 export RUN_GEN_BE_STAGE4=${RUN_GEN_BE_STAGE4:-false} # Run stage 4 (Horizontal Covariances).
26 export RUN_GEN_BE_DIAGS=${RUN_GEN_BE_DIAGS:-false} # Run gen_be diagnostics.
27 export RUN_GEN_BE_DIAGS_READ=${RUN_GEN_BE_DIAGS_READ:-false} # Run gen_be diagnostics_read.
28 export RUN_GEN_BE_MULTICOV=${RUN_GEN_BE_MULTICOV:-false} # Set to calculate multi-corr for MBE
29 export RUN_GEN_BE_HISTOG=${RUN_GEN_BE_HISTOG:-false} # Set to calculate Hitograms for MBE
30 export RUN_GEN_BE_MULTICOV_CONTRIB=${RUN_GEN_BE_MULTICOV_CONTRIB:-false} # Set to calculate contrib for MBE
31 export RUN_GEN_BE_GSI_STAGE0=${RUN_GEN_BE_GSI_STAGE0:-false} # Run stage 0 (create perturbation files).
32 export RUN_GEN_BE_GSI_STAGE1=${RUN_GEN_BE_GSI_STAGE1:-false} # Run stage 1 (Remove mean, split variables).
33 export RUN_GEN_BE_GSI_STAGE2=${RUN_GEN_BE_GSI_STAGE2:-false} # Run stage 2 (Regression coefficients).
34 export BY_LEVELS=${BY_LEVELS:-True}
37 export DOMAIN=${DOMAIN:-01} # domain id.
38 export START_DATE=${START_DATE:-2003010200} # Time of first perturbation.
39 export END_DATE=${END_DATE:-2003012812} # Time of last perturbation.
40 export FCST_RANGE=${FCST_RANGE:-24} # Forecast range of forecast (hours).
41 export INTERVAL=${INTERVAL:-12} # Period between valid times (hours).
42 export FCST_RANGE1=${FCST_RANGE1:-24} # Forecast range of NMC long-leadtime forecast (hours).
43 export FCST_RANGE2=${FCST_RANGE2:-$INTERVAL} # Forecast range of NMC short-leadtime forecast (hours).
44 export BE_METHOD=${BE_METHOD:-NMC} # NMC (NMC-method), ENS (Ensemble-Method).
45 export NE=${NE:-1} # Number of ensemble members (for ENS).
46 export BIN_TYPE=${BIN_TYPE:-5} # 0=None, 1=1:ni, 2=latitude, ....
47 export LAT_MIN=${LAT_MIN:--90.0} # Used if BIN_TYPE = 2.
48 export LAT_MAX=${LAT_MAX:-90.0} # Used if BIN_TYPE = 2.
49 export BINWIDTH_LAT=${BINWIDTH_LAT:-10.0} # Used if BIN_TYPE = 2.
50 export BINWIDTH_HGT=${BINWIDTH_HGT:-1000.0} # Used if BIN_TYPE = 2.
51 export HGT_MIN=${HGT_MIN:-0.0} # Used if BIN_TYPE = 2.
52 export HGT_MAX=${HGT_MAX:-20000.0} # Used if BIN_TYPE = 2.
53 export REMOVE_MEAN=${REMOVE_MEAN:-.true.} # Remove time/ensemble/area mean.
54 export GAUSSIAN_LATS=${GAUSSIAN_LATS:-.false.} # Set if Gaussian latitudes used (global only).
55 export TESTING_EOFS=${TESTING_EOFS:-.true.} # True if performing EOF tests.
56 export NUM_PASSES=${NUM_PASSES:-0} # Number of passes of recursive filter.
57 export RF_SCALE=${RF_SCALE:-1.0} # Recursive filter scale.
58 export USE_GLOBAL_EOFS=${USE_GLOBAL_EOFS:-.true.} # Use domain-averaged EOFS for stage3.
59 export DATA_ON_LEVELS=${DATA_ON_LEVELS:-.false.} # False if fields projected onto modes.
60 export GLOBAL=${GLOBAL:-false} # Global or regional models
61 export NUM_LEVELS=${NUM_LEVELS:-27} # Hard-wired for now....
62 export N_SMTH_SL=${N_SMTH_SL:-2} # Amount of lengthscale smoothing (0=none).
63 export STRIDE=${STRIDE:-1} # Calculate correlation every STRIDE point (stage4 regional).
64 export NBINS=${NBINS:-1} # Number of latitude bins for length scale computation
65 export IBIN=${IBIN:-1} # Index of latitude bin to compute length scale for
66 export USE_RFi=${USE_RFi:-true} # Use recursive filters.
67 export USE_RF=.${USE_RFi}. # ForTran syntax.
68 export DO_NORMALIZE=${DO_NORMALIZE:-.false.} # Normalize before rf or wavelet filtering.
69 export PRINT_WAVELETS=${PRINT_WAVELETS:-.false.} # Print wavelets.
70 export WAVELET_FILT_LEN=${WAVELET_FILT_LEN:-6} # Wavelet filter length.
71 export WAVELET_NAME=${WAVELET_NAME:-C} # Wavelet name (B, C, D or V).
72 export WAVELET_NBAND=${WAVELET_NBAND:-1} # Number of wavelet bands.
73 export TESTING_SPECTRAL=${TESTING_SPECTRAL:-.false.} # True if performing spectral tests.
74 export LOCAL=${LOCAL:-true} # True if local machine.
75 export NUM_JOBS=${NUM_JOBS:-1} # Number of jobs to run (stage4 regional)).
76 export MACHINES=${MACHINES:-" node1 node1 node2 node2 node3 node3 node4 node4 "\
77 " node5 node5 node6 node6 node7 node7 node8 node8"}
78 export SMPAR=${SMPAR:-false} # True to use shared-memory parallelism in stage4.
79 export REGION=${REGION:-con200}
80 export EXPT=${EXPT:-noobs}
81 export ID=${ID:-gen_be}
82 export ID1=${ID1:-${BE_METHOD}.bin_type${BIN_TYPE}}
83 export VARIABLE1=${VARIABLE1:-chi_u} # For cov3d
84 export VARIABLE2=${VARIABLE2:-chi} # For cov3d
85 export CLEAN=${CLEAN:-false}
86 export FILE_TYPE=${FILE_TYPE:-wrfout}
87 export RESOLUTION_KM=${RESOLUTION_KM:-200.}
88 export NL_CV_OPTIONS=${NL_CV_OPTIONS:-5}
89 export NUM_PROCS=${NUM_PROCS:-1}
90 export PROCESS_AERO=${PROCESS_AERO:-false}
91 export AEROS_TO_PROCESS=${AEROS_TO_PROCESS:-" "}
92 export NOCOLONS=${NOCOLONS:-false} # Set to true if using WRF "nocolons" option
93 export ALLOW_MISSING_DATES=${ALLOW_MISSING_DATES:-false} # Set to true if you want GEN_BE to attempt to continue with gaps in data (missing dates)
95 # Directories:
96 export REL_DIR=${REL_DIR:-$HOME/trunk} # Directory containing codes.
97 export WRFVAR_DIR=${WRFVAR_DIR:-$REL_DIR/wrfvar} # WRF-Var code directory.
98 export BUILD_DIR=${BUILD_DIR:-$WRFVAR_DIR/var/build} # WRF-Var code build directory.
99 export DAT_DIR=${DAT_DIR:-${HOME}/data} # Top-level data directory.
100 export REG_DIR=${REG_DIR:-$DAT_DIR/$REGION} # Region-specific data dir.
101 export EXP_DIR=${EXP_DIR:-$REG_DIR/$EXPT} # Experiment-specific data dir.
102 export FC_DIR=${FC_DIR:-$EXP_DIR/fc} # Forecast directory
103 export RUN_DIR=${RUN_DIR:-$EXP_DIR/gen_be$BIN_TYPE} # Run dir.
104 export WORK_DIR=${WORK_DIR:-$RUN_DIR/working} # Working directory
105 export STAGE0_DIR=${STAGE0_DIR:-$WORK_DIR/stage0} # Output for stage0.
106 export STAGE0_GSI_DIR=${STAGE0_GSI_DIR:-$WORK_DIR/stage0_gsi} # Output for GSI stage0.
107 export STAGE1_GSI_DIR=${STAGE1_GSI_DIR:-$WORK_DIR/stage1_gsi} # Output for GSI stage0.
108 export LESS_LEVELS_FROM_TOP=${LESS_LEVELS_FROM_TOP:-0}
109 export LAT_BINS_IN_DEG=${LAT_BINS_IN_DEG:-1.0}
112 if $GLOBAL; then
113 export UH_METHOD=power
114 else
115 if ${USE_RFi}; then
116 export UH_METHOD=scale
117 else
118 export UH_METHOD=wavelet
122 if [[ $NL_CV_OPTIONS == 6 ]]; then
123 export CONTROL_VARIABLES=${CONTROL_VARIABLES:-" psi chi_u t_u rh_u ps_u "}
124 export RUN_GEN_BE_STAGE2A=false
125 elif [[ $NL_CV_OPTIONS == 7 ]]; then
126 export CONTROL_VARIABLES=${CONTROL_VARIABLES:-" u v t rh ps "}
127 export RUN_GEN_BE_STAGE2=false
128 export RUN_GEN_BE_STAGE2A=false
129 else
130 export CONTROL_VARIABLES=${CONTROL_VARIABLES:-" psi chi_u t_u rh ps_u "}
132 export DELETE_DIRS=${DELETE_DIRS:-" "}
134 export DEBUG=${DEBUG:-0}