Hydrologic Projects
ESPAM2 Recharge Tools 1.5 Documentation
ESPAMTool Command Line Application
ESPAMTool is a command line application that generates text files from datasources specified in the settings.ini file.
Using the Command Line Tools
The command line program called espamtool is another way to build files. Expand the sections below to see examples and syntax.
Building CEL File
Example: Build an CEL file writing the output out to D:\out.cel
Syntax: espamtool -t cel -o <Output CEL File>
espamtool -t cel -o D:\out.cel
Building CNL File
Example: Build an CNL file writing the output out to D:\out.cnl
Syntax: espamtool -t cnl -o <Output CNL File>
espamtool -t cnl -o D:\out.cnl
Building DIV File
Example: Build an DIV file starting in the second month of 1980 for 100 stress periods writing the output out to D:\out.div
Syntax: espamtool -t div -o <Output DIV File> -y <year> -m <month> --sp=<Number of Stress Periods> {--zero-return}
espamtool -t div -o D:\out.div -y 1980 -m 2 --sp=100
Building ENT File
Example: Build an ENT file writing the output out to D:\out.ent
Syntax: espamtool -t ent -o <Output ENT File>
espamtool -t ent -o D:\out.ent
Building ETI File
Example: Build an ETI file writing the output out to D:\out.eti
Syntax: espamtool -t eti -o <Output ETI File>
espamtool -t eti -o D:\out.eti
Building FPT File
Example: Build an FPT file writing the output out to D:\out.fpt
Syntax: espamtool -t fpt -o <Output FPT File>
espamtool -t fpt -o D:\out.fpt
Building IAR File
Example: Build an IAR file for 100 stress periods, writing the output out to D:\out.iar:
Syntax: espamtool -t iar -o <Output IAR File> --sp=<Number of Stress Periods>
espamtool -t iar -o D:\out.iar --sp=100
Building Curtailment IAR File
Example: Build an IAR file for a curtailment scenario with 100 stress periods, starting with the priority date of 1-1-1950 writing the output IAR file to D:\out.iar, and writing the rasters to D:\out_rasters
Syntax: espamtool -t curtailment -o <Output IAR File> --sp=<Number of Stress Periods> -r <Output Raster Directory> -p <Priority Date in MM-DD-YYYY> --est-flag <A|G> --gw-multiplier=<Groundwater Multiplier> --sw-multiplier=<Surface Water Multiplier>
espamtool -t curtailment -o D:\out.iar -r D:\out_rasters --sp=100 -p 1-1-1950 --est-flag=A --gw-multiplier=-1 --sw-multiplier=0
Building NIR File
Example: Build an NIR file writing the output out to D:\out.nir
Syntax: espamtool -t nir -o <Output NIR File>
espamtool -t nir -o D:\out.nir
Building OFF File
Example: Build an OFF file writing the output out to D:\out.off
Syntax: espamtool -t off -o <Output OFF File>
espamtool -t off -o D:\out.off
Building PCH File
Example: Build an PCH file writing the output out to D:\out.pch
Syntax: espamtool -t pch -o <Output PCH File>
espamtool -t pch -o D:\out.pch
Building PRE File
Example: Build an PRE file writing the output out to D:\out.pre
Syntax: espamtool -t pre -o <Output PRE File>
espamtool -t pre -o D:\out.pre
Building PRISM Inputs
Example: Create an Esri Grid at D:\us_ppt of the Raw GZipped PRISM File D:\us_ppt_2000.01.gz
Syntax: espamtool -t prism --prism=<Input PRISM File> -o <Output PRISM Grid> -gz=<Is The PRISM File GZipped?>
espamtool -t prism --prism=D:\us_ppt_2000.01.gz -o D:\us_ppt -gz=True
Building PRISM Inputsin Batch Mode
Example: Convert a directory containing raw GZipped files downloaded from the PRISM FTP site and write the output Esri GRID files into a separate directory.
Syntax: espamtool -t prismbatch -i <prism_directory> -r <output_directory>
espamtool -t prismbatch -i D:\\prism_download_dir -r D:\\output_grid_dir
Building SOL File
Example: Build an SOL file writing the output out to D:\out.sol
Syntax: espamtool -t sol -o <Output SOL File>
espamtool -t sol -o D:\out.sol
Building TRB File
Example: Build an TRB file writing the output out to D:\out.trb
Syntax: espamtool -t trb -o <Output TRB File>
espamtool -t trb -o D:\out.trb
Running PDate Tool
Example: Run the PDate tool with a priority date of 1-1-1950 writing the output to D:\out.csv
Syntax: espamtool -t pdate -o <Output CSV File> --priority=<Priority Date in MM-DD-YYYY> --est_flag=<A|G>
espamtool -t pdate -o D:\out.csv --priority=1-1-1950 --est_flag=a
Command Line Switches
--debug
Set debug mode to see tracebacks.
--est-flag=est_flag
Est Flag for Curtailment
--gw-multiplier=gw_multiplier
Groundwater Multiplier
-h
Displays abbreviated help message.
--help
Displays verbose help message.
-i name, --input-directory=name
Specify the tool to run
--input-prism=prism_file, --prism=prism_file
Input PRISM File
-m month, --starting-month=month
Starting Month
-o output, --output=output
Output file Location
--output-raster-dir=output_raster_dir, -r output_raster_dir
Output directory to save permanent raster files to
-p priority_date, --priority-date=priority_date
Priority Date for Curtailment
--prism-gzipped
The input PRISM file is in its original GZipped state
--profile=profile
Override the default profile name of 'default'
--quiet
Turn on quiet mode.
--settings-file=settings_file
Override default settings.ini file
--sp=stress_periods, --stress-periods=stress_periods
Number of stress periods
--starting-year=year, -y year
Starting Month
--sw-multiplier=sw_multiplier
Groundwater Multiplier
-t name, --tool=name
Specify the tool to run
--temp-workspace=temp_workspace
Override default temporary workspace as defined in the
settings.ini file
-v
Increment the verbose level.
Higher levels are more verbose. The default is 1.
--verbose=level
Set the verbose level.
--zero-return
Zero the returns from the div spreadsheet