OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
DDAncillary.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: DDAncillary.h
4  *
5  * DESCRIPTION: Object class that supports reading and interpolation of
6  * ancillary data extracted from MERA2 files.
7  *
8  * Created on: April 11, 2019
9  * Author: Sam Anderson, NASA Ocean Color
10  *
11  *******************************************************************************/
12 
13 #ifndef DDAncillary_H_
14 #define DDAncillary_H_
15 
16 #include <DDProcess.h>
17 
18 using namespace std;
19 
20 const int NMLONS = 576;
21 const int NMLATS = 361;
22 
23 struct metio {
24  float ps;
25  float oz;
26  float pw;
27  float ws;
28  float wd;
29 };
30 
31 struct met_lut {
32  float ps[NMLATS][NMLONS];
33  float oz[NMLATS][NMLONS];
34  float pw[NMLATS][NMLONS];
35  float u_ws[NMLATS][NMLONS];
36  float v_ws[NMLATS][NMLONS];
37 };
38 
39 class DDProcess;
40 
42 {
43 public:
44 
45 // Class constructor
46  DDAncillary ();
47 
48 // Class destructor
49  ~DDAncillary ();
50 
51 // Initialize lut
52  int initialize( int hr, int min );
53 
54 // Retrieve meteorology
55  map<string,ddata*> read( map<string,ddata*> imap );
56 
57 protected:
58 
59 // Meteorology LUT
60 
62 
63 // Member functions
64 
65  int read_merra2_file(const string filename, met_lut* lut);
66 
67  int get_met(const float lat, const float lon, metio* io );
68 
69  int get_interp_indexes(const float lat, const float lon,
70  int& i1, int& i2, int& j1, int& j2);
71 
72  float index2lat(const int index);
73  float index2lon(const int index);
74  int lat2index(const float lat);
75  int lon2index(const float lon);
76 };
77 
78 #endif /* DDAncillary_H_ */
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
float wd
Definition: DDAncillary.h:28
const int NMLATS
Definition: DDAncillary.h:21
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
void initialize(int pixref_flag, int blkref_flag)
Definition: Usds.c:1371
float * lat
integer function lat2index(lat, status)
float pw
Definition: DDAncillary.h:26
const int NMLONS
Definition: DDAncillary.h:20
float oz
Definition: DDAncillary.h:25
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
float ps
Definition: DDAncillary.h:24
float * lon
met_lut * lut_
Definition: DDAncillary.h:61
float ws
Definition: DDAncillary.h:27