Please see The HDF Group's new Support Portal for the latest information.
nagg is a tool that allows users to change how data granules are aggregated. nagg is needed to address the flexibility of JPSS data products, especially swath products.
A swath is a ribbon of data collected as the satellite orbit sweeps across the Earth. As an orbit is continuous, the swath is continuous, wrapping around the Earth over and over again like yarn on a ball. In most NASA heritage missions, each swath is snipped into equal size pieces called granules, and one granule is placed in each file. The size of the snipped piece, while usually set for each mission, varies from mission to mission based mostly on the amount of data and therefore the size of the file that can be conveniently manipulated.
For JPSS, the concept of a granule is independent of the packaging of the granule in a file, so granules are made relatively small in order to conveniently manipulate them. Suppose an analyst needs to compare MODIS and VIIRS data. With nagg, four VIIRS 86 second granules can be packaged together to make a piece of swath similar in size to a MODIS five minute data granule. Some data analysis tools analyze by full orbit, so it is possible for example to package OMPS data that way. nagg makes it possible for the analyst to package data into files in the way that best suits the tool being used.
nagg’s Capabilities
Aggregation of Data Product Granules
nagg can be used to change the number of data granules per file for a data product.
The tool reads granules for a data product from the input files and
aggregates them in the output files according to the aggregation
parameter (the number of granules per file specified by the
−n
command-line flag or the number of seconds
to be stored in each aggregate file specified by the −A
command-line flag). The data product is specified by the
−t
command-line flag.
By default, the tool finds the corresponding geolocation product and files using information stored in the data product files, reads geolocation granules from those files and aggregates them according to the specified aggregation parameter.
Aggregated geolocation granules are stored in the same output files
as the aggregated data product granules unless the −S
flag is used. In that case, they are stored in separate geolocation
output files.
If desired, the aggregation of the geolocation granules can be
controlled by the −g
command-line flag. Depending on
the value of the −g
flag, nagg may ignore geolocation
granules and not aggregate them at all, or it may read them from
geolocation files with names that do not match exactly the names of the
geolocation files stored in the data product files.
Aggregation of Geolocation Product Granules
nagg can be used to change the number of geolocation granules per file for a geolocation product.
For a geolocation product specified by the −g
parameter, the tool reads granules from the input files and aggregates
them in the output files according to the aggregation parameter
(the number of granules per file specified by the
−n
command-line flag or the number of seconds
to be stored in each aggregate file specified by the −A
command-line flag).
Packaging of Data and Geolocation Product Granules
nagg can be used to change the number of compatible products per file.
Compatible products share the same geolocation information and
are specified by the −t
command-line flag.
nagg reads data granules for all specified data products from the input files and aggregates them according to the specified aggregation parameter. By default, aggregated granules for the specified products and corresponding geolocation granules are stored together in the output files.
If desired, nagg can aggregate the specified products and store
aggregated granules of each data and geolocation product in separate
files. As in the case of one product, the behavior is controlled by the
−S
command line flag.
The aggregation of the geolocation product granules is performed in the same way as the aggregation of data product granules.
Other Considerations
Here are some other things to consider.
- nagg is not destructive. It always copies existing data granules from input data files to new data files that it creates. No changes are made to input files.
- Currently, nagg can handle not more than 10,000 input granules.
Example
See the User's Guide for the NPP Granule Aggregation and Packaging Utility (nagg) for examples of nagg usage.
For More Information
Use the menu items on the left to access documentation and source code for the tool.
- - Last modified: 13 February 2014