MISR Toolkit  1.5.1
Functions
MtkFileGridFieldToDimList.c File Reference
#include "MisrFileQuery.h"
#include "MisrUtil.h"
#include "MisrError.h"
#include <hdf.h>
#include <HdfEosDef.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

MTKt_status MtkFileGridFieldToDimList (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
 Read dimension list of a particular field. More...
 
MTKt_status MtkFileGridFieldToDimListNC (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
 
MTKt_status MtkFileGridFieldToDimListHDF (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
 
MTKt_status MtkFileGridFieldToDimListFid (int32 Fid, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
 Version of MtkFileGridFieldToDimList that takes an HDF-EOS file ID rather than a filename. More...
 
MTKt_status MtkFileGridFieldToDimListNcid (int ncid, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
 

Function Documentation

◆ MtkFileGridFieldToDimList()

MTKt_status MtkFileGridFieldToDimList ( const char *  filename,
const char *  gridname,
const char *  fieldname,
int *  dimcnt,
char **  dimlist[],
int **  dimsize 
)

Read dimension list of a particular field.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the list of dimensions for the field Blue Radiance/RDQI in the grid BlueBand in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileGridFieldToDimList("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "BlueBand",
"Blue Radiance/RDQI", &dimcnt, &dimlist, &dimsize);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by dimlist and free() to free the memory used by dimsize
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 42 of file MtkFileGridFieldToDimList.c.

◆ MtkFileGridFieldToDimListFid()

MTKt_status MtkFileGridFieldToDimListFid ( int32  Fid,
const char *  gridname,
const char *  fieldname,
int *  dimcnt,
char **  dimlist[],
int **  dimsize 
)

Version of MtkFileGridFieldToDimList that takes an HDF-EOS file ID rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]FidHDF-EOS File ID
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 139 of file MtkFileGridFieldToDimList.c.

◆ MtkFileGridFieldToDimListHDF()

MTKt_status MtkFileGridFieldToDimListHDF ( const char *  filename,
const char *  gridname,
const char *  fieldname,
int *  dimcnt,
char **  dimlist[],
int **  dimsize 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 96 of file MtkFileGridFieldToDimList.c.

◆ MtkFileGridFieldToDimListNC()

MTKt_status MtkFileGridFieldToDimListNC ( const char *  filename,
const char *  gridname,
const char *  fieldname,
int *  dimcnt,
char **  dimlist[],
int **  dimsize 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 58 of file MtkFileGridFieldToDimList.c.

◆ MtkFileGridFieldToDimListNcid()

MTKt_status MtkFileGridFieldToDimListNcid ( int  ncid,
const char *  gridname,
const char *  fieldname,
int *  dimcnt,
char **  dimlist[],
int **  dimsize 
)
Parameters
[in]ncidnetCDF file identifier
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 268 of file MtkFileGridFieldToDimList.c.


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