Download PDF
Download page GridReader.
GridReader
DESCRIPTION
This utility reads TIN or Grid information, in any supported MetVue format,
and stores it in any supported MetVue output format.
Some providers require additional command line options. Of the built-in
providers, DSS and DSSTin are the only providers requiring additional
options. The additional DSS and DSSTin options are provided at the end of
this page.
USAGE
GridReader ( ( -inFile fileSpec ) ( -dir outputDirectory | -outFile outputFile ) &| -controlFile file )
[-inUnits units]
[-tinInputInterval timeInterval]
[-sTime time] [-eTime time] [-dTime timespan]
[-readTimeZone timeZone]
[-extentsShapefile shapefile]
[-maxTins numTins]
(-prjFile file [-gridSpacing number])
[-samplingMethod ( inverseDistSq | surfaceInterp )]
[-nearestNeighbor [ dist ]]
[-shift timespan]
[-outUnits units]
[-title title]
[-writeTimeZone timeZone]
[-?writeProvider] [-writeProvider provider] [-writeType writeType]
[-dssA dssApart][-dssB dssBpart] [-dssC dssCpart] [-dssF dssFpart]
Additional provider options are provided in the DSS and DSSTin Provider Options
sections below.
OPTIONS
-inFile fileSpec
The filename to process.The fileSpec can be a simple filename or can
contain masks.
-dir outputDirectory
Specifies a directory where the output files will be placed. With this
option, the output files will match the input file name.
This cannot be combined with -outFile
-outFile outputFile
The name of the output file to use.
If the output file is a DSS file, or has a DSS extension, the images
will be stored in DSS.
If the file does not exist or is not a DSS file, the images will be
stored on the file system.
Output files may be specified with a filename mask to specify naming
conventions (e.g. %e:yyyyMMMdd_HHmm%.tin).
This cannot be combined with -dir
-controlFile file
Designates and input file that contains a list of argument blocks.
Each block is delimited by an empty line, and all contents in between
specify additional operations to perform beyond what is specified at the
command line, and any missing necessary arguments within a block are
filled with command line arguments. The control file contents always take
precedence over the command line arguments.
Example Control File Block:
infile: inputFile.nc
outfile: outputFile.nc
stime: 06OCT1985,000000
etime: 06OCT1985,010000
-inUnits units
Specify data units that the input file units are in. Default is 'mm' if
not specified and cannot be determined from the input file directly.
-tinInputInterval timeInterval
Used to constrain the TINs to the specified time interval. Refer to -dTime
option for applicable formats. Use this option to ensure that the program
uses only TINs with a specific time interval for computations.
For example use '-tinInputInterval 1Hour' to ensure that files or paths which
match the given file/path masks are also 1 hour time interval.
-sTime time
See Command Line Time Specifications
-eTime time
See Command Line Time Specifications
-dTime timespan
See Command Line Time Specifications
-readTimeZone timeZone
Override of the read time zone. If specified, the time zone specified
in the input file's metadata will be ignored, and replaced with the
time zone specified at the command line.
A listing of the available time zones can be found at
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. The TZ
database name should be passed in as the argument. It's preferred to use
time zone specifications with the Canonical status if possible.
-extentsShapefile shapefile
Shapefile that specifies the extent to read data. This is equivalent
to the extent read constraints in the read dialogs within the program
-maxTins numTins
Specify the maximum number of TINs that can be processed during the
invocation of the command. All the possible variations of the command
options may result in an unintentionally large set of TINs to be processed.
For example, if an erroneous time span was entered, an excessive number
of TINs may be processed. When this occurs the program can appear to
freeze as it iterates through all the possibilities.
By default this value is set as 100,000.
-prjFile file
A file that contains a valid WKT for the desired output projection. If
undefined, the data will remain in the input projection.
Certain -writeProvider and -writeType combinations imply a specific
coordinate system projection, such as using a DSS provider and a write
type of HRAP or SHG. In the case of a projection specific write type, the
projection argument becomes unnecessary. Some write providers may
infer a valid projection definition (i.e. DSS SHG or HRAP), but the
gridSpacing can still be specified
-gridSpacing number
Desired output grid spacing in the units defined by the output projection.
If undefined, the a default value of 0.1 will be used.
-samplingMethod (inverseDistSq | surfaceInterp)
Specifies the methodology used to sample the source TIN.
Inverse distance squared weighting (inverseDistSq) uses the source grid
cells surrounding each target grid cell to set the target grid cell value.
Surface Interpolation (surfaceInterp) computes the value of each target
grid cell by using the centerpoint location of the cell on the corresponding
source TIN triangle element.
If not specified, the default is dependant on the source TIN. If the source
TIN is a gridded dataset, the inverseDistSq option is used. If the source
TIN is an ungridded dataset, the program uses the surfaceInterp option. Both
methods give similar resultant target grids, however the inverseDistSq method
is much faster when it can be used. Legacy versions of MetVue used only the
surfaceInterp method.
Note: The program will ignore this option when processing ungridded source
TINs and use surfaceInterp for the sampling method.
-nearestNeighbor dist
Specified to use the 'nearest neighbor' point on the
source TIN when setting the value for the grid cell on the target TIN,
instead of using the specified sampling method. If no point is found
within range the value is determined using the -samplingMethod option.
The 'dist' portion of the argument is optional (defaults to 1.0) and
specifies the distance in target grid cells that the nearest neighbor
point must be to be used.
-nearestNeighbor would use the closest point found if the centerpoint
of the source TIN was within 1/2 cell distance of the target TIN.
-nearestNeighbor 3 would use the closest point found if the centerpoint
of the source TIN was within 1 1/2 cells distance of the target TIN.
-nearestNeighbor .5 would use the closest point found if the centerpoint
of the source TIN was within +/-1/4 cells distance of the target TIN.
-shift timespan
The amount of time to shift the image from its encoded time.
The formats are the same as for the -dTime option with the additional
specification that the timespan can be negative. e.g. -06:00:00
-outUnits units
Specify data units that the output file units are in. Default is 'mm'.
-title title
Used to specify a title for the output file. If none is specified the
program will attempt to generate one from available information.
A title that has blanks should be enclosed in double quotes.
-writeTimeZone timeZone
Specifies the time zone for which the output data will be written. If
not specified, the output will be written in the time zone of the input data.
A listing of the available time zones can be found at
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. The TZ
database name should be passed in as the argument. It's preferred to use
time zone specifications with the Canonical status if possible.
-?writeProvider
See Grid and TIN Writing Arguments
-writeProvider provider
See Grid and TIN Writing Arguments
-writeType writeType
See Grid and TIN Writing Arguments
-dssA through -dssF
Specify pathname parts for the output DSS path when saving to DSS.
DSS PROVIDER SPECIFIC OPTIONS
-inFile
Same as the -inFile argument described above.
-pathName pathName
Designates the path name, or mask, for the record(s) that should be read.
DSSTin PROVIDER SPECIFIC OPTIONS
-inFile
Same as the -inFile argument described above.
-pathName pathName
Designates the path name, or mask, for the record(s) that should be read.
SAMPLE COMMAND LINE ARGUMENTS
Single NetCDF file being converted to DSS
-inFile C:\file.nc -outFile C:\file.dss
Multiple NetCDF files being converted to DSS with date masking, filtering by
1 hour duration, and only allowing a maximum of 10 images to be processed.
-inFile C:\filenamebase%e:yyyyMMMdd_HHmm% -outFile C:\file.dss
-tinInputInterval 1Hour -sTime 06OCT1985,000000 -eTime 06OCT1985,240000
-maxTins 10
Shifting NetCDF file 3 days forward and saving to DSS
-inFile C:\file.nc -outFile C:\file.dss -shift 72h
NOTE FOR WINDOWS USERS
Any command line arguments containing a % sign needs to be escaped in order
to work. For example The command:
-inFile C:/mydata/%yyyyMM%/%yyyyMMddHH%00z.rad...
becomes:
-inFile C:/mydata/%%yyyyMM%%/%%yyyyMMddHH%%00z.rad...
NOTE ON PERFORMANCE
This program may utilize a significant amount of memory depending on datasets specified.
For extra intensive data operations, it may be necessary to increase the memory allocated
to the jvm. This can be performed by setting the -Xmx argument, which can be altered
easily in the "memory_setting" variable in the GridReader.cmd example file provided.