22 #include <HdfEosDef.h> 43 const char *fieldname,
57 const char *fieldname,
93 const char *fieldname,
128 const char *gridname,
129 const char *fieldname,
143 char *basefield = NULL;
145 int *extradims = NULL;
147 if (gridname == NULL ||
148 fieldname == NULL || fillbuf == NULL)
151 gid =
GDattach(fid, (
char*)gridname);
157 hdfstatus =
GDfieldinfo(gid, basefield, &rank, dims, &hdf_datatype, dimlist);
167 if (hdfstatus ==
FAIL) {
169 fillbuf_tmp.
data.
u8[0][0] = 253;
178 *fillbuf = fillbuf_tmp;
185 if (basefield != NULL) free(basefield);
186 if (extradims != NULL) free(extradims);
193 const char *gridname,
194 const char *fieldname,
202 char *basefield = NULL;
204 int *extradims = NULL;
206 if (gridname == NULL ||
207 fieldname == NULL || fillbuf == NULL)
220 status =
MtkNCVarId(group_id, basefield, &var);
240 *fillbuf = fillbuf_tmp;
246 if (basefield != NULL) free(basefield);
247 if (extradims != NULL) free(extradims);
MTKt_status MtkNcToMtkDataTypeConvert(nc_type nc_datatype, MTKt_DataType *datatype)
MTKt_status MtkFillValueGetFid(int32 fid, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
Version of MtkFillValueGet that takes an HDF-EOS file ID rather than a filename.
MTKt_status MtkDataBufferAllocate(int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
Allocate Data Buffer.
HDFFCLIBAPI _fcd _fcd intf intf * datatype
MTKt_status MtkFillValueGet(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
Get fill value.
int32 GDattach(int32, char *)
MTKt_status MtkFillValueGetNcid(int ncid, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
intn GDgetfillvalue(int32, char *, VOIDP)
EXTERNL int nc_get_att(int ncid, int varid, const char *name, void *ip)
HDFFCLIBAPI void intf dims[]
MTKt_status MtkParseFieldname(const char *fieldname, char **basefieldname, int *ndim, int **dimlist)
Parses extra dimensions from fieldnames.
#define MTK_ERR_CODE_JUMP(code)
2-dimensional Data Buffer
MTKt_status MtkFillValueGetHDF(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
MTKt_status MtkHdfToMtkDataTypeConvert(int32 hdf_datatype, MTKt_DataType *datatype)
Convert HDF data type to MISR Toolkit data type.
#define MTKT_DATABUFFER_INIT
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
intn GDfieldinfo(int32, char *, int32 *, int32 [], int32 *, char *)
MTKt_status MtkFillValueGetNC(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
#define MTK_ERR_COND_JUMP(code)
int32 GDopen(char *, intn)
EXTERNL int nc_close(int ncid)
MTKt_status MtkNCVarId(int Ncid, const char *Name, MTKt_ncvarid *Var)
EXTERNL int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
EXTERNL int nc_open(const char *path, int mode, int *ncidp)