OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
HDFSPArrayGeoField.h
Go to the documentation of this file.
1 // This file is part of the hdf4 data handler for the OPeNDAP data server.
3 // It retrieves the latitude and longitude fields for some special HDF4 data products.
4 // The products include TRMML2_V6,TRMML3B_V6,CER_AVG,CER_ES4,CER_CDAY,CER_CGEO,CER_SRB,CER_SYN,CER_ZAVG,OBPGL2,OBPGL3
5 // To know more information about these products,check HDFSP.h.
6 // Each product stores lat/lon in different way, so we have to retrieve them differently.
7 // Authors: MuQun Yang <myang6@hdfgroup.org>
8 // Copyright (c) 2010-2012 The HDF Group
10 #ifndef HDFSPARRAYGeoField_H
11 #define HDFSPARRAYGeoField_H
12 
13 #include "Array.h"
14 #include "hdf.h"
15 #include "mfhdf.h"
16 #include "HDFSPEnumType.h"
17 using namespace libdap;
18 
19 class HDFSPArrayGeoField:public Array
20 {
21  public:
22  HDFSPArrayGeoField (int32 rank, const std::string& filename, const int sdfd, int32 fieldref, int32 dtype, SPType sptype, int fieldtype, const std::string & fieldname, const std::string & n = "", BaseType * v = 0):
23  Array (n, v),
24  rank (rank),
25  filename(filename),
26  sdfd(sdfd),
27  fieldref (fieldref),
28  dtype (dtype),
29  sptype (sptype),
30  fieldtype (fieldtype),
31  name (fieldname) {
32  }
33  virtual ~ HDFSPArrayGeoField ()
34  {
35  }
36 
37  // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
38  // Return the number of elements to read.
39  int format_constraint (int *cor, int *step, int *edg);
40 
41  BaseType *ptr_duplicate ()
42  {
43  return new HDFSPArrayGeoField (*this);
44  }
45 
46  virtual bool read ();
47 
48 
49  private:
50 
52  int32 rank;
53 
55  std::string filename;
56  int sdfd;
57 
59  int32 fieldref;
60 
62  int32 dtype;
63 
65  SPType sptype;
66 
74  int fieldtype;
75 
77  std::string name;
78 
79  // Read TRMM level 2 version 6 lat/lon
80  void readtrmml3a_v6 (int32 *, int32 *, int32 *, int);
81 
82  // Read TRMM level 2 version 6 lat/lon
83  void readtrmml3c_v6 (int32 *, int32 *, int32 *, int);
84  // Read TRMM level 2 version 6 lat/lon
85  void readtrmml2_v6 (int32 *, int32 *, int32 *, int);
86 
87 
88  // Read OBPG level 2 lat/lon
89  void readobpgl2 (int32 *, int32 *, int32 *, int);
90 
91  // Read OBPG level 3 lat/lon
92  void readobpgl3 (int *, int *, int *, int);
93 
94  // Read TRMM level 3 version 6 lat/lon
95  void readtrmml3b_v6 (int32 *, int32 *, int32 *, int);
96 
97  // Read TRMM level 3 version 7 lat/lon
98  void readtrmml3_v7 (int32 *, int32 *, int32 *, int);
99 
100 
101  // Read CERES SAVG and CERES ICCP_DAYLIKE lat/lon
102  void readcersavgid1 (int *, int *, int *, int);
103 
104  // Read CERES SAVG and ICCP_DAYLIKE lat/lon
105  void readcersavgid2 (int *, int *, int *, int);
106 
107  // Read CERES ZAVG lat/lon
108  void readcerzavg (int32 *, int32 *, int32 *, int);
109 
110  // Read CERES AVG and SYN lat/lon
111  void readceravgsyn (int32 *, int32 *, int32 *, int);
112 
113  // Read CERES ES4 and ICCP_GEO lat/lon
114  void readceres4ig (int32 *, int32 *, int32 *, int);
115 
116  template <typename T> void LatLon2DSubset (T* outlatlon, int ydim, int xdim, T* latlon, int32 * offset, int32 * count, int32 * step);
117 
118 
119 
120 };
121 
122 
123 #endif
BaseType * ptr_duplicate()
static class NCMLUtil overview
HDFSPArrayGeoField(int32 rank, const std::string &filename, const int sdfd, int32 fieldref, int32 dtype, SPType sptype, int fieldtype, const std::string &fieldname, const std::string &n="", BaseType *v=0)
SPType
Definition: HDFSPEnumType.h:4