Use H5Dfill to write fill values to buffers for writing to datasets.
Check for outgeofile before attempting to create the N_GEO_Ref attribute with outgeofile as its value.
Tested on jam and koala.
select_granules will not reduce the number of granules because there are
not enough granules left. Instead, it adds fill-granules (NULL) to the
rest of the selected granules list.
Tested: my Linux-vmmodule. (write_granules have error but I think
they are from Larry's last checkin.)
Write correct fill values for datatypes according to Common Data Format Control Book - Volume I - Overview, Table 3.5.6-1.
The H5Dfill function looked promising for putting fill values in a memory buffer to write to a dataset, but it failed on jam. It may be worth revisiting to see if it the parameters supplied were incorrect.
Tested on jam and koala.
The start and end time of the first granule is not always correct. Using them
to calculate the granule time (timeg) is unstable. For now, change it to
be hard set at 32. Need to find a better way to determine it.
Tested: linux-dov.
nagg_write_granules.c
Write trailing fill granules. Still need to write correct default and time attributes and correct fill values for raw data.
Tested on koala.
nagg_write_granules.c
Write fill granules for missing granules. Current version writes correctly for leading granules that are missing and for intermitent granules. Trailing granules that are missing will be noted but are not yet written. Some attribute changes for fill granules still need to be done.
nagg_get_granules.c
Changed a comment.
Tested on koala.
nagg seemed to write only half of the files.
In main, total_granules_file was subtracted from granules_remain again.
This was a left from previous implementation. Removed and problem fixed.
Tested: koala
added select_granules() which can filtered out duplicated entries (prevent
same data file used more than once) and filtered only products requested
by products_list and geo-product.
Tested: koala.
nagg_write_granules.c
Get beginning values for the _Aggr dataset from the first granule to be written to an output file, rather than from the _Aggr dataset of the input file, as those values may be older and incorrect for the new output file.
Tested on jam and koala.
Maintenance: Cleaned docx file so it would not be updated in th future with what is implemented or not.
Added current limitations to the RELEASE.txt file; also added the release date and version.
Recreated pdf and hmtl files.
Added nagg_report() to report what have been written.
Added infrastructure to do real selection of the granules.
Not doing any selecting or filtering yet.
Tested: Koala
Now handles input file list with paths, and finds geolocation files in the directory specified by the path.
Also returns the geo-location product id correctly.
Tested jam and koala.
Now finds geolocation files using the N_GEO_Ref attribute of the sensor data files and processes those files to get their granules.
Returns DPID for the geolocation files.
This version works only with nagg in the same directory as the files. Next version (later today) will handle paths to data files where geolocation files are in the same directory.
Tested on koala.
Changed the name of --with-hlnpoess to --with-hlregion.
Attempted to add checking of hdf5.h before --with-hlregion but did not work.
Tested: koala.
Note that make check is showing that nagg_get_granules were showing
lots of error messages but program did not exit non-zero.
nagg_write_granules.c
aggregations produced by nagg can now be repeatedly reaggregated by nagg in straightforward aggregate followed by deaggregate cycles. Aggregations with multiple copies of the same granule do not work correctly - granules will be left out of the output file.
nagg_get_granules.c
Added "Gran Index" to column headers for the granule table printed by the nagg_print_granules function.
Tested jam and koala.
Now writes aggregations from multipel files.
AggregateNumberGranules in new files is copied from input files and needs to be changed.
Tested jam and koala.
Added product ID (DPID) to the granules info table which will
be easier to handle since it is a fixed 5 char stgring.
Renamed get_product_sname to get_product_sname_by_id;
and added get_product_id_by_sname.
Tested: Koala.
nagg.h, nagg_get_granules.c
Added granule_input_index to the granule_t struct for direct access by name to granules in the input files.
nagg_write_granules.c
Write creationtime and creationdate to the file attributes.
Tested jam and koala.
Fixed compose_output_fname() so that it is producing correct output file name, geo file name,
and creation Date strings.
Completed main() to call "start_write, write, end_write" in the correct loop.
The structure is completed to support 1 product (i.e. -t XXX is one product only).
Assume granule table has perfect sets of (n-products + 1) granules.
Currently, only "-n 1" works since write_granules failed to write more than
1 set of granules.
Tested: koala and jam.
start_write(), write_granules(), end_write() will write 1 to the number of granules in a pair (sensor data and geolocation) of input files to a pair of output files.
Writing granules starting from a granule number > 0 causes hdf5 errors for now and will need to be addressed tomorrow.
A loop to write the number of granules specified by -n on the command line was added to nagg_main.c. specifying more files that are in the input file will cause a segmentation fault currently which should als...
src/nagg_main.c:
Changed productname to products_list (single product name to list of products.)
Added outputfiles to hold a list of output file names.
Added temporary code to call start_write with hardset data.
src/nagg.h:
Changed some macro definitions to reflect they are for:
NPP: e.g., NPP_Product_max, NPP_Geo_Location_max
NAGG tool: NAGG_Product_list_max, NAGG_outputfiles_max
Added definitions for compose_output_fname but not completed.
src/nagg_posix....
nagg.h:
Changed size definitions of Granules tables to reflect closer to what it
actually are.
Added definitions and struct for output file creation.
Added Geolocation table definitins.
nagg_product.c:
Removed column 3 (long name) of the product_table since it is not used.
Created the Geolocation table.
Tested: koala and jam
Changed the protocol of start_write and write_granules.
For now, passing char * to what should be char ** for the parameters
{outfiles,product_list} of start_write. Will fix them in next commit.
Tested: jam and koala
Added calls of start_write,write_granules, end_write just to "prove"
all can be done. (calls arguments are hardcoded, provided by Larry.)
Tested: koala
nagg.h
addition of nagg_sort_granules().
nagg_posix.h
short-hands and posix macros of HDqsort and HDstrcpy.
nagg_main.c
added the call of nagg_sort_granules.
nagg_get_granules.c
Changed nagg_print_granules to print Granule ID before Product name because
that is the order of the sort keys.
nagg_select_granules.c
addition of nagg_sort_granules().
Tested: koala and jam.
With the additions below to nagg_main.c, one data granule and one geo granule will be written to 2 output files when this command is executed:
nagg -n 1 -t REDRO REDRO_npp_d20030125_t0728319_e0737011_b00014_c20111025170507204040_unkn_ada.h5 GCRIO_npp_d20030125_t0728319_e0737011_b00014_c20111025170507201941_unkn_ada.h5
start_write("REDRO_npp_d20030125_t0728319_e07290417_b00014_c20111202104707204040_unkn_ada.h5", "GCRIO_npp_d20030125_t0728319_e07290417_b00014_c20111202104707204040_unkn_ada.h5"...
Makefile.am:
Makefile.in:
Added a new source file, nagg_product.c, for nagg.
nagg_product.c:
New source file to hold the product_table and its access functions.
nagg_write_granules.c:
Moved the product_name_table to nagg_product.c and renamed it as
product_table.
Moved get_product_name() to nagg_product.c and renamed it get_product_sname.
Fixed its code error.
nagg_posix.c:
Added macros HDstrcmp and HDstreq.
nagg.h:
Added get_product_sname protocol.
Added m...
nagg_main.c:
nagg_psix.h:
Added stringval(s) macro so that one can print a *char even if it is NULL.
nagg.h:
nagg_write_granules.c:
Added NAGG_Product_name_max to define the max number of Product names used.
Tested: koala
Added the --with-with-hlnpoess to autoconfigure in the HL NPOESS library and
header files. For now, it is not an error if they are not available.
Should be changed to a requirement when codes using the HL NPOESS library calls
are used.
Tested: koala