#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <mfhdf.h>
#include <genutils.h>
Go to the source code of this file.
|
#define | USAGE "\Usage: %s filename\n\where: filename is the full path to a SeaWiFS level-2 file that contains\n\ computed depth data.\n\This program maps SeaWiFS level-2 depth data to bins of a Plate Carree\n\projection that extends from 35 North to 35 South and from 180 West\n\to 180 East. The results are written to standard output as a series\n\of ASCII text records. Each output record contains a bin number and\n\pixel value separated by whitespace. Each bin represents one 0.01 by\n\0.01 degree subregion of the aforementioned area. Bins are numbered\n\from 0 to 251,999,999. Depths are expressed in meters.\n" |
|
#define | FILENAME argv[1] |
|
#define | LAC_PIXEL_INSET 200 |
|
#define | SCALE 100 |
|
#define | READ_GLBL_ATTR(nam, ptr) |
|
#define | MALLOC(ptr, typ, num) |
|
#define | READ_SDS(nam, ptr, s0, s1, s2, e0, e1, e2) |
|
|
void | get_scan_coords (int32, int32, int32, float32 **, float32 **) |
|
int | main (int argc, char *argv[]) |
|
◆ FILENAME
◆ LAC_PIXEL_INSET
#define LAC_PIXEL_INSET 200 |
◆ MALLOC
#define MALLOC |
( |
|
ptr, |
|
|
|
typ, |
|
|
|
num |
|
) |
| |
Value: { \
(ptr) = (typ *)malloc((num) * sizeof(typ)); \
fprintf(
stderr,
"-E- %s line %d: Memory allocation failure.\n", \
__FILE__,__LINE__); \
exit(EXIT_FAILURE); \
} \
}
Definition at line 45 of file bindepths.c.
◆ READ_GLBL_ATTR
#define READ_GLBL_ATTR |
( |
|
nam, |
|
|
|
ptr |
|
) |
| |
Value: { \
if(SDreadattr(sd_id,SDfindattr(sd_id,(nam)),(VOIDP)(ptr))){ \
"-E- %s line %d: Could not get global attribute, %s, from file, %s.\n", \
return(EXIT_FAILURE); \
} \
}
Definition at line 36 of file bindepths.c.
◆ READ_SDS
#define READ_SDS |
( |
|
nam, |
|
|
|
ptr, |
|
|
|
s0, |
|
|
|
s1, |
|
|
|
s2, |
|
|
|
e0, |
|
|
|
e1, |
|
|
|
e2 |
|
) |
| |
Value: { \
int32
start[3],edge[3]; \
edge[0]=(e0); edge[1]=(e1); edge[2]=(e2); \
if(SDreaddata(SDselect(sd_id, SDnametoindex(sd_id, (nam))), \
fprintf(
stderr,
"-E- %s line %d: Could not read SDS, %s.\n", \
__FILE__,__LINE__,(nam)); \
exit(EXIT_FAILURE); \
} \
}
Definition at line 54 of file bindepths.c.
◆ SCALE
◆ USAGE
#define USAGE "\Usage: %s filename\n\where: filename is the full path to a SeaWiFS level-2 file that contains\n\ computed depth data.\n\This program maps SeaWiFS level-2 depth data to bins of a Plate Carree\n\projection that extends from 35 North to 35 South and from 180 West\n\to 180 East. The results are written to standard output as a series\n\of ASCII text records. Each output record contains a bin number and\n\pixel value separated by whitespace. Each bin represents one 0.01 by\n\0.01 degree subregion of the aforementioned area. Bins are numbered\n\from 0 to 251,999,999. Depths are expressed in meters.\n" |
◆ get_scan_coords()
void get_scan_coords |
( |
int32 |
s, |
|
|
int32 |
npix, |
|
|
int32 |
nctl, |
|
|
float32 ** |
lat, |
|
|
float32 ** |
lon |
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |