21 #include <HdfEosDef.h> 103 if (hdf_status ==
FAIL)
129 char **gridlist = NULL;
134 float64 projparm[13];
138 if (filetype == NULL)
149 hdf_status = gridID =
GDattach(Fid,gridlist[0]);
150 if (hdf_status ==
FAIL)
153 hdf_status =
GDprojinfo(gridID,&projcode,&zonecode,&spherecode,projparm);
154 if (hdf_status ==
FAIL)
158 if (hdf_status ==
FAIL)
163 if (projparm[11] == 0)
168 hdf_status =
EHidinfo(Fid, &HDFfid, &sid);
169 if (hdf_status ==
FAIL)
177 fn_start = strstr(lgid,
"MISR_HR_");
178 if (fn_start == NULL)
184 if (strncmp(fn_start,
"BRF",3) == 0)
186 else if (strncmp(fn_start,
"RPV",3) == 0)
188 else if (strncmp(fn_start,
"TIP",3) == 0)
201 hdf_status =
EHidinfo(Fid, &HDFfid, &sid);
202 if (hdf_status ==
FAIL)
210 fn_start = strstr(lgid,
"MISR_AM1_");
211 if (fn_start == NULL)
217 if (strncmp(fn_start,
"AGP",3) == 0)
219 else if (strncmp(fn_start,
"GP_GMP",6) == 0)
221 else if (strncmp(fn_start,
"GRP_RCCM",8) == 0)
223 else if (strncmp(fn_start,
"GRP_ELLIPSOID_GM",16) == 0)
225 else if (strncmp(fn_start,
"GRP_TERRAIN_GM",14) == 0)
227 else if (strncmp(fn_start,
"GRP_ELLIPSOID_LM",16) == 0)
229 else if (strncmp(fn_start,
"GRP_TERRAIN_LM",14) == 0)
231 else if (strncmp(fn_start,
"AS_AEROSOL",10) == 0)
233 else if (strncmp(fn_start,
"AS_LAND",7) == 0)
235 else if (strncmp(fn_start,
"TC_ALBEDO",9) == 0)
237 else if (strncmp(fn_start,
"TC_CLASSIFIERS",14) == 0)
239 else if (strncmp(fn_start,
"TC_STEREO",9) == 0)
241 else if (strncmp(fn_start,
"PGRP_ELLIPSOID_GM",17) == 0)
243 else if (strncmp(fn_start,
"PGRP_TERRAIN_GM",15) == 0)
245 else if (strncmp(fn_start,
"PP",2) == 0)
247 else if (strncmp(fn_start,
"TC_CLOUD",8) == 0)
249 else if (strncmp(fn_start,
"CMV_T",5) == 0)
259 if (gridlist != NULL)
273 if (filetype == NULL)
282 char *fn_start = strstr(lgid,
"MISR_AM1_");
283 if (fn_start == NULL)
289 if (strncmp(fn_start,
"AS_AEROSOL",10) == 0)
291 else if (strncmp(fn_start,
"AS_LAND",7) == 0)
MTKt_status MtkStringListFree(int strcnt, char **strlist[])
Free string list.
int32 GDattach(int32, char *)
MTKt_status MtkFileTypeHDF(const char *filename, MTKt_FileType *filetype)
MTKt_status MtkFileType(const char *filename, MTKt_FileType *filetype)
Determine MISR product file type.
MTKt_status MtkFileLGIDNcid(int ncid, char **lgid)
intn GDprojinfo(int32, int32 *, int32 *, int32 *, float64 [])
#define MTK_ERR_CODE_JUMP(code)
MTKt_status MtkFileTypeNC(const char *filename, MTKt_FileType *filetype)
intn EHidinfo(int32, int32 *, int32 *)
MTKt_status MtkFileLGIDFid(int32 sds_id, char **lgid)
Version of MtkFileLGID that takes an HDF SDS ID rather than a filename.
MTKt_status MtkFileTypeFid(int32 Fid, MTKt_FileType *filetype)
Version of MtkFileType that takes an HDF-EOS file identifier rather than a filename.
MTKt_status MtkFileTypeNcid(int ncid, MTKt_FileType *filetype)
#define MTK_ERR_COND_JUMP(code)
int32 GDopen(char *, intn)
EXTERNL int nc_close(int ncid)
MTKt_status MtkFileToGridListFid(int32 fid, int *ngrids, char **gridlist[])
Version of MtkFileToGridList that takes an HDF-EOS file identifier rather than a filename.
EXTERNL int nc_open(const char *path, int mode, int *ncidp)