OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
/gfs-oceanweb/web/ocssw/ocssw_src/src/l2gen/HOWTO_Add_a_product.txt File Reference

Typedefs

using param_type = PARAM_TYPE_NONE
 

Functions

PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy (l2prod->name_prefix, "myprod", UNITLEN)
 
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy (l2prod->title, "no title yet")
 
Put a d in the string to print the prod_ix strcpy (l2prod->units, "undefined units")
 

Variables

g
 
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending name_prefix
 
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending wavelength
 
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through prod_ix
 
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band
 
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used are
 
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT16
 
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT32
 
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32
 
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT64 l2prod slope = 1.0
 
l2prod offset = 0.0
 
These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of l2gen
 
These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of this is a way to write the float out as a integer l2prod min = 0
 
l2prod max = 0
 
Extra metadata that will be written to the HDF4 file Default
 
Extra metadata that will be written to the HDF4 file l2prod rank = 2
 
Set this as the descriptive title for the product if param_type is not equal to PARAM_TYPE_NONE Before your function is called title is set by calling
 
Set this as the descriptive title for the product if param_type is not equal to PARAM_TYPE_NONE Before your function is called title is set by product title_format
 
Every product should define the units l2prod badData = BAD_FLT
 
What value is used by your function when the data value is bad Default is BAD_FLT l2prod product_id [0] = '\0'
 
l2prod algorithm_id [0] = '\0'
 
These two strings are used for the product XML output If product_id is not set then prefix is used If the last char of the name_prefix is _ then it is removed If algorithm_id is not set then name_suffix is used If the first char is _ then it is removed l2prod standard_name [0] = '\0'
 
This should be set to the NetCDF standard name if exists for this product Create a function that computes your product edit get_myprod c add prototype to l12_proto h add get_myprod c to add_executable for l2gen and l3gen in CMakeLists txt Add an entry to the output routine to call your function edit prodgen c edit function prodgen() case CAT_myprod pbuf = (VOIDP) fbuf
 
 break
 

Typedef Documentation

◆ param_type

Set this as the descriptive title for the product ONLY for param_type
Initial value:
==PARAM_TYPE_NONE you can set it in the product definition.
For the other param_types see the documentation above to see how
l2prod->datatype = DFNT_FLOAT32

Definition at line 16 of file HOWTO_Add_a_product.txt.

Function Documentation

◆ strcpy() [1/2]

How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy ( l2prod->  title,
"no title yet"   
)

◆ strcpy() [2/2]

Put a d in the string to print the prod_ix strcpy ( l2prod->  units,
"undefined units"   
)

◆ strncpy()

First part of the product name Case independent compares are used to match products strncpy ( l2prod->  name_prefix,
"myprod"  ,
UNITLEN   
)

Variable Documentation

◆ algorithm_id

l2prod algorithm_id[0] = '\0'

Definition at line 103 of file HOWTO_Add_a_product.txt.

◆ are

HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used are

Definition at line 67 of file HOWTO_Add_a_product.txt.

◆ badData

Every product should define the units l2prod badData = BAD_FLT

Definition at line 98 of file HOWTO_Add_a_product.txt.

◆ band

PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band

Definition at line 42 of file HOWTO_Add_a_product.txt.

◆ break

break

Definition at line 129 of file HOWTO_Add_a_product.txt.

◆ calling

Set this as the descriptive title for the product if param_type is not equal to PARAM_TYPE_NONE Before your function is called title is set by calling

Definition at line 92 of file HOWTO_Add_a_product.txt.

◆ Default

Extra metadata that will be written to the HDF4 file Default

Definition at line 78 of file HOWTO_Add_a_product.txt.

◆ DFNT_FLOAT32

HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32

Definition at line 67 of file HOWTO_Add_a_product.txt.

◆ DFNT_INT16

HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT16

Definition at line 67 of file HOWTO_Add_a_product.txt.

◆ DFNT_INT32

HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT32

Definition at line 67 of file HOWTO_Add_a_product.txt.

◆ g

e g

Definition at line 5 of file HOWTO_Add_a_product.txt.

◆ l2gen

These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of l2gen

Definition at line 73 of file HOWTO_Add_a_product.txt.

◆ max

l2prod max = 0

Definition at line 77 of file HOWTO_Add_a_product.txt.

◆ min

These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of this is a way to write the float out as a integer l2prod min = 0

Definition at line 76 of file HOWTO_Add_a_product.txt.

◆ name_prefix

PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where name_prefix
Initial value:
="aph_" and name_suffix="_giop". When your function is
called the element prod_ix in the product structure is set to the
0 based band number associated with the wavelength. In our example
for SeaWiFS wavelength 412

Definition at line 23 of file HOWTO_Add_a_product.txt.

◆ offset

l2prod offset = 0.0

Definition at line 70 of file HOWTO_Add_a_product.txt.

◆ pbuf

This should be set to the NetCDF standard name if exists for this product Create a function that computes your product edit get_myprod c add prototype to l12_proto h add get_myprod c to add_executable for l2gen and l3gen in CMakeLists txt Add an entry to the output routine to call your function edit prodgen c edit function prodgen () case CAT_myprod pbuf = (VOIDP) fbuf

Definition at line 128 of file HOWTO_Add_a_product.txt.

◆ prod_ix

Set this as the descriptive title for the product if param_type is not equal to PARAM_TYPE_NONE Before your function is called title is set by product prod_ix
Initial value:
= bandNum - numVisibleBands
same search method as PARAM_TYPE_VIS_WAVE except all wavelengths
are looped through.
same search method as PARAM_TYPE_ALL_WAVE except all bands are
looped through instead of wavelengths. The Band number in the
product name is 1 based

Definition at line 32 of file HOWTO_Add_a_product.txt.

◆ product_id

What value is used by your function when the data value is bad Default is BAD_FLT l2prod product_id[0] = '\0'

Definition at line 102 of file HOWTO_Add_a_product.txt.

◆ rank

Extra metadata that will be written to the HDF4 file l2prod rank = 2

Definition at line 80 of file HOWTO_Add_a_product.txt.

◆ slope

HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT64 l2prod slope = 1.0

Definition at line 69 of file HOWTO_Add_a_product.txt.

◆ standard_name

These two strings are used for the product XML output If product_id is not set then prefix is used If the last char of the name_prefix is _ then it is removed If algorithm_id is not set then name_suffix is used If the first char is _ then it is removed l2prod standard_name[0] = '\0'

Definition at line 109 of file HOWTO_Add_a_product.txt.

◆ title_format

Set this as the descriptive title for the product if param_type is not equal to PARAM_TYPE_NONE Before your function is called title is set by product title_format

Definition at line 92 of file HOWTO_Add_a_product.txt.

◆ wavelength

PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending wavelength

Definition at line 24 of file HOWTO_Add_a_product.txt.

PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific the sector rotation may actually occur during one of the scans earlier than the one where it is first reported As a the b1 values are about the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT to fill pixels affected by dead subframes with a special value Output the metadata of noisy and dead subframe Dead Subframe EV and Detector Quality Flag2 Removed the function call of Fill_Dead_Detector_SI to stop interpolating SI values for dead but also for all downstream products for science test only Changes from v5 which will affect scientific to conform to MODIS requirements Removed the Mixed option from the ScanType in the code because the L1A Scan Type is never Mixed Changed for ANSI C compliance and comments to better document the fact that when the HDF_EOS metadata is stricly the and products are off by and in the track respectively Corrected some misspelling of RCS swir_oob_sending_detector to the Reflective LUTs to enable the SWIR OOB correction detector so that if any of the sending detectors becomes noisy or non near by good detectors from the same sending band can be specified as the substitute in the new look up table Code change for adding an additional dimension of mirror side to the Band_21_b1 LUT to separate the coefficient of the two mirror sides for just like other thermal emissive so that the L1B code can calibrate Band scan to scan with mirror side dependency which leads better calibration result Changes which do not affect scientific when the EV data are not provided in this Crosstalk Correction will not be performed to the Band calibration data Changes which do not affect scientific and BB_500m in L1A Logic was added to turn off the or to spatial aggregation processes and the EV_250m_Aggr1km_RefSB and EV_500m_Aggr1km_RefSB fields were set to fill values when SDSs EV_250m and EV_500m are absent in L1A file Logic was added to skip the processing and turn off the output of the L1B QKM and HKM EV data when EV_250m and EV_500m are absent from L1A In this the new process avoids accessing and reading the and L1A EV skips and writing to the L1B and EV omits reading and subsampling SDSs from geolocation file and writing them to the L1B and omits writing metadata to L1B and EV and skips closing the L1A and L1B EV and SDSs Logic was added to turn off the L1B OBC output when the high resolution OBC SDSs are absent from L1A This is accomplished by skipping the openning of
Definition: HISTORY.txt:352
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending wavelength
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used are
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start thereby resolving MODur00108 Changed header guard macro names to avoid reserved name resolving MODur00104 Maneuver list file for Terra satellite was updated to include data from Jecue DuChateu Maneuver list files for both Terra and Aqua were updated to include two maneuvers from recent IOT weekly reports The limits for Z component of angular momentum was and to set the fourth GEO scan quality flag for a scan depending upon whether or not it occurred during one of them Added _FillValue attributes to many and changed the fill value for the sector start times from resolving MODur00072 Writes boundingcoordinate metadata to L1A archived metadata For PERCENT *ECS change to treat as
Definition: HISTORY.txt:297
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through prod_ix
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start thereby resolving MODur00108 Changed header guard macro names to avoid reserved name resolving MODur00104 Maneuver list file for Terra satellite was updated to include data from Jecue DuChateu Maneuver list files for both Terra and Aqua were updated to include two maneuvers from recent IOT weekly reports The limits for Z component of angular momentum was and to set the fourth GEO scan quality flag for a scan depending upon whether or not it occurred during one of them Added _FillValue attributes to many and changed the fill value for the sector start times from resolving MODur00072 Writes boundingcoordinate metadata to L1A archived metadata For PERCENT *ECS change to treat rather resolving GSFcd01518 Added a LogReport Changed to create the Average Temperatures vdata even if the number of scans is
Definition: HISTORY.txt:301
#define PARAM_TYPE_ALL_WAVE
Definition: l2prod_struc.h:14
#define PARAM_TYPE_BAND
Definition: l2prod_struc.h:15
subroutine search(dflag, xbar, x, n, i)
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start thereby resolving MODur00108 Changed header guard macro names to avoid reserved name resolving MODur00104 Maneuver list file for Terra satellite was updated to include data from Jecue DuChateu Maneuver list files for both Terra and Aqua were updated to include two maneuvers from recent IOT weekly reports The limits for Z component of angular momentum was and to set the fourth GEO scan quality flag for a scan depending upon whether or not it occurred during one of them Added _FillValue attributes to many and changed the fill value for the sector start times from to
Definition: HISTORY.txt:295
===========================================================================V5.0.48(Terra) 03/20/2015 Changes shown below are differences from MOD_PR02 V5.0.46(Terra)============================================================================Changes noted for V6.1.20(Terra) below were also instituted for this version.============================================================================V6.1.20(Terra) 03/12/2015 Changes shown below are differences from MOD_PR02 V6.1.18(Terra)============================================================================Changes from v6.1.18 which may affect scientific output:A situation can occur in which a scan which contains sector rotated data has a telemetry value indicating the completeness of the sector rotation. This issue is caused by the timing of the instrument command to perform the sector rotation and the recording of the telemetry point that reports the status of sector rotation. In this case a scan is considered valid by L1B and pass through the calibration - reporting extremely high radiances. Operationally the TEB calibration uses a 40 scan average coefficient, so the 20 scans(one mirror side) after the sector rotation are contaminated with anomalously high radiance values. A similar timing issue appeared before the sector rotation was fixed in V6.1.2. Our analysis indicates the ‘SET_FR_ENC_DELTA’ telemetry correlates well with the sector rotation encoder position. The use of this telemetry point to determine scans that are sector rotated should fix the anomaly occured before and after the sector rotation(usually due to the lunar roll maneuver). The fix related to the sector rotation in V6.1.2 is removed in this version.============================================================================V6.1.18(Terra) 10/01/2014 Changes shown below are differences from MOD_PR02 V6.1.16(Terra)============================================================================Added doi attributes to NRT(Near-Real-Time) product.============================================================================V6.1.16(Terra) 01/27/2014 Changes shown below are differences from MOD_PR02 V6.1.14(Terra)============================================================================Migrate to SDP Toolkit 5.2.17============================================================================V6.1.14(Terra) 06/26/2012 Changes shown below are differences from MOD_PR02 V6.1.12(Terra)============================================================================Added the doi metadata to L1B product============================================================================V6.1.12(Terra) 04/25/2011 Changes shown below are differences from MOD_PR02 V6.1.8(Terra)============================================================================1. The algorithm to calculate uncertainties for reflective solar bands(RSB) is updated. The current uncertainty in L1B code includes 9 terms from prelaunch analysis. The new algorithm regroups them with the new added contributions into 5 terms:u1:the common term(AOI and time independent) and
Definition: HISTORY.txt:126
HISTORY txt for MOD_PR01(step one of PGE01) History follows the following convention needed due to new Aqua ReprocessingActual and the expected LUT revision number from PCF Changed to use PGE version for ProductionHistory Added Archive including ProcessingEnvironment Corrected handling of bad to resovle GSFcd02514 Changed to check staged LUT revision number versus the expected LUT revision number from thereby resolving defect report MODxl02056 This change also avoids the memory access violation reported in MODur00039 Changed the way output arrays were initialized with fill to be more but instead
Definition: HISTORY.txt:173
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific the sector rotation may actually occur during one of the scans earlier than the one where it is first reported As a the b1 values are about the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT to fill pixels affected by dead subframes with a special value Output the metadata of noisy and dead subframe Dead Subframe EV and Detector Quality Flag2 Removed the function call of Fill_Dead_Detector_SI to stop interpolating SI values for dead but also for all downstream products for science test only Changes from v5 which will affect scientific to conform to MODIS requirements Removed the Mixed option from the ScanType in the code because the L1A Scan Type is never Mixed Changed for ANSI C compliance and comments to better document the fact that when the HDF_EOS metadata is stricly the and products are off by and in the track respectively Corrected some misspelling of RCS swir_oob_sending_detector to the Reflective LUTs to enable the SWIR OOB correction detector so that if any of the sending detectors becomes noisy or non near by good detectors from the same sending band can be specified as the substitute in the new look up table Code change for adding an additional dimension of mirror side to the Band_21_b1 LUT to separate the coefficient of the two mirror sides for Band
Definition: HISTORY.txt:299
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32
#define PARAM_TYPE_NONE
Definition: l2prod_struc.h:11
HISTORY txt for MOD_PR01(step one of PGE01) History follows the following convention needed due to new Aqua ReprocessingActual and the expected LUT revision number from PCF Changed to use PGE version for ProductionHistory Added Archive including ProcessingEnvironment Corrected handling of bad to resovle GSFcd02514 Changed to check staged LUT revision number versus the expected LUT revision number from thereby resolving defect report MODxl02056 This change also avoids the memory access violation reported in MODur00039 Changed the way output arrays were initialized with fill to be more but placed into the L1A output product and thought of as valid packets These packets had an invalid frame count in them and since only the last valid packet of any specific type gets it frame count data written to the output product
Definition: HISTORY.txt:176
#define PARAM_TYPE_VIS_WAVE
Definition: l2prod_struc.h:12