bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFSPArrayAddCVField.h
1
2// This file is part of the hdf4 data handler for the OPeNDAP data server.
3// It retrieves the missing fields for some special NASA 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// Some third-dimension coordinate variable values are not provided.
7// What we do here is to provide natural number series(1,2,3, ...) for
8// these missing values. It doesn't make sense to visualize or analyze
9// with vertical cross-section. One can check the data level by level.
10
11// Authors: Kent Yang <myang6@hdfgroup.org>
12// Copyright (c) The HDF Group
14
15#ifndef HDFSPARRAY_ADDCVFIELD_H
16#define HDFSPARRAY_ADDCVFIELD_H
17
18#include "mfhdf.h"
19#include "hdf.h"
20
21#include <libdap/Array.h>
22#include "HDFSPEnumType.h"
23
24class HDFSPArrayAddCVField:public libdap::Array
25{
26 public:
27 HDFSPArrayAddCVField (int32 dtype, SPType sptype, const std::string & fieldname, int tnumelm, const std::string & n = "", libdap::BaseType * v = nullptr):
28 libdap::Array (n, v),
29 dtype(dtype),
30 sptype(sptype),
31 name(fieldname),
32 tnumelm (tnumelm)
33 {
34 }
35
36 ~ HDFSPArrayAddCVField () override = default;
37
38 // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
39 // Return the number of elements to read.
40 int format_constraint (int *cor, int *step, int *edg);
41
42 libdap::BaseType *ptr_duplicate () override
43 {
44 return new HDFSPArrayAddCVField (*this);
45 }
46
47 bool read () override;
48
49 private:
50
51
53 int32 dtype;
54
56 SPType sptype;
57
59 std::string name;
60
61 int tnumelm;
62 // TRMM version 7 nlayer values are from the document
63 void Obtain_trmm_v7_layer(int, std::vector<int>&,std::vector<int>&);
64
65 // TRMM version 7 nthrash values are from the document
66 void Obtain_trmml3s_v7_nthrash(int, std::vector<int>&,std::vector<int>&);
67
68};
69
70
71#endif