Tool Name: nagg
Syntax:
nagg –h | -V
nagg
[-n
number] [-t list | -l file] [-g criterion] [-S] [-A seconds] [-d directory] [-O origin]
[-D domain] INPUTÉ
Purpose:
To manipulate granules stored in NPP files into more easily processed NPP files.
Description:
The command line utility nagg is
the utility for grouping NPP granules into aggregate and package files.
Aggregates include time contiguous and gap-filled series of
the same type of granules together in the same file. Packages include
different, but related type granule aggregates with the same temporal and
spatial extent together in the same file.
Input parameter INPUT
is a list of one or more NPP files with the granules to aggregate and/or
package.
Output of nagg is
a file or set of files named according to the NPP file naming convention. Output
files are aligned with the bucket boundary. For more information on bucket
boundaries, see JPSS Common Data
Format Control Book – External Volume I, pp. 131-133. Fill granules are generated
when there are no data granules available in the input files for "slots"
in a bucket. Leading and trailing fill granules are not generated for the first
and last output files respectively. Therefore, first and last output files may contain
fewer granules than requested.
The default behavior of nagg is to aggregate
corresponding geolocation granules stored in an external geolocation file(s).
The names of the geolocation file(s) can be found from the value(s) of an
N_GEO_Ref attribute in the input file. The names of the output geolocation file(s)
correspond to those of the primary product. nagg will
fail if the input geolocation file is unavailable. The aggregating of
geolocation granules can be overridden with the -g no command option which directs
nagg
to not use or look for geolocation input granules or files and to not produce geolocation
output granules or files.
Geolocation file names can be approximate such that only the
beginning parts up to the creation date are matched. Suppose the sensor data
file defines its geolocation file as: GMTCO_npp_d20100906_t0701368_e0703013_b00004_c20111024161933653314_noaa_ops.h5. nagg will accept any file
matching the following pattern and will use the one with the latest creation timestamp:
GMTCO_npp_d20100906_t0701368_e0703013_b00004_c*.h5. The -g
strict command
option can be used to tell nagg that the external geolocation file name must exactly match
the N_GEO_Ref value.
nagg is
non-destructive. It will not overwrite existing files.
Limits Defined:
NAGG_Granule_info_max 10000 Maximum
number of granules managed
NAGG_Product_list_max 30 Maximum
number of products requested
NAGG_outputfiles_max 30 Maximum
number of output files
See ÒAppendix 2Ó in the NPP Aggregation Tool Components document for a complete list of size definitions in the nagg tool.
Other Considerations:
á nagg can de-aggregate files by setting -n 1 and operating on aggregate files.
á nagg can aggregate files by setting -n N and operating on a directory of single granule files.
á
nagg can re-aggregate files by setting -n N
to a number different from the number of granules in the input files.
Command Line Options and Parameters:
-h, --help
Use to display the command syntax
and to list valid granule types and packaging groupings.
--version
Displays the version information.
-t list, --type=list
list specifies a comma separated list of NPP record type mnemonics. Unless -S is specified, the granule types will be packaged together. Types must be compatible to be packaged together. Use -h to list valid package groupings. If –t is not specified, -g <product> must be given to aggregate only the geolocation product granules.
-n N, --number=N
N is the number of granules of each product in each aggregate file and must be greater than zero. If this option is not specified, the default value of 1 (single granule files) will be used.
-g criterion, --geolocation=criterion
criterion is the criterion used for searching the geolocation granules. Valid values for criterion are the following:
no | 0 |
Aggregate product files without geolocation input or output |
yes | 1 |
Allow approximate matching of geolocation input file names
(default) |
strict | 2 |
Require exact matching of geolocation input file names |
<product> |
Aggregate geolocation product <product> only. This excludes the use of –t. |
-l example, --like=example
Package like the example file in number of granules and type list. example must be an existing NPP file. Options on the command line override the number of granules and type list from the example file.
-A seconds
seconds is the number of seconds in each aggregate file. The aggregationÕs size is a fixed number of granules per file equal to seconds divided by the period of the granule rounded up to the next integer number of granules. The formula for this is
NumGranules/File = seconds/GranulePeriod
where
NumGranules/File is the number of granules in the aggregated file,
seconds is the number of seconds that are used to determine the size of the aggregated file, and
GranulePeriod is the number of seconds worth of data held by each granule.
If, for example, seconds is set to 60 and GranulePeriod is .7 seconds per granule, then the following steps show the calculation:
Calculation |
Comments |
NumGranules/File = 60 seconds/.7seconds/granule |
This is the setting of this parameter divided by the granule
period. |
NumGranules/File = 85.71 granules |
This is the actual value of the calculation. |
NumGranules/File = 86 granules |
This is the value of the calculation rounded up to the next
integer. |
If –l, -t, –n, and –A are omitted, then the first NPP data product file encountered will be used to determine the –t list and –n number.
This command line option has not yet been implemented.
-S, --simple
Simple aggregates are produced. Each type is packaged separately. All granule types including geolocation products are packaged in one file.
-d directory, --directory=directory
Directory where the output files
should be placed. The default
is the current working directory. The tool will fail if the directory does not
exist.
-O origin
The origin identifier is a four-character string in the output file name. Only the first four characters will be used. If fewer than four characters are specified, the origin will be pre-pended with the character ÒXÓ. The default is ÒXXXXÓ.
-D domain
The domain identifier is a three-character string in the output file name. Only the first three characters will be used. If fewer than three characters are specified, the domain will be pre-pended with the character ÒXÓ. The default is ÒXXXÓ.
--debug
In debug mode, all of the granules in the input files including those not specified by the –t list are read in, all of the granules are displayed, and the execution is ended without generating the normal output files. Note that this option is intended for tool debugging. Files or output generated should not be used for production purposes: the behavior of debug mode may change from version to version.
INPUT
INPUT is a list of one or more NPP files.
Exit Status:
0 |
Succeeded. |
>0 |
An error occurred. |
Version: 1.4.0
Last revised: 2012/8/31