This page was created by the IDL library routine
mk_html_help. For more information on
this routine, refer to the IDL Online Help Navigator
or type:
? mk_html_help
at the IDL command line prompt.
Last modified: Fri Jun 2 23:12:02 2006.
NAME: adjust_map
PURPOSE: adjust rainfall in the first 365 days of a noah weather
input file to match a given mean annual precipitation (MAP)
CATEGORY: noah model inputs
CALLING SEQUENCE: adjust_map, inputfile, MAP, outputfile, nsteps
INPUTS:
inputfile = name of the noah weather file to use as input
MAP = Mean Annual Precip to match
outputfile= name of the new noah weather file to write
OPTIONAL INPUTS:
nsteps = number of time steps per day
(if not supplied findnsteps will attempt to find this
value, and will default to 480)
KEYWORD PARAMETERS:
OUTPUTS: outputfile
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: Read data from input file
match the MAP of the first 365 days to the supplied MAP value
determine nsteps from the day column in the input file
if there are enough days find the ratio between real MAP
and rainfall in the first 365 days
adjust the first 365 days of rainfall to match MAP
read the header from the input file
write the output file
EXAMPLE: adjust_map, 'IHOPUDS1', 654, 'adjustedIHOPUDS1'
MODIFICATION HISTORY:
edg - 2/16/2006 - original
(See adjust_map.pro)
NAME: clmPlotAllofSOil
PURPOSE: Make postscript plots of relavent clm output variables with
one line for each soil listed in the current directory.
Finds soils with the name out_texture_number.
Can also plot a subset of the total soils with the skipn keyword
Can make plots of just mid-day values with the noonOnly keyword
Can plot to screen with the nops keyword
CATEGORY: plot clm output
CALLING SEQUENCE: plotAllofSoil, texture, T=T, TS=TS, SMC=SMC,
LHE=LHE, H=H, G=G,
outputfile=outputfile
INPUTS: texture = a string identifying the filenames to look up as "out_texture_*"
OPTIONAL INPUTS: all keywords are optional
KEYWORD PARAMETERS: T = plot top soil temperature
TS= plot skin temperature
SMC=plot Soil Moisture Content (in top layer)
LHE=plot Latent Heat Flux
H = plot Sensible Heat Flux
G = plot Ground Heat Flux
By default all are plotted.
If any keywords are set, only those keywords are plotted
OUTPUTS: Postscript file named either outputfile, or if outputfile
is not specified, named .ps
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE:
MODIFICATION HISTORY:
08/03/2004 - edg - original
09/??/2004 - edg - added noonsonly option,
just plot LE,
added skipn option
added nops option
10/15/2004 - edg - added rainfall plotting
10/23/2004 - edg - added nocolor and nopattern keywords
added title and position and nox keywords
cleaned up rainfall axis and drawing
12/1/2004 - edg - modified plotAllofSoil to become clmPlotAllofSoil
to plot clm output
(See clmPlotAllofSoil.pro)
NAME: clmSoilsWTexture
PURPOSE: Runs clm for all soils of a given texture specified in a pair of file.
Looks through the database of SHPs generated by MOSCEM (runMoscemSHP.pro)
and compHT2HK.pro, and uses the general.txt file from UNSODA to pick out texture
CATEGORY: Batch running clm
CALLING SEQUENCE: clmSoilsWTexture, texture, datafilename, texturefilename
INPUTS: texture = a string identifying the texture you wish to run clm for
e.g. "sandy loam" "clay" "silt clay loam" see the routine textIndex
for a complete list of textures
datafilename = filename of compHT2HK.pro outputfile
texturefilename = filename of "general.txt" file from UNSODA database
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS: clm output files named "out_texture_soilNumber.nc"
where : texture = the inputtexture name (without spaces)
soilNumber= the soil index number in the UNSODA database
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS: files tmpSevilleta_srf.txt and sevilleta_srf.nc in ../../inputdata/sev/srfdata/ are overwritten
RESTRICTIONS: Current directory must be clm/bld/offline/
PROCEDURE: Get an array of [soilNumber,Texture] from the texture file.
Read through the datafile, for each soil
If it matches the texture requested, and SHPs are reasonable
Write tmpSevilleta_srf.txt file then ncgen sevilleta_srf.nc file
Run clm
Rename output file
EXAMPLE:
MODIFICATION HISTORY:
1/25/2005 edg - Original modified from noahSoilsWTexture.pro
(See clmSoilsWTexture.pro)
NAME: clm_plot_flux_texture
PURPOSE: Plot clm model flux (and state) output for all runs from a texture class.
CATEGORY: plot clm output WRR 2006
CALLING SEQUENCE: clm_plot_flux_texture, texture, var=var, outputfile=outputfile, skipn=skipn,
keyday=keyday, nops=nops, nocolor=nocolor,
startday=startday, endday=endday, _extra=extra
INPUTS: texture = (string) name identifying the files to lookup as "out__*"
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
var = (integer [7]) column in model output to plot, can be an array of columns
outputfile = (string [_plot.ps]) name of the postscript file to
create (if nops is not set)
skipn = (integer or flag [0]) allows you to only plot every n files
NOTE if skipn=1 it is assumed to be a flag and min(50,nfiles) will be loaded
keyday = (integer [624]) day number from start of model output to look at
plots 10 days after and 2 days before, for now assumes rain occurs
the day before
nops = (flag [0]) if set plot to the screen rather than a postscript file.
nocolor = (flag [0]) if set plot in grey scale rather than color
startday = (integer [keyday-2.5]) day number from start of model output to start
output plot at
endday = (integer [keyday+10.5]) day number from start of model output to stop
output plot at
_extra = extra keywords to be passed to the plot command
OUTPUTS :
OPTIONAL OUTPUTS: if nops flag is not set a postscript file is created named or
if outputfile is not specified named _plot.ps
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: - Read desired columns from all/skipn data files
- Determine time step of model data assuming the first column is the time
- Plot all model outputs from 2 days before keyday to 10 days after
EXAMPLE: clm_plot_flux_texture, "sandy loam", outputfile="saloam.ps", /nocolor, skipn=10,
xtitle="Day", var=7, ytitle="Latent Heat Flux (W/m!E2!N)"
MODIFICATION HISTORY:
08/23/2005 - edg - original (based heavily on plotAllofSoil.pro)
(See clm_plot_flux_texture.pro)
NAME: colortable
PURPOSE: returns an array with values that can be passed to plot via the
color keyword.
CATEGORY: plotting
CALLING SEQUENCE: ct=colortable()
INPUTS:
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS: array of (currently 219) color values
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: create separate red, green, and blue component arrays
multiply red by 1, green by 256, and blue by 256^3
add red to green to blue and return the resulting array
black 0
red 1
green 2
blue 3
l. red 4
l. green 5
l. blue 6
l. grey 7
8-> 70 = smooth red colors
71->133 = smooth green colors
134->196 = smooth blue colors
197->207 = 11 colors selected from the 16 LEVEL color table
197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207
dk.gr, mid.gr, lt.gr, cyan, blue, purp., mag., dk.mag, red, grey, white
208-217 = black->white
EXAMPLE: ct=colortable()
for i=0, 218 do plot, indgen(10), color=ct[i]
MODIFICATION HISTORY:
Original - edg - 11/01/2005 - color table is from setupplot.pro
(See colortable.pro)
NAME: compTsTxt
PURPOSE: Compare Ts derived SHPs with texture class average derived SHPs
CATEGORY: noah output manipulation
CALLING SEQUENCE: compTsTxt, outPattern=outPattern, SHPdata=SHPdata
INPUTS:
OPTIONAL INPUTS:
outPattern - set this keyword to a string that defines the pattern file_search
should use to find the noah output files. default="out_*"
SHPdata - set this keyword to the file naming the SHP data file
default=file_search("*.data")[0]
KEYWORD PARAMETERS:
OUTPUTS:
outfile - text file with a list of SHP values and Ts errors from a randomly
choosen "true" Ts.
default name="outputfile"
answerfile - text file containing the "true" SHP values used
default name="answerfile"
OPTIONAL OUTPUTS:
theAnswer - set this keyword to print the inverted SHPs,
texture class SHPs, and "true" SHPs
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Read in all noah output files
randomly select one as "truth"
add 1K RMS error to the "truth" Ts series
measure the distance between all SHP runs and "true" Ts
find the minimum distance, these are our inverted SHPs
OPTIONALLY print, inverted SHPs, textureclass SHPs, "true" SHPs
EXAMPLE: compTsTxt, outPattern="out_sandyloam_*", SHPdata="sandyloam.data",
outfile="TsErrors", answerFile="secret"
MODIFICATION HISTORY:
5/20/2005 - EDG - original
(See comptstxt.pro)
NAME: convertRosetta2HTHK
PURPOSE: convert the rosetta database formate into the file format
expected by noahSoilsWTexture. One texture file containing a
soil index, three tildas, then the soil texture name.
And one data file containing the output from the compHT2HK.pro program
column formatted [index, err,r,err,r, n,a,Ks,Ts,Tr]
CATEGORY: Text File Processing / program Compatibility
CALLING SEQUENCE:
convertRosetta2HTHK, , (See convertRosetta2HTHK.pro)
NAME: dailyrainfall
PURPOSE:
Takes a time series of rainfall (or any variable really) and
computes the total rainfall for each day.
CATEGORY: general
CALLING SEQUENCE: dailyrainfall, rain, dt, offset=offset, binsize=binsize, average=average
INPUTS: rain, dt
rain : variable to be summed
dt : time step between rows in minutes
(e.g. 3 for 480 steps per day, 60 for 24 steps per day)
OPTIONAL INPUTS:
KEYWORD PARAMETERS: binsize, average, offset
binsize : alternative to dt, specifies how many steps per day
(or whatever), makes the routine more general
essentially this is turning into a running average routine
average : return the average in each bin rather than the total
offset : if set, returns a subset of the daily totals started at offset
OUTPUTS: returns array of totals (or averages) within each bin (day)
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE: dailyprecip=dailyrainfall(precip, 30)
MODIFICATION HISTORY:
2/20/2006 - edg - separated from noah_pickbest_multistorm
(See dailyrainfall.pro)
NAME: e00_Poly2Tiff
PURPOSE: Convert Arc Export file format (.e00) files into geoTiff files
CATEGORY: File Import/Export
CALLING SEQUENCE: e00_Poly2Tiff, e00_Filename, geotiff_Filename, resolution
INPUTS:
e00_Filename : Name of the e00 file to be imported
geotiff_Filename : Name of the output geotiff file
OPTIONAL INPUTS:
resolution : spatial resolution of the geotiff in meters
DEFAULT : 1000m
KEYWORD PARAMETERS: NONE
OUTPUTS: NONE (geotiff file)
OPTIONAL OUTPUTS: NONE
COMMON BLOCKS: NONE
SIDE EFFECTS: NONE (that I know of ;)
RESTRICTIONS: NONE (that I know of ;)
PROCEDURE:
EXAMPLE:
e00_Poly2Tiff, "soilsMap.e00", "soilsMap.tif", 100
MODIFICATION HISTORY:
02/18/2005 - edg - original
(c) 2005 Ethan Gutmann
(See e00_Poly2Tiff.pro)
NAME: extract_timeseries
PURPOSE: retrieve a time series of data for a single location from
a set of geotiff files. Ideally geotiff files should be
output from resample_ts.pro. If not, file names must be
as they would be from resample_ts.pro
CATEGORY: Processing MODIS data
CALLING SEQUENCE: extract_timeseries, lat, lon, dir=dir, outfile=outfile, raw=raw
INPUTS:
lat - latitude (in either UTM or decimal degrees)
lon - longitude (in either UTM or decimal degrees)
(both lat and lon must be in the same format (UTM or DD)
default location is the sevilleta Shrub site
OPTIONAL INPUTS: (lat and lon default to sevilleta shrub site)
KEYWORD PARAMETERS:
dir - directory to search for geotiff files (default = '.')
outfile - name of output file to be created (default = 'timeseries.txt')
raw - if this keyword is set (non-zero) MOD11A1v004 gains will
not be appliet to the output data (if you are not
using MOD11A1v004 data you should probably set this flag)
OUTPUTS: outfile - a column formated output file that will contain a
header describing each column, followed by data
with one row for each original input geotiff file
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS: all geotiff files must cover the same area, and file
names must follow a specific file format
REQUIRED IDL FILES :
text_progressbar.pro
PROCEDURE:
EXAMPLE: extract_timeseries, 33.3434, -105.2343, dir='/data/modis/raw/', outfile='BSS_MODIS_LST.txt', /raw
MODIFICATION HISTORY:
5-12-2006 - edg - original
(See extract_timeseries.pro)
NAME: make_wrr_map
PURPOSE: draw a map of the field area for wrr paper number 1
CATEGORY: mapping, figures, general
CALLING SEQUENCE: make_wrr_map, sitefile, psfile
INPUTS: sitefile=text file containing lat,lon pairs for sites
psfile = postscript file
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS: postscript file
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: read site locations from a file,
plot state boundaries and sites
EXAMPLE: make_wrr_map, "sites.txt", "sitemap.ps"
MODIFICATION HISTORY:
original - edg - 1/16/2006
(See make_wrr_map.pro)
NAME: noahSoilsWTexture
PURPOSE: Runs noah for all soils of a given texture specified in a pair of file.
Looks through the database of SHPs generated by MOSCEM (runMoscemSHP.pro)
and compHT2HK.pro, and uses the general.txt file from UNSODA to pick out texture
CATEGORY: Batch running noah
CALLING SEQUENCE: noahSoilsWTexture, texture, datafilename, texturefilename
INPUTS: texture = a string identifying the texture you wish to run noah for
e.g. "sandy loam" "clay" "silt clay loam" see the routine textIndex
for a complete list of textures
datafilename = filename of compHT2HK.pro outputfile
texturefilename = filename of "general.txt" file from UNSODA database
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS: noah output files named "out_texture_soilNumber"
where : texture = the inputtexture name (without spaces)
soilNumber= the soil index number in the UNSODA database
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS: file SOILPARM.TBL in current directory is overwritten
RESTRICTIONS: Current directory must contain Noah control files
IHOPstyp must be set to 1
PROCEDURE: Get an array of [soilNumber,Texture] from the texture file.
Read through the datafile, for each soil
If it matches the texture requested, and SHPs are reasonable
Write SOILPARM.TBL file
Run noah
Rename output file
EXAMPLE:
MODIFICATION HISTORY:
8/2/2004 edg - Original
(See noahSoilsWTexture.pro)
NAME: noah_pickbest_multistorm
PURPOSE: Find optimal SHPs from multiple storms in a time series.
Search through a time series of rain and measured and modelled ET.
For each rain storm find the model run ET that best fits the measured ET.
CATEGORY: noah model post processing
CALLING SEQUENCE: noah_pickbest_multistorm, correlate=correlate,
sday=sday, eday=eday, ndays=ndays,
measure_column=measure_column, model_column=model_column,
meas_model_offset=meas_model_offset,
outputfile=outputfile, rain_column=rain_column
INPUTS: none required
OPTIONAL INPUTS: keywords
KEYWORD PARAMETERS:
correlate = if set, uses correlation rather than RMS error between ET time series
to select optimal SHP
sday, eday= if set, starting and ending days in MODEL time series to look at
ndays = if set number of days after a storm to use to define SHPs
measure_column= the column in the measured data to use for fitting SHPs
model_column = the column in the modelled data to use for fitting SHPs
rain_column = the column in the measured data to read rainfall data from.
meas_model_offset = offset (in days) between measured and modelled data,
model starts after measured = positive offset
outputfile = output filename to write best SHP filename too.
OUTPUTS: writes a file with one line for each storm it fit SHPs to. Each line contains
the name of the model output file it thought was the best fit.
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Load model output files returning only the column of interest for each model run
Load measured flux and rain data from measurement file
Calculate mid-day values from model and measured data
Calculate daily rainfall amounts
Search throuhh daily rainfall for a day with >=6mm of rain
use the proceeding 6 days (or until another storm 2mm or larger) to fit SHPs
if only 2 days are available before another rainstorm don't use
write the best SHP model output file name to the output file
EXAMPLE: noah_pickbest_multistorm
MODIFICATION HISTORY:
1/27/2006 - edg - original
(See noah_pickbest_multistorm.pro)
NAME: noah_plot_flux_texture
PURPOSE: Plot noah model flux (and state) output for all runs from a texture class.
CATEGORY: plot noah output WRR 2006
CALLING SEQUENCE: noah_plot_flux_texture, texture, var=var, outputfile=outputfile, skipn=skipn,
keyday=keyday, nops=nops, nocolor=nocolor,
startday=startday, endday=endday, _extra=extra
INPUTS: texture = (string) name identifying the files to lookup as "out__*"
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
var = (integer [7]) column in model output to plot, can be an array of columns
outputfile = (string [_plot.ps]) name of the postscript file to
create (if nops is not set)
skipn = (integer or flag [0]) allows you to only plot every n files
NOTE if skipn=1 it is assumed to be a flag and min(50,nfiles) will be loaded
keyday = (integer [624]) day number from start of model output to look at
plots 10 days after and 2 days before, for now assumes rain occurs
the day before
nops = (flag [0]) if set plot to the screen rather than a postscript file.
nocolor = (flag [0]) if set plot in grey scale rather than color
startday = (integer [keyday-2.5]) day number from start of model output to start
output plot at
endday = (integer [keyday+10.5]) day number from start of model output to stop
output plot at
_extra = extra keywords to be passed to the plot command
OUTPUTS :
OPTIONAL OUTPUTS: if nops flag is not set a postscript file is created named or
if outputfile is not specified named _plot.ps
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: - Read desired columns from all/skipn data files
- Determine time step of model data assuming the first column is the time
- Plot all model outputs from 2 days before keyday to 10 days after
EXAMPLE: noah_plot_flux_texture, "sandy loam", outputfile="saloam.ps", /nocolor, skipn=10,
xtitle="Day", var=7, ytitle="Latent Heat Flux (W/m!E2!N)"
MODIFICATION HISTORY:
08/23/2005 - edg - original (based heavily on plotAllofSoil.pro)
(See noah_plot_flux_texture.pro)
NAME: plotAllofSOil
PURPOSE: Make postscript plots of relavent noah output variables with
one line for each soil listed in the current directory.
Finds soils with the name out_texture_number.
Can also plot a subset of the total soils with the skipn keyword
Can make plots of just mid-day values with the noonOnly keyword
Can plot to screen with the nops keyword
CATEGORY: plot noah output
CALLING SEQUENCE: plotAllofSoil, texture, T=T, TS=TS, SMC=SMC,
LHE=LHE, H=H, G=G,
outputfile=outputfile
INPUTS: texture = a string identifying the filenames to look up as "out_texture_*"
OPTIONAL INPUTS: all keywords are optional
KEYWORD PARAMETERS: T = plot top soil temperature
TS= plot skin temperature
SMC=plot Soil Moisture Content (in top layer)
LHE=plot Latent Heat Flux
H = plot Sensible Heat Flux
G = plot Ground Heat Flux
By default all are plotted.
If any keywords are set, only those keywords are plotted
OUTPUTS: Postscript file named either outputfile, or if outputfile
is not specified, named .ps
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE:
MODIFICATION HISTORY:
08/03/2004 - edg - original
09/??/2004 - edg - added noonsonly option,
just plot LE,
added skipn option
added nops option
10/15/2004 - edg - added rainfall plotting
10/23/2004 - edg - added nocolor and nopattern keywords
added title and position and nox keywords
cleaned up rainfall axis and drawing
(See plotAllofSoil.pro)
NAME: pretty_globe
PURPOSE: make a pretty postscript file of the globe for use in
publications as a map background
CATEGORY: mapping, figures
CALLING SEQUENCE: pretty_globe, filename
INPUTS: filename = name of postscript file
OPTIONAL INPUTS: _extra=e passes extras to map_set
KEYWORD PARAMETERS:
OUTPUTS: postsctipt file
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE: set up the map projection (as seen from a satellite
100 earth radii above the earth) with filled continents
draw country and US State borders
EXAMPLE: pretty_globe, "my_globe.ps"
MODIFICATION HISTORY:
Original - edg - 1/16/05 for 1st wrr paper
(See pretty_globe.pro)
NAME: resample_ts
PURPOSE: resample a series of MODIS files into UTM
CATEGORY: MODIS processing
CALLING SEQUENCE: resample_ts, inputdir=inputdir,
outputdir=outputdir,
masterPRM=masterPRM,
fieldfile=fieldfile,
resample=resample,
workingDIR=workingDIR
INPUTS:
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
inputdir : directory containing MODIS files
default = /Volumes/hydra/MODIS/2002_60-273_ts_h09v05_Terra/
outputdir : directory to place output files
default = /Volumes/hydra/MODIS/2002_60-273_ts_reproj_Terra/
masterPRM : sample resample parameter file
default = "MASTER.prm"
fieldfile : text file, each line is a MODIS fieldname
default = all fields in MODIS_LST (MOD11A1)
resample : resample program to run (full path to file
if not in current directory)
default = '~/heg/bin/resample'
workingDIR:directory to create temporary .prm file in
default = './'
OUTPUTS:
subset UTM geotiff files, one for each fieldname and MODIS file
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS: YOU MUST BE ABLE TO RUN RESAMPLE e.g. you must have
MRDATA, MRBIN, etc. environment variables set.
PROCEDURE: find all input files, loop over input files, loop over fieldnames
for each fieldname-filename, write a resample .prm file
run resample
EXAMPLE: resample_ts, inputdir='/data/modis/raw/',
outputdir='/data/modis/geotiffs/',
masterPRM='master.prm',
fieldfile='fields.txt',
workingDIR='/data/modis/'
MODIFICATION HISTORY:
5-11-06 - edg - original
5-23-06 - edg - added workingDIR keyword
modified to work with spaces in field names
(See resample_ts.pro)
NAME: resizeImg
PURPOSE: resize a geotiff and compute the standard deviation of the
values used to generate each new pixel. Output two image files.
CATEGORY: Image manipulation, geotiff
CALLING SEQUENCE: resizeImg, "inputfile", "outputfileBASENAME",
out_numberofSamples, out_numberofLines
INPUTS: input geotiff filename, output filename (without the .tif)
OPTIONAL INPUTS: badVal
KEYWORD PARAMETERS:
badVal=badVal set this equal to the value in the input file
you want to ignore. Default is -3000 (it will
also ignore badVal-1)
OUTPUTS: outfilefileBASENAME+"_data.tif"
outfilefileBASENAME+"_stdev.tif"
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE: resizeImg, "input.tif", "output", 1000,2000, badVal=-9999
MODIFICATION HISTORY:
2003/2004?-edg - original
11/3/04 - edg - serious rewrite to read one line of a geotiff
file at a time and add the badVal keyword
(See resizeImg.pro)
NAME: unsat_soils_w_texture
PURPOSE: Runs unsat for all soils of a given texture specified in a pair of file.
Looks through the database of SHPs generated by MOSCEM (runMoscemSHP.pro)
and compHT2HK.pro, and uses the general.txt file from UNSODA to pick out texture
CATEGORY: Batch running unsat
CALLING SEQUENCE: unsat_soils_w_texture, texture, datafilename, texturefilename
INPUTS: texture = a string identifying the texture you wish to run noah for
e.g. "sandy loam" "clay" "silt clay loam" see the routine textIndex
for a complete list of textures
datafilename = filename of compHT2HK.pro outputfile
texturefilename = filename of "general.txt" file from UNSODA database
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS: noah output files named "out_texture_soilNumber"
where : texture = the inputtexture name (without spaces)
soilNumber= the soil index number in the UNSODA database
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS: file SOILPARM.TBL in current directory is overwritten
RESTRICTIONS: Current Directory must have one *.inp file that is
otherwise setup properly for the runs of interest
PROCEDURE: Get an array of [soilNumber,Texture] from the texture file.
Read through the datafile, for each soil
If it matches the texture requested, and SHPs are reasonable
modify *.inp file
Run unsat
Rename output file
EXAMPLE: unsat_soils_w_texture, "sandyloam", "vgHTHK", "newGeneral.txt"
MODIFICATION HISTORY:
12/20/2005 edg - Original based on noahSoilswTexture
written specifically to analyze Ks distributions
and infiltration distributions resulting
from that given a 0 head top boundary
(See unsat_soils_w_texture.pro)