42BaseType *HDF5GMCFSpecialCVArray::ptr_duplicate()
44 auto HDF5GMCFSpecialCVArray_unique = make_unique<HDF5GMCFSpecialCVArray>(*
this);
45 return HDF5GMCFSpecialCVArray_unique.release();
48bool HDF5GMCFSpecialCVArray::read()
51 BESDEBUG(
"h5",
"Coming to HDF5GMCFSpecialCVArray read "<<endl);
53 read_data_NOT_from_mem_cache(
false,
nullptr);
60void HDF5GMCFSpecialCVArray::obtain_gpm_l3_layer(int64_t nelms,
const vector<int64_t>&offset,
const vector<int64_t>&step,
const vector<int64_t>&)
63 vector<float> total_val;
64 total_val.resize(tnumelm);
65 for (
int i = 0; i < 20; i++)
66 total_val[i] = 0.5 * (i + 1);
68 for (
int i = 20; i < 28; i++)
69 total_val[i] = total_val[19] + (i - 19);
75 if (nelms == tnumelm) {
76 set_value(total_val.data(), (
int)nelms);
83 for (
int i = 0; i < nelms; i++)
84 val[i] = total_val[offset[0] + step[0] * i];
85 set_value(val.data(), (
int)nelms);
94void HDF5GMCFSpecialCVArray::obtain_gpm_l3_layer2(int64_t nelms,
const vector<int64_t>&offset,
const vector<int64_t>&step,
const vector<int64_t>&)
98 vector<float> total_val;
99 total_val.resize(tnumelm);
100 for (
int i = 0; i < 2; i++)
101 total_val[i] = 0.5 * (i + 1);
103 for (
int i = 2; i < 19; i++)
104 total_val[i] = total_val[1] + (i - 1);
109 if (nelms == tnumelm) {
110 set_value(total_val.data(), (
int)nelms);
117 for (
int i = 0; i < nelms; i++)
118 val[i] = total_val[offset[0] + step[0] * i];
119 set_value(val.data(), (
int)nelms);
123void HDF5GMCFSpecialCVArray::obtain_gpm_l3_nalt_hgt(int64_t nelms,
const vector<int64_t>&offset,
const vector<int64_t>&step,
const vector<int64_t>&)
127 vector<float> total_val;
138 if (nelms == tnumelm) {
139 set_value(total_val.data(), (
int)nelms);
146 for (
int i = 0; i < nelms; i++)
147 val[i] = total_val[offset[0] + step[0] * i];
148 set_value(val.data(), (
int)nelms);
153void HDF5GMCFSpecialCVArray::obtain_gpm_l3_nalt(int64_t nelms,
const vector<int64_t>&offset,
const vector<int64_t>&step,
const vector<int64_t>&)
156 vector<float> total_val;
168 if (nelms == tnumelm) {
169 set_value(total_val.data(), (
int)nelms);
176 for (
int i = 0; i < nelms; i++)
177 val[i] = total_val[offset[0] + step[0] * i];
178 set_value(val.data(), (
int)nelms);
183void HDF5GMCFSpecialCVArray::read_data_NOT_from_mem_cache(
bool ,
void*)
186 BESDEBUG(
"h5",
"Coming to HDF5GMCFSpecialCVArray: read_data_NOT_from_mem_cache "<<endl);
190 vector<int64_t> offset;
191 vector<int64_t> count;
192 vector<int64_t> step;
199 int64_t nelms = format_constraint(offset.data(), step.data(), count.data());
201 if (GPMS_L3 == product_type || GPMM_L3 == product_type || GPM_L3_New == product_type) {
202 if (varname ==
"nlayer" && 28 == tnumelm)
203 obtain_gpm_l3_layer(nelms, offset, step, count);
204 else if (varname ==
"nlayer" && 19 == tnumelm)
205 obtain_gpm_l3_layer2(nelms, offset, step, count);
206 else if (varname ==
"hgt" && 5 == tnumelm) {
207 obtain_gpm_l3_nalt_hgt(nelms, offset, step, count);
209 else if (varname ==
"nalt" && 5 == tnumelm) obtain_gpm_l3_nalt_hgt(nelms, offset, step, count);
This class specifies the retrieval of the missing lat/lon values for general HDF5 products.