OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_input.h
Go to the documentation of this file.
1 #ifndef _L1_INPUT_H
2 #define _L1_INPUT_H
3 
4 #include <stdint.h>
5 #include <stdio.h>
6 
7 #define L1_PRODSTRLEN 2048
8 #define L1_MAXPROD 1000
9 #define L1_NFLAGS 32
10 
11 #define NBANDSIR 8
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 typedef struct l1_input_struct {
19 
20  // file reading control params
21  char calfile[FILENAME_MAX];
22  char xcal_file[FILENAME_MAX];
23  char btfile[FILENAME_MAX];
24  char cld_msk_file[FILENAME_MAX];
25  char viirscalparfile[FILENAME_MAX];
26  char pversion[1024];
27  char input_parms[32768];
28  char input_files[6144];
29 
30  int32_t rad_opt; /* radcor switch for MERIS smile correction */
31  int32_t geom_per_band; /* 0 - use nominal geometry sen/sol_a/a
32  1 - use band-specific values for instruments
33  that have band specific geometry */
34  int32_t xcal_nwave; /* number of wavelengths to which xcal applied */
35  int32_t *xcal_opt; /* xcal option per band */
36  float *xcal_wave; /* sensor wavelengths to which xcal applied */
37  int32_t resolution; /* process at this nadir pixel res (meters) */
38  /* 250, 500, 1000, -1=native (modis only) */
39  int32_t newavhrrcal; /* new avhrr calibration equation */
40  int32_t sl_pixl; /* seawifs straylight pixel limit */
41  float sl_frac; /* seawifs straylight Ltyp fraction */
42  float ch22detcor[10]; /* channel 22 detector corrections */
43  float ch23detcor[10]; /* channel 23 detector corrections */
44  float cirrus_thresh[2]; /* cirrus reflectance thresholds */
45  float albedo; /* cloud reflectance threshold */
46  float cloud_wave; /* cloud test wavelength */
47  float cloud_eps; /* cloud reflectance ratio */
48  float glint; /* glint threshold */
49  float sunzen; /* solar zenith angle threshold */
50  float satzen; /* sensor zenith angle threshold */
51  float hipol; /* high polarization threshold */
52  float *gain; /* Vicarious calibration gain */
53  float *offset; /* Vicarious calibration offset */
54 
55  int32_t spixl; /* starting pixel no. of the input (1-rel) */
56  int32_t epixl; /* ending pixel no. of the input (1-rel) */
57  int32_t dpixl; /* pixel subsampling increment */
58  int32_t sline; /* starting line no. of the input (1-rel) */
59  int32_t eline; /* ending line no. of the input (1-rel) */
60  int32_t dline; /* line subsampling increment */
61 
62  int32_t outband_opt; /* 1=apply seawifs out-of-band correction */
63  int32_t evalmask;
64  int32_t landmask; /* 0=off, 1=on */
65  int32_t bathmask; /* 0=off, 1=on */
66  int32_t cloudmask; /* 0=off, 1=on */
67  int32_t glintmask; /* 0=off, 1=on */
68  int32_t sunzenmask; /* 0=off, 1=on */
69  int32_t satzenmask; /* 0=off, 1=on */
70  int32_t hiltmask; /* 0=off, 1=on */
71  int32_t stlightmask; /* 0=off, 1=on */
72 
73 } l1_input_t;
74 
75 
76 
77 float* calloc_nbandsf(int32_t nbands, float *nbarray, float init_val);
78 int32_t* calloc_nbandsi32t(int32_t nbands, int32_t *nbarray, int32_t init_val);
79 int* calloc_nbandsi(int32_t nbands, int *nbarray, int init_val);
80 
81 
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 extern l1_input_t *l1_input; /* L1 input parameters structure */
88 
89 
90 #endif
int32_t bathmask
Definition: l1_input.h:65
int32_t landmask
Definition: l1_input.h:64
float sl_frac
Definition: l1_input.h:41
char calfile[FILENAME_MAX]
Definition: l1_input.h:21
int32_t outband_opt
Definition: l1_input.h:62
float satzen
Definition: l1_input.h:50
char xcal_file[FILENAME_MAX]
Definition: l1_input.h:22
float sunzen
Definition: l1_input.h:49
int32_t newavhrrcal
Definition: l1_input.h:39
int32_t stlightmask
Definition: l1_input.h:71
int32_t evalmask
Definition: l1_input.h:63
int32_t rad_opt
Definition: l1_input.h:30
int32_t sl_pixl
Definition: l1_input.h:40
char cld_msk_file[FILENAME_MAX]
Definition: l1_input.h:24
float cloud_eps
Definition: l1_input.h:47
int32_t sunzenmask
Definition: l1_input.h:68
float * offset
Definition: l1_input.h:53
int32_t hiltmask
Definition: l1_input.h:70
int * calloc_nbandsi(int32_t nbands, int *nbarray, int init_val)
int32_t epixl
Definition: l1_input.h:56
l1_input_t * l1_input
Definition: l1_options.c:9
int32_t dline
Definition: l1_input.h:60
float albedo
Definition: l1_input.h:45
char input_parms[32768]
Definition: l1_input.h:27
float * xcal_wave
Definition: l1_input.h:36
int32_t * xcal_opt
Definition: l1_input.h:35
int32_t dpixl
Definition: l1_input.h:57
char input_files[6144]
Definition: l1_input.h:28
float ch22detcor[10]
Definition: l1_input.h:42
int32_t sline
Definition: l1_input.h:58
int32_t geom_per_band
Definition: l1_input.h:31
int32_t resolution
Definition: l1_input.h:37
char btfile[FILENAME_MAX]
Definition: l1_input.h:23
char viirscalparfile[FILENAME_MAX]
Definition: l1_input.h:25
int32_t satzenmask
Definition: l1_input.h:69
float * gain
Definition: l1_input.h:52
int32_t eline
Definition: l1_input.h:59
int32_t nbands
int32_t xcal_nwave
Definition: l1_input.h:34
int32_t * calloc_nbandsi32t(int32_t nbands, int32_t *nbarray, int32_t init_val)
float ch23detcor[10]
Definition: l1_input.h:43
int32_t glintmask
Definition: l1_input.h:67
float cirrus_thresh[2]
Definition: l1_input.h:44
char pversion[1024]
Definition: l1_input.h:26
float cloud_wave
Definition: l1_input.h:46
float * calloc_nbandsf(int32_t nbands, float *nbarray, float init_val)
int32_t spixl
Definition: l1_input.h:55
int32_t cloudmask
Definition: l1_input.h:66