Converting to real values from the "-k
krunch"
option
Option Syntax | Optional or Mandatory | Description |
-o filename |
|
Specifies the name of the output file. If no output file is specified the data will be written to the file ifpnetCDFFile.cdf |
-h hostname |
|
Specifies the EDEX host from which the data will be extracted. |
-r port |
|
Specifies the EDEX host from which the data will be extracted. |
-u user |
|
Specifies the user for connection to the server. Defaults to SITE. Important only when using edit area masks and the mask hasn't been defined in BASE or SITE. |
-d databaseID |
|
Source database identifier from which to get the data. There may be only one databaseID specified. The format of the database identifier is: site_GRID_optType_modelName_modelRunTime. For example: DEN_GRID__eta_19980604_1200. (Note double underscore after GRID for databases that don't have the optional type) |
-p weatherElementName |
|
If no -p switches are present, then all weather elements in the specified databases will be processed. There may be several -p switches present if desired. For example: -p T -p Td -p Wind. The weather element name refers to the SFC level, unless the weather element name contains an underscore. To specify a level other than SFC, use the format weatherElementName_level, such as T_3K. |
-s startTime |
|
Specifies the start time for the range of grids to extract. If no time is specified, then assume "from the beginning of time". Format is yyyyMMDD_HHMM or 20010604_1200. |
-e endTime |
|
Specifies the ending time for the range of grids to extract. If no time is specified, then assume "to the end of time". Format is yyyyMMDD_HHMM or 20010604_1200. |
-m mask |
|
Specifies an edit area outside of which the grids are clipped with a fill value. If the edit area is not specified or is not found in EDEX, the entire grid will be written to the file unclipped. |
-g |
|
When specified, a grid of topography, latitude, and longitude are also written to the netCDF file. |
-c |
|
When specified, the output will be compressed. The compression factor to gzip defaults to 6; this can be changed through the -f switch. |
-f factor |
|
When specified with the -c switch, this defines the gzip factor to be applied to the compression. Defaults to 6. Can range from 1 to 9 with 9 being the maximum, but slowest, compression. |
-t |
|
When specified, data values will be "trimmed" or rounded to the precision of the data, as defined by EDEX. |
-k |
|
The -t switch must also be given if the -k functionality is desired. The -k switch reformats the data values into smaller units, as as converting a 32-bit float into a 8-bit byte, in order to save space. When the -k switch is given and the data has been reformatted, two new attributes provided (dataMultipler and dataOffset) which are used to convert the data back into real numbers. |
-C configIntervalName |
Optional |
Specifies a configuration interval file which
controls the interval/spacing of the grids. The name identifies a
file within the EDEX textUtilities directory and must be a Python
file in the correct format. |
data value = (netCDF value * dataMultiplier) + dataOffset
Item |
Example |
Description |
SampleDef = {} |
SampleDef = {} |
Mandatory sampling definition,
defines the dictionary. The ifpnetCDF program looks for the
SampleDef variable name. |
BaseTimes |
[0*HR, 12*HR] |
List of times relative to
0000z. The values are specified in seconds, thus be sure to
convert the value to hours. The basetime values should not be
negative and must be less than 24*HR. The basetimes define
the "base" of the offset / interval calculations. For example, if
the basetime is set to 0000z, and the offset/interval is set to
(0*HR,3*HR), that includes grids that are aligned with 0z, 3z, 6z, 9z,
... If the basetime was set to 0200z, and the
offset/interval set to (0*HR, 3*HR), then grids would be included that
are aligned with 2z, 5z, 8z, 11z, ... There may be more
than one basetime specified. |
Offset/Interval Times |
[(0*HR, 3*HR), (24*HR, 6*HR)] |
Defines the interval as a series
of offset and interval tuples. The offset is the starting time,
offset from the most recent basetime. The 2nd portion of the
tuple defines the interval to use for the grids. |
'default' |
SampleDef['default'] =
(basetimeList, offset/Interval list)) |
Defines the interval for all
weather elements, unless specified weather elements have their own
definition. |
'Td_SFC' |
SampleDef['Td_SFC'] =
(basetimeList, offset/interval list) |
Defines the interval for weather
element "Td_SFC", which is a weather element name, followed by an
underscore character, followed by the weather element level. |
Definition |
Basetime
Definition |
Offset/Interval
Definition |
Hourly Grids up to 72 hr from
basetime, then no more grids. |
[0*HR] |
[(0*HR, 1*HR), (72*HR, 1000*HR)] |
Hourly Grids up to 12 hr, 3 hrly
grids to 24 hr, 6 hrly grids after 24hr |
[0*HR] |
[(0*HR, 1*HR), (12*HR, 3*HR), (24*HR, 6*HR)] |
No grids for first 24 hours,
then 3 hrly grids through 72 hours, then 6 hrly grids. |
[0*HR] |
[(24*HR, 3*HR), (72*HR, 6*HR)] |