60 {H5FSTRING, H5FLOAT32,H5CHAR,H5UCHAR,H5INT16,H5UINT16,
61 H5INT32,H5UINT32,H5INT64,H5UINT64,H5FLOAT64,H5VSTRING,
62 H5REFERENCE,H5COMPOUND,H5ARRAY,H5UNSUPTYPE};
64 enum CVType { CV_EXIST,CV_LAT_MISS,CV_LON_MISS,CV_NONLATLON_MISS,CV_FILLINDEX,CV_MODIFY,CV_SPECIAL,CV_UNSUPPORTED};
69 const int HE5_HDFE_RAD_DEG=0;
70 const int HE5_HDFE_DEG_RAD=1;
71 const int HE5_HDFE_DMS_DEG=2;
72 const int HE5_HDFE_DEG_DMS=3;
73 const int HE5_HDFE_RAD_DMS=4;
74 const 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);
101 static bool cf_strict_support_type(H5DataType dtype);
102 static bool cf_dap2_support_numeric_type(H5DataType dtype);
105 static void gen_unique_name(std::string &str, std::set<std::string>&namelist,
int&clash_index);
109 static void Split (
const char *s,
int len,
char sep,
110 std::vector < std::string > &names);
113 static void Split (
const char *sz,
char sep,
114 std::vector < std::string > &names);
116 static void Split_helper(std::vector<std::string>&tokens,
const std::string &text,
const char sep);
119 static void parser_gpm_l3_gridheader(
const std:: vector<char>&value,
int& latsize,
int&lonsize,
120 float& lat_start,
float& lon_start,
float& lat_res,
float& lon_res,
bool check_reg_orig);
122 static void close_fileid(hid_t,
bool);
126 static std::string obtain_cache_fname(
const std::string & fprefix,
const std::string & fname,
const std::string &vname);
130 static void rev_str(
char *str,
int len);
133 static int int_to_str(
int,
char str[],
int);
136 static void dtoa(
double,
char *,
int);
139 static std::string get_double_str(
double x,
int total_digit,
int after_point);
142 static std::string get_int_str(
int x);
156 template<
typename T>
int subset(
163 std::vector<T> *poutput,
169 static inline struct flock *lock(
int type) {
170 static struct flock lock;
172 lock.l_whence = SEEK_SET;
175 lock.l_pid = getpid();
180 static inline std::string get_errno() {
181 char *s_err = strerror(errno);
185 return "Unknown error.";
196 if(dims.size () != pos.size ())
197 throw InternalErr(__FILE__,__LINE__,
"dimension error in INDEX_nD_TO_1D routine.");
201 for (
size_t p = 0; p < pos.size (); p++) {
204 for (
size_t j = start; j < dims.size (); j++)
212 int GDij2ll(
int projcode,
int zonecode,
double projparm[],
213 int spherecode,
int xdimsize,
int ydimsize,
214 double upleftpt[],
double lowrightpt[],
215 int npnts,
int row[],
int col[],
216 double longitude[],
double latitude[], EOS5GridPRType pixcen, EOS5GridOriginType pixcnr);
222 double HE5_EHconvAng(
double inAngle,
int code);