Download PDF
Download page NCGribExtractor.
NCGribExtractor
DESCRIPTION
This utility reads NetCDF or GRIB files, and converts the grids into individual
ESRI FLT files for use within HEC-MetVue. Data from files are extracted
for each time step and layer. Output files are named based on the following
convention: VariableName_Tttt_Llll.flt, where ttt is the time step index and
lll is the layer number index.
USAGE
NCGribExtractor [ -info filename] |
[ (-inputFile filename)
[-variable (variableName | ?) ]
[-layer layerNumber]
[-rateToDepth]
[-duration]
[-outputDirectory directory] ]
OPTIONS
-info filename
Information about the contents of the file will be printed to the console
-inputFile filename
The filename to process
-variable variableName | ?
variableName: The long name of the variable, or the variable name if long name
isn't specified, for the variable to be selected.
Or
?: Listing of the available variables will be printed to
the console.
If the -variable argument is not specified, then all variables will be read.
-layer layerNumber
The index of the layer to be read. The layer is considered to be the
dimension that is neither the x, y, or time dimension of the variable.
If not specified, all layers will be read.
-rateToDepth
This argument specifies that any precipitation rate variables will be
converted to depths. If the target variable only has one time-step,
the -duration argument is required to perform this conversion.
-duration
This argument specifies the duration for which the precipitation rate applies.
This duration is multiplied by the precipitation rate to create a depth.
This argument is used in conjunction with the -rateToDepth argument, but
is only required when the target variable has a single time-step. If the target
variable has multiple time steps, and -duration is not specified,
the duration is estimated as the interval between time steps.
Refer to Command Line Time Specifications for acceptable durations syntax.
-outputDirectory directory
The output directory to save the extracted grids into. If not specified,
the files will be saved into a directory within the input file's
directory, where the directory name matches the filename.
Example: "NCGribExtractor -inputFile C:\\MyFile.nc -variable variableName"
would extract the data to C:\\MyFile\variableName_Tttt_Llll.flt
SAMPLE COMMAND LINE ARGUMENTS
NCGribExtractor -inputfile NLDAS.grb -variable "Soil Moisture Content @ Layer between 2 depths below land surface layer" -layer 4 -outputdirectory NLDAS_SM
NCGribExtractor -inputfile HRRR.grib2 -variable "Precipitation rate @ Ground or water surface" -outputdirectory HRRR_PR
NCGribExtractor -inputfile HRRR.grib2 -variable "Precipitation rate @ Ground or water surface" -rateToDepth -outputdirectory HRRR_PR
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 NCGribExtractor.cmd example file provided.