OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_ocm2_hdf.c File Reference
#include "l1_ocm2_hdf.h"
#include "l1.h"
#include <mfhdf.h>
#include <allocate2d.h>
Include dependency graph for l1_ocm2_hdf.c:

Go to the source code of this file.

Macros

#define READ_GLBL_ATTR(nam, ptr)
 
#define READ_SDS(nam, ptr, s0, s1, s2, e0, e1, e2)
 

Functions

void interp_ocm2_geo (int32 sd_id, int32 nx, int32 ny, char *sdsname, float32 **geo)
 
int openl1_ocm2_hdf (filehandle *file)
 
int readl1_ocm2_hdf (filehandle *file, int32_t scan, l1str *l1rec)
 
int closel1_ocm2_hdf (filehandle *file)
 

Macro Definition Documentation

◆ READ_GLBL_ATTR

#define READ_GLBL_ATTR (   nam,
  ptr 
)
Value:
{ \
if(SDreadattr(sd_id,SDfindattr(sd_id,(nam)),(VOIDP)(ptr))){ \
fprintf(stderr, \
"-E- %s line %d: Could not get global attribute, %s.\n", \
__FILE__,__LINE__,(nam)); \
} \
}

Definition at line 16 of file l1_ocm2_hdf.c.

◆ READ_SDS

#define READ_SDS (   nam,
  ptr,
  s0,
  s1,
  s2,
  e0,
  e1,
  e2 
)
Value:
{ \
int32 start[3]; \
int32 edge[3]; \
edge[0]=(e0); edge[1]=(e1); edge[2]=(e2); \
start[0]=(s0); start[1]=(s1); start[2]=(s2); \
if(SDreaddata(SDselect(sd_id, SDnametoindex(sd_id, (nam))), \
start, NULL, edge, (VOIDP)(ptr)) == FAIL){ \
fprintf(stderr,"-E- %s line %d: Could not read SDS, %s.\n", \
__FILE__,__LINE__,(nam)); \
} \
}

Definition at line 24 of file l1_ocm2_hdf.c.

Function Documentation

◆ closel1_ocm2_hdf()

int closel1_ocm2_hdf ( filehandle *  file)

Definition at line 214 of file l1_ocm2_hdf.c.

◆ interp_ocm2_geo()

void interp_ocm2_geo ( int32  sd_id,
int32  nx,
int32  ny,
char *  sdsname,
float32 **  geo 
)

Definition at line 36 of file l1_ocm2_hdf.c.

◆ openl1_ocm2_hdf()

int openl1_ocm2_hdf ( filehandle *  file)

Definition at line 104 of file l1_ocm2_hdf.c.

◆ readl1_ocm2_hdf()

int readl1_ocm2_hdf ( filehandle *  file,
int32_t  scan,
l1str *  l1rec 
)

Definition at line 136 of file l1_ocm2_hdf.c.

#define FAIL
Definition: ObpgReadGrid.h:18
#define NULL
Definition: decode_rs.h:63