MISR Toolkit  1.5.1
Functions
MtkFieldAttrList.c File Reference
#include "MisrFileQuery.h"
#include "MisrError.h"
#include <mfhdf.h>
#include <HdfEosDef.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

MTKt_status MtkFieldAttrList (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 Get a list of field attributes. More...
 
MTKt_status MtkFieldAttrListNC (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFieldAttrListHDF (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFieldAttrListFid (int32 fid, const char *fieldname, int *num_attrs, char **attrlist[])
 Version of MtkFieldAttrList that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkFieldAttrListNcid (int ncid, const char *fieldname, int *num_attrs, char **attrlist[])
 

Function Documentation

◆ MtkFieldAttrList()

MTKt_status MtkFieldAttrList ( const char *  filename,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)

Get a list of field attributes.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get a list of field attributes in the CloudTopHeight field within the Stereo_1.1_km grid from the file MISR_AM1_TC_CLOUD_P110_O074017_F01_0001.hdf
status = MtkFieldAttrList("MISR_AM1_TC_CLOUD_P110_O074017_F01_0001.hdf", "Stereo_1.1_km", "CloudTopHeight", &num_attrs, &attrlist);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by attrlist
Parameters
[in]filenameFile name
[in]fieldnameField name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 39 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListFid()

MTKt_status MtkFieldAttrListFid ( int32  fid,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)

Version of MtkFieldAttrList that takes an HDF-EOS file identifier rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS file identifier
[in]fieldnameField name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 133 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListHDF()

MTKt_status MtkFieldAttrListHDF ( const char *  filename,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]filenameFile name
[in]fieldnameField name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 90 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListNC()

MTKt_status MtkFieldAttrListNC ( const char *  filename,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]filenameFile name
[in]fieldnameField name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 53 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListNcid()

MTKt_status MtkFieldAttrListNcid ( int  ncid,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]ncidnetCDF File ID
[in]fieldnameField name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 199 of file MtkFieldAttrList.c.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53