MISR Toolkit  1.5.1
Functions
MtkReadRaw.c File Reference
#include "MisrReadData.h"
#include "MisrCoordQuery.h"
#include "MisrFileQuery.h"
#include "MisrError.h"
#include "MisrCache.h"
#include "MisrUtil.h"
#include "misrproj.h"
#include <hdf.h>
#include <HdfEosDef.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

MTKt_status MtkReadRaw (const char *filename, const char *gridname, const char *fieldname, MTKt_Region region, MTKt_DataBuffer *databuf, MTKt_MapInfo *mapinfo)
 Reads any native grid/field from a MISR product file without unpacking or unscaling. More...
 
MTKt_status MtkReadRawHDF (const char *filename, const char *gridname, const char *fieldname, MTKt_Region region, MTKt_DataBuffer *databuf, MTKt_MapInfo *mapinfo)
 
MTKt_status MtkReadRawNC (const char *filename, const char *gridname, const char *fieldname, MTKt_Region region, MTKt_DataBuffer *databuf, MTKt_MapInfo *mapinfo)
 
MTKt_status MtkReadRawFid (int32 fid, const char *gridname, const char *fieldname, MTKt_Region region, MTKt_DataBuffer *databuf, MTKt_MapInfo *mapinfo)
 Version of MtkReadRaw that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkReadRawNcid (int ncid, const char *gridname, const char *fieldname, MTKt_Region region, MTKt_DataBuffer *databuf, MTKt_MapInfo *mapinfo)
 Version of MtkReadRaw that takes an HDF-EOS file identifier rather than a filename. More...
 

Function Documentation

◆ MtkReadRaw()

MTKt_status MtkReadRaw ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_Region  region,
MTKt_DataBuffer databuf,
MTKt_MapInfo mapinfo 
)

Reads any native grid/field from a MISR product file without unpacking or unscaling.

Returns
MTK_SUCCESS if successful.
Special Note:
Typically this function is not called directly. Instead use MtkReadData().
Note
The MISR Toolkit read functions always return a 2-D data plane buffer. Some fields in the MISR data products are multi-dimensional. In order to read one of these fields, the slice to read needs to be specified. A bracket notation on the fieldname is used for this purpose. For example fieldname = "RetrAppMask[0][5]".
Additional dimensions can be determined by the routine MtkFileGridFieldToDimlist() or by the MISR Data Product Specification (DPS) Document. The actually definition of the indices are not described in the MISR product files and thus not described by the MISR Toolkit. These will have to be looked up in the MISR DPS. All indices are 0-based.
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[in]regionRegion
[out]databufData buffer
[out]mapinfoMapinfo

Definition at line 49 of file MtkReadRaw.c.

◆ MtkReadRawFid()

MTKt_status MtkReadRawFid ( int32  fid,
const char *  gridname,
const char *  fieldname,
MTKt_Region  region,
MTKt_DataBuffer databuf,
MTKt_MapInfo mapinfo 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS file identifier
[in]gridnameGrid name
[in]fieldnameField name
[in]regionRegion
[out]databufData buffer
[out]mapinfoMapinfo

Definition at line 141 of file MtkReadRaw.c.

◆ MtkReadRawHDF()

MTKt_status MtkReadRawHDF ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_Region  region,
MTKt_DataBuffer databuf,
MTKt_MapInfo mapinfo 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[in]regionRegion
[out]databufData buffer
[out]mapinfoMapinfo

Definition at line 65 of file MtkReadRaw.c.

◆ MtkReadRawNC()

MTKt_status MtkReadRawNC ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_Region  region,
MTKt_DataBuffer databuf,
MTKt_MapInfo mapinfo 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[in]regionRegion
[out]databufData buffer
[out]mapinfoMapinfo

Definition at line 99 of file MtkReadRaw.c.

◆ MtkReadRawNcid()

MTKt_status MtkReadRawNcid ( int  ncid,
const char *  gridname,
const char *  fieldname,
MTKt_Region  region,
MTKt_DataBuffer databuf,
MTKt_MapInfo mapinfo 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]ncidnetcdf file identifier
[in]gridnameGrid name
[in]fieldnameField name
[in]regionRegion
[out]databufData buffer
[out]mapinfoMapinfo

Definition at line 248 of file MtkReadRaw.c.


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