OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
EnvsatDSD.h
Go to the documentation of this file.
1 /*
2  * File: EnvsatDSD.h
3  * Author: dshea
4  *
5  * Created on December 10, 2012, 12:33 PM
6  */
7 
8 #ifndef ENVSATDSD_H
9 #define ENVSATDSD_H
10 
11 class EnvsatSPH;
12 
13 #include <stdint.h>
14 #include <string>
15 
16 class EnvsatDSD {
17 public:
18  //EnvsatDSD();
19  EnvsatDSD(const EnvsatDSD& orig);
20  EnvsatDSD(EnvsatSPH* sph, char* buffer, int index);
21  virtual ~EnvsatDSD();
22 
23  virtual EnvsatSPH* getSPH() {
24  return sph;
25  }
26 
27  virtual int getIndex() {
28  return index;
29  }
30 
31  virtual bool isValid();
32 
33  virtual std::string& getName();
34  virtual char getType();
35 
36  virtual int64_t getDSOffset();
37  virtual void setDSOffset(int64_t offset);
38 
39  virtual int64_t getDSSize();
40  virtual void setDSSize(int64_t size);
41 
42  virtual int getNumDSRs();
43  virtual void setNumDSRs(int size);
44 
45  virtual int64_t getDSRSize();
46  virtual void setDSRSize(int64_t size);
47 
48  virtual void seekDataStart(int fd);
49 
50  virtual void print();
51  virtual void printRecursive();
52 
53 private:
54  void init(EnvsatSPH* sph, char* buffer, int index);
55 
56  static const unsigned int DSD_NAME_KEY_OFFSET = 0;
57  static const unsigned int DSD_NAME_KEY_LENGTH = 7;
58  static const std::string DSD_NAME_KEY_VALUE;
59 
60  static const unsigned int DS_NAME_OFFSET = 9;
61  static const unsigned int DS_NAME_LENGTH = 28;
62 
63  static const unsigned int DS_TYPE_OFFSET = 47;
64 
65  static const unsigned int DS_OFFSET_OFFSET = 133;
66  static const unsigned int DS_OFFSET_LENGTH = 21;
67 
68  static const unsigned int DS_SIZE_OFFSET = 170;
69  static const unsigned int DS_SIZE_LENGTH = 21;
70 
71  static const unsigned int NUM_DSR_OFFSET = 207;
72  static const unsigned int NUM_DSR_LENGTH = 11;
73 
74  static const unsigned int DSR_SIZE_OFFSET = 228;
75  static const unsigned int DSR_SIZE_LENGTH = 11;
76 
77  EnvsatSPH* sph;
78  char* buffer; // pointer into SPH buffer
79  int index; // index of this DSD
80 
81 };
82 
83 #endif /* ENVSATDSD_H */
84 
virtual void setDSRSize(int64_t size)
Definition: EnvsatDSD.cpp:82
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
virtual void setDSSize(int64_t size)
Definition: EnvsatDSD.cpp:66
virtual int getIndex()
Definition: EnvsatDSD.h:27
virtual int64_t getDSSize()
Definition: EnvsatDSD.cpp:62
virtual ~EnvsatDSD()
Definition: EnvsatDSD.cpp:28
@ string
virtual int getNumDSRs()
Definition: EnvsatDSD.cpp:70
virtual int64_t getDSRSize()
Definition: EnvsatDSD.cpp:78
virtual void seekDataStart(int fd)
Definition: EnvsatDSD.cpp:86
virtual void setDSOffset(int64_t offset)
Definition: EnvsatDSD.cpp:58
virtual std::string & getName()
Definition: EnvsatDSD.cpp:44
virtual void setNumDSRs(int size)
Definition: EnvsatDSD.cpp:74
virtual void printRecursive()
Definition: EnvsatDSD.cpp:111
virtual int64_t getDSOffset()
Definition: EnvsatDSD.cpp:54
virtual char getType()
Definition: EnvsatDSD.cpp:50
virtual EnvsatSPH * getSPH()
Definition: EnvsatDSD.h:23
EnvsatDSD(const EnvsatDSD &orig)
Definition: EnvsatDSD.cpp:20
virtual bool isValid()
Definition: EnvsatDSD.cpp:38
l2prod offset
virtual void print()
Definition: EnvsatDSD.cpp:96