Former-commit-id:a02aeb236c
[formerly9f19e3f712
] [formerlya02aeb236c
[formerly9f19e3f712
] [formerly06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]] Former-commit-id:06a8b51d6d
Former-commit-id:8e80217e59
[formerly3360eb6c5f
] Former-commit-id:377dcd10b9
70 lines
2.5 KiB
Bash
70 lines
2.5 KiB
Bash
#!/bin/ksh
|
|
|
|
# run_create_prism
|
|
#
|
|
# Bryon Lawrence October 5, 2006 OHD
|
|
#
|
|
# Purpose:
|
|
#
|
|
# This is the run script for the MPEClimo PRISM generating program. It takes
|
|
# the national precipitation and temperature PRISM files available from Orgeon State
|
|
# University and crops them to a office's MPE forecast area. These cropped PRISM
|
|
# files are stored in XMRG format. They can be displayed in MPE Editor.
|
|
#
|
|
# This script requires three arguments:
|
|
#
|
|
# 1) Input Prism File Prefix
|
|
# 2) Output Prism File Suffix
|
|
# 3) Temperature/Precipitation PRISM flag. This may be either "t" or "p"
|
|
#
|
|
# The prism_input_dir token provides the path to the raw PRISM files.
|
|
# The prism_output_dir token provides the path to the cropped XMRG PRISM files.
|
|
#
|
|
# This routine expects there to be 13 raw PRISM files, one for each month and one
|
|
# for the entire year. This routine will create XMRG files corresponding to the
|
|
# raw PRISM files.
|
|
#
|
|
# This routine assumes that the input prism files have the suffix "_MM" where MM
|
|
# is the 2 digit month number. When generating the output PRISM files, this
|
|
# routine will append a "_MMM" to each month's XMRG PRISM filename. MMM is the
|
|
# lower case 3 character month abbreviation.
|
|
#
|
|
# For example, run_create_prism us_tmax prism_max_temp t
|
|
#
|
|
# Will look for the files
|
|
#
|
|
# us_tmax_01 us_tmax_04 us_tmax_07 us_tmax_10 us_tmax_14
|
|
# us_tmax_02 us_tmax_05 us_tmax_08 us_tmax_11
|
|
# us_tmax_03 us_tmax_06 us_tmax_09 us_tmax_12
|
|
#
|
|
# in the input directort specified by the prism_input_dir token.
|
|
#
|
|
# It will generate the following files in the prism_output_dir token:
|
|
#
|
|
# prism_max_temp_jan prism_max_temp_apr prism_max_temp_jul prism_max_temp_oct
|
|
# prism_max_temp_feb prism_max_temp_may prism_max_temp_aug prism_max_temp_nov
|
|
# prism_max_temp_mar prism_max_temp_jun prism_max_temp_sep prism_max_temp_dec
|
|
# prism_max_temp_ann
|
|
#
|
|
#
|
|
#
|
|
|
|
if [[ $# -ne 3 ]]
|
|
then
|
|
print "Usage: run_create_prism <prism_input_file_prefix>"
|
|
print " <prism_output_file_prefix>"
|
|
print " <t|p>"
|
|
exit 1;
|
|
fi
|
|
|
|
export SYS_JAVA_BIN_DIR=$SYS_JAVA_DIR/bin
|
|
|
|
# Temporarily set here.
|
|
export CLASSPATH=${PPROC_BIN}/prism.jar
|
|
|
|
# Temporarily set here.
|
|
export prism_input_dir=/fs/hseb/whfs/site_data/mpe_data/PRISM
|
|
#export prism_output_dir=/fs/hseb/whfs/cbrfc_historical/cbrfc/mpe_editor/local/data/app/MPE/PRISM
|
|
|
|
# Start the MPEClimo program
|
|
$SYS_JAVA_BIN_DIR/java ohd.hseb.prism.MPEClimo $1 $2 $3
|