OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
filehandle.h
Go to the documentation of this file.
1 #ifndef _FILEHANDLE_H
2 #define _FILEHANDLE_H
3 
4 #include <stdio.h>
5 #include <string.h>
6 #include <filetype.h>
7 #include <sensorInfo.h>
8 #include <productInfo.h>
9 #include "l2prod_struc.h"
10 
11 #define FORWARD 0
12 #define INVERSE_ZERO 1
13 #define INVERSE_NLW 2
14 #define INVERSE_LW 3
15 
16 #define READ 0
17 #define WRITE 1
18 
19 #define L1_PRODSTRLEN 2048
20 #define L1_MAXPROD 1000
21 #define L1_NFLAGS 32
22 
23 #define NBANDSIR 8
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 typedef struct filehandle_struct {
30  char name[FILENAME_MAX];
32  int32_t sensorID;
33  int32_t subsensorID;
35  int32_t length;
36  int32_t spix; /* start pixel (0-based) */
37  int32_t epix; /* end pixel (0-based) */
38  int32_t npix;
39  int32_t ctl_pt_incr;
40  int32_t nscan;
41  int32_t nbands;
42  int32_t nbandsir;
43  int32_t nlvl;
44  int32_t n_refl_loc;
45  int32_t *bindx; /* index to closest seawifs band */
46  int32_t ndets;
47  int32_t mode;
48  char l2prod[L1_PRODSTRLEN]; /* list of L2 products to be included */
49  char def_l2prod[L1_PRODSTRLEN]; /* list of default L2 products */
50  int32_t sd_id; /* hdf file id for the opened output file */
51  int32_t tot_prod; /* total # of L2 products to be created */
53  l2prodstr* prodptr; /* array of product structures */
54  productInfo_t** productInfos; // pointers to product info structures
55 
56  char *geofile;
57  char *gmpfile;
59  int32_t orbit_number;
61  int32_t flag_cnt[L1_NFLAGS];
63  int32_t sv_with_moon;
64  int32_t grp_id[8]; // netCDF group IDs
65 
66  int32_t *iwave;
67  float *fwave;
68  float *fwhm;
69  float *Fobar;
70  float *Fonom;
71  float *Tau_r;
72  float *k_oz;
73  float *k_no2;
74  float *aw;
75  float *bbw;
76 
77  void *private_data;
78 
79 } filehandle;
80 
81 float* calloc_nbandsf(int32_t nbands, float *nbarray, float init_val);
82 int32_t* calloc_nbandsi32t(int32_t nbands, int32_t *nbarray, int32_t init_val);
83 int* calloc_nbandsi(int32_t nbands, int *nbarray, int init_val);
84 
85 void filehandle_init(filehandle *file);
86 
87 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif
#define L1_MAXPROD
Definition: filehandle.h:20
char l2_prod_names[L1_MAXPROD][32]
Definition: filehandle.h:52
int32_t * iwave
Definition: filehandle.h:66
int32_t terrain_corrected
Definition: filehandle.h:62
int32_t nbandsir
Definition: filehandle.h:42
void filehandle_init(filehandle *file)
double node_crossing_time
Definition: filehandle.h:60
void * private_data
Definition: filehandle.h:77
int32_t tot_prod
Definition: filehandle.h:51
l2prodstr * prodptr
Definition: filehandle.h:53
int32_t * bindx
Definition: filehandle.h:45
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed file
Definition: HISTORY.txt:413
int32_t grp_id[8]
Definition: filehandle.h:64
char l2prod[L1_PRODSTRLEN]
Definition: filehandle.h:48
file_type format
Definition: filehandle.h:31
float * calloc_nbandsf(int32_t nbands, float *nbarray, float init_val)
productInfo_t ** productInfos
Definition: filehandle.h:54
float orbit_node_lon
Definition: filehandle.h:58
char def_l2prod[L1_PRODSTRLEN]
Definition: filehandle.h:49
char name[FILENAME_MAX]
Definition: filehandle.h:30
int32_t orbit_number
Definition: filehandle.h:59
#define L1_PRODSTRLEN
Definition: filehandle.h:19
int32_t flag_cnt[L1_NFLAGS]
Definition: filehandle.h:61
char spatialResolution[10]
Definition: filehandle.h:34
int32_t sensorID
Definition: filehandle.h:32
file_type
Definition: filetype.h:11
int32_t n_refl_loc
Definition: filehandle.h:44
int32_t nbands
int32_t ctl_pt_incr
Definition: filehandle.h:39
int * calloc_nbandsi(int32_t nbands, int *nbarray, int init_val)
int32_t * calloc_nbandsi32t(int32_t nbands, int32_t *nbarray, int32_t init_val)
#define L1_NFLAGS
Definition: filehandle.h:21
int32_t subsensorID
Definition: filehandle.h:33
int32_t sv_with_moon
Definition: filehandle.h:63