60{H5FSTRING, H5FLOAT32,H5CHAR,H5UCHAR,H5INT16,H5UINT16,
61 H5INT32,H5UINT32,H5INT64,H5UINT64,H5FLOAT64,H5VSTRING,
62 H5REFERENCE,H5COMPOUND,H5ARRAY,H5UNSUPTYPE};
64enum CVType { CV_EXIST,CV_LAT_MISS,CV_LON_MISS,CV_NONLATLON_MISS,CV_FILLINDEX,CV_MODIFY,CV_SPECIAL,CV_UNSUPPORTED};
69const int HE5_HDFE_RAD_DEG=0;
70const int HE5_HDFE_DEG_RAD=1;
71const int HE5_HDFE_DMS_DEG=2;
72const int HE5_HDFE_DEG_DMS=3;
73const int HE5_HDFE_RAD_DMS=4;
74const int HE5_HDFE_DMS_RAD=5;
88 static bool use_data_mem_cache(H5DataType h5type,CVType cvtype,
const std::string & varpath);
90 static size_t H5_numeric_atomic_type_size(H5DataType h5type);
96 static std::string
trim_string(hid_t dtypeid,
const std::string & s,
int num_sect,
size_t section_size, std::vector<size_t>& sect_newsize);
98 static std::string obtain_string_after_lastslash(
const std::string & s);
99 static std::string obtain_string_before_lastslash(
const std::string & s);
100 static std::string remove_substrings(std::string str,
const std::string &s);
104 static void cha_co(std::string &co,
const std::string & vpath);
107 static void get_relpath_pos(
const std::string& temp_str,
const std::string& relpath,std::vector<size_t>&var_pos);
109 static bool cf_strict_support_type(H5DataType dtype,
bool is_dap4);
110 static bool cf_dap2_support_numeric_type(H5DataType dtype,
bool is_dap4);
113 static void gen_unique_name(std::string &str, std::set<std::string>&namelist,
int&clash_index);
117 static void Split (
const char *s,
int len,
char sep,
118 std::vector < std::string > &names);
121 static void Split (
const char *sz,
char sep,
122 std::vector < std::string > &names);
124 static void Split_helper(std::vector<std::string>&tokens,
const std::string &text,
const char sep);
127 static void parser_gpm_l3_gridheader(
const std:: vector<char>&value,
int& latsize,
int&lonsize,
128 float& lat_start,
float& lon_start,
float& lat_res,
float& lon_res,
bool check_reg_orig);
130 static void close_fileid(hid_t,
bool);
134 static std::string obtain_cache_fname(
const std::string & fprefix,
const std::string & fname,
const std::string &vname);
138 static void rev_str(
char *str,
int len);
141 static int int_to_str(
int,
char str[],
int);
144 static void dtoa(
double,
char *,
int);
147 static std::string get_double_str(
double x,
int total_digit,
int after_point);
150 static std::string get_int_str(
int x);
164 template<
typename T>
int subset(
171 std::vector<T> *poutput,
177static inline struct flock *lock(
int type) {
178 static struct flock lock;
179 lock.l_type = (short)type;
180 lock.l_whence = SEEK_SET;
183 lock.l_pid = getpid();
188static inline std::string get_errno() {
189 const char *s_err = strerror(errno);
193 return "Unknown error.";
204 if(dims.size () != pos.size ())
205 throw InternalErr(__FILE__,__LINE__,
"dimension error in INDEX_nD_TO_1D routine.");
209 for (
size_t p = 0; p < pos.size (); p++) {
212 for (
size_t j = start; j < dims.size (); j++)
220 int GDij2ll(
int projcode,
int zonecode,
double projparm[],
221 int spherecode,
int xdimsize,
int ydimsize,
222 double upleftpt[],
double lowrightpt[],
223 int npnts,
int row[],
int col[],
224 double longitude[],
double latitude[], EOS5GridPRType pixcen, EOS5GridOriginType pixcnr);
230 double HE5_EHconvAng(
double inAngle,
int code);
static void Split(const char *s, int len, char sep, std::vector< std::string > &names)
static H5DataType H5type_to_H5DAPtype(hid_t h5_type_id)
Map HDF5 Datatype to the intermediate H5DAPtype for the future use.
static std::string trim_string(hid_t dtypeid, const std::string &s, int num_sect, size_t section_size, std::vector< size_t > §_newsize)
static ssize_t read_buffer_from_file(int fd, void *buf, size_t)
Getting a subset of a variable.