NASA Logo
Ocean Color Science Software

ocssw V2022
l12_proto.h
Go to the documentation of this file.
1 #ifndef _L12_PROTO_H
2 #define _L12_PROTO_H
3 
4 #include <stdint.h>
5 #include <sys/types.h>
6 #include <unistd.h>
7 #include <stdio.h>
8 #include <math.h>
9 #include <stdlib.h>
10 #include <libgen.h>
11 #include <string.h>
12 #include <ctype.h>
13 #include <netcdf.h>
14 
15 #include <hdf.h>
16 #include <mfhdf.h>
17 
18 #include <l1.h>
19 #include "input_struc.h"
20 #include "l12_parms.h"
21 #include "l1q_struc.h"
22 #include "l2_struc.h"
23 #include "target_struc.h"
24 #include "vcal_struc.h"
25 #include "filter.h"
26 #include <timeutils.h>
27 #include "genutils.h"
28 #include "aer_struc.h"
29 #include "l2prod.h"
30 #include "l2prod_struc.h"
31 #include "dfutils.h"
32 #include "allocate2d.h"
33 #include "epr_api.h"
34 #include "l2_hdf_generic.h"
35 #include "flags_iop.h"
36 #include "table_io_wrapper.h"
37 #include <clo.h>
38 #include <uncertainty.h>
39 #ifdef BUILD_HISTORICAL
40 #include "navigation.h"
41 #endif
42 #include "read_l3bin.h"
43 #include "par_utils.h"
44 #include "get_nitrate.h"
45 #include "get_ctht.h"
46 #include "get_ndvi.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 extern instr *input; /* input parameters structure */
53 
54 int getl1rec(int32_t recnum, int32_t dscan, l1str *l1rec);
55 
56 int loadl1(filehandle *l1file, l1str *l1rec);
57 
58 int openl2(filehandle *l2file);
59 int writel2(filehandle *l2file, int32_t recnum, l2str *l2rec, int outfile_number);
60 int closel2(filehandle *l2file);
61 //VOIDP scale_sds(float *data, l2prodstr *p, int nbands);
62 void update_flag_cnts(int32_t *flag_cnt, int32_t* flags, int32_t nflags, int32_t npix, uint32_t init_mask);
63 void update_flag_cnts16(int32_t *flag_cnt, int16_t* flags, int32_t nflags, int32_t npix, uint32_t init_mask);
64 void update_qual_cnts(int32_t *flag_cnt, int8_t* flags, int32_t nflags, int32_t npix);
65 int write_flag_pcnts(idDS ds_id, FILE *fpmeta, int32_t *flag_cnt, int32_t nflags, const char * const flag_lname[], int32_t numScans, int32_t numPixels);
66 int write_qual_flag_pcnts(idDS ds_id, FILE *fpmeta, int32_t *flag_cnt, int32_t nflags, const char * const flag_lname[]);
67 
68 int open_target(filehandle *file);
69 int read_target(filehandle *file, int32_t recnum, tgstr *tgrec);
70 void close_target(void);
71 
72 int open_aer(filehandle *file);
73 int read_aer(filehandle *file, int32_t recnum, aestr *aerec);
74 void close_aer(filehandle *file);
75 
76 void init_l2(l2str *l2rec, int32_t nbands);
77 
78 void free_l1q(void);
79 int32_t alloc_l2(l1str *l1rec, l2str *l2rec);
80 void free_l2(l2str *l2rec);
81 int32_t alloc_target(int32_t npix, int32_t nbands, tgstr *tgrec);
82 int32_t alloc_aer(int32_t npix, int32_t nbands, aestr *aerec);
83 
84 void init_l2prod();
85 l2prodstr *get_l2prod_index(const char *name, int32_t sensorID, int32_t numBands, int32_t numPixels,
86  int32_t numScans, int32_t *wave);
88 
89 int32_t prodlist(int32_t sensorID, int32_t evalmask, const char *inprod, const char *defprod, char outprod[L1_MAXPROD][32]);
90 
91 int convl12(l1str *l1rec, l2str *l2rec, int32_t spix, int32_t epix, aestr *aerec);
92 int convl21(l2str *l2rec, tgstr *tgrec, int32_t spix, int32_t epix, float *Lt, vcstr *vrec);
93 
94 int32_t l2_seawifs(filehandle *l1file, filehandle *l2file);
95 int32_t l1b_seawifs(filehandle *l1file, filehandle *ofile,
96  int32_t sscan, int32_t escan, int32_t dscan,
97  int32_t spixl, int32_t epixl, int32_t dpixl);
98 int32_t get_modis_calfile(int32_t sd_id, char *file);
99 
100 void setflagbits_l2(l2str *l2rec, int32_t ipix);
101 int setanc(l1str *l1rec);
102 int acq_sfc_albedo(l1str *l1rec);
103 int acq_cth_albedo(l1str *l1rec);
104 int init_cld_dat( l1str *l1rec );
105 int read_albedo( int32_t d_np, int32_t d_nl, int32_t st_lin, int32_t ix_clim,
106  int ncid, int *d_id, unsigned char ***alb_dat );
107 
108 void cpl1rec(l1str *l1new, l1str *l1old);
109 
110 int b128_msk_init(char *landfile, int msknum);
111 int b128_msk_get(float lat, float lon, int msknum);
112 int dem_init();
113 int land_mask_init();
114 int land_mask(float lat, float lon);
115 int land_bath_mask(l1str *l1rec,int32_t ip);
116 int bath_mask_init(char *file);
117 int bath_mask(float lat, float lon);
118 float get_dem(float lat, float lon);
119 int get_height(l1str *l1rec, int32_t ip, int terrain_corrected);
120 void free_deminfo();
121 
122 void lowercase(char *s);
123 
124 void atmocor1(l1str *l1rec, int32_t ip);
125 int atmocor2(l2str *l2rec, aestr *aerec, int32_t ip);
126 void whitecaps(int32_t sensorID, int32_t evalmask, int32_t nwave, float ws, float ws_max, float rhof[]);
127 void rayleigh(l1str *l1rec, int32_t ip);
128 int aerosol(l2str *l2rec, int32_t aer_opt_in, aestr *aerec, int32_t ip,
129  float wave[], int32_t nwave, int32_t nir_s_in, int32_t nir_l_in,
130  float F0_in[], float La1_in[], float La2_out[],
131  float t_sol_out[], float t_sen_out[], float *eps, float taua_out[],
132  int32_t *modmin, int32_t *modmax, float *modrat,
133  int32_t *modmin2, int32_t *modmax2, float *modrat2, float *mbac_w);
134 void gaseous_transmittance(l1str *l1rec, int32_t ip);
135 
136 float ky_airmass(float theta);
137 float pp_airmass(float theta);
138 
139 void get_rhown_nir(char *fqfile, float Rrs[], float wave[], int32_t nir_s, int32_t nir_l,
140  float aw[], float bbw[], float chl, float rhown[],float dRrs[],float dchl, float drhown[]);
141 void get_rhown_eval(char *fqfile, float Rrs[], float wave[], int32_t nir_s, int32_t nir_l,
142  int32_t nwave, float aw[], float bbw[], float chl,
143  float solz, float senz, float phi, float rhown[],l2str *l2rec,int32_t ip);
144 void get_rho_mumm(l2str *l2rec, int32_t ip, int32_t iw, float *rhom);
145 void get_rhown_mumm(l2str *l2rec, int32_t ip, int32_t nir_s, int32_t nir_l, float rhown[]);
146 void glint_rad(int32_t num_iter, int32_t nband, int32_t nir_s, int32_t nir_l,
147  float glint_coef, float air_mass,
148  float mu0, float F0[], float taur[], float taua[], float La[], float TLg[], uncertainty_t *errstr);
149 
150 float fresnel_coef(float mu, float n);
151 float fresnel_sen(float senz, int return_tf);
152 void fresnel_sol(float wave[], int32_t nwave, float solz, float ws, float brdf[], int return_tf);
153 void foqint_morel(char *file, float wave[], int32_t nwave, float solz, float senzp,
154  float phi, float chl, float brdf[]);
155 void qint_morel(float wave[], int32_t nwave, float solz, float chl, float Qn[]);
156 void gothic_R(float wave[], int32_t nwave, float solz, float senz, float ws, float R[]);
157 int ocbrdf(l2str *l2rec, int32_t ip, int32_t brdf_opt, float wave[], int32_t nwave,
158  float solz, float senz, float phi, float ws, float chl, float nLw[], float Fo[], float brdf[]);
159 
160 void nlw_outband(int32_t evalmask, int32_t sensorID, float wave[], int32_t nwave, float Lw[], float nLw[], float outband_correction[]);
161 
162 int l2gen_usage(const char *prog);
163 int msl12_input_defaults(filehandle *l1file);
164 void msl12_input_init();
165 int l2gen_init_options(clo_optionList_t* list, const char* prog);
166 int msl12_option_input(int argc, char *argv[], clo_optionList_t* list,
167  char *progName, filehandle *l1file);
168 int msl12_input(int argc, char *argv[], const char* progName, filehandle *l1file);
169 
170  //int windex_get(int32_t wave);
171 
172 float bin_climatology(char *l3file, int32_t day, float lon, float lat, char *prodname);
173 
174 float get_default_chl(l2str *l2rec, float Rrs[]);
175 void get_chl(l2str *l2rec, int prodnum, float prod[]);
176 void get_las(l2str *l2rec, l2prodstr *p, float prod[]);
177 //void get_sma(l2str *l2rec, int32_t prodID, float prod[]);
178 void get_tsm(l2str *l2rec, int prodnum, float prod[]);
179 void get_poc(l2str *l2rec, l2prodstr *p, float prod[]);
180 float poc_stramski_hybrid(float *Rrs, int32_t sensorID);
181 void get_fsat(l2str *l2rec, float flh[]);
182 void get_fsat2(l2str *l2rec, float flh[]);
183 void get_fqy(l2str *l2rec, float fqy[]);
184 void get_fqy2(l2str *l2rec, float fqy[]);
185 void get_ipar(l2str *l2rec, float ipar[]);
186 void get_par_scalar(l2str *l2rec, float par[]);
187 void get_par_below_surface(l2str *l2rec, float par[]);
188 void get_mu_cosine(l2str *l2rec, float mu[]);
189 void get_ipar2(l2str *l2rec, float ipar[]);
190 void get_ipar_below_surface(l2str *l2rec, float ipar[]);
191 void get_depth_classification(l2str *l2rec, float depth[]);
192 void get_par(l2str *l2rec, float par[]);
193 void get_par2(l2str *l2rec, float par[]);
194 void get_ipar_scalar(l2str *l2rec, float ipar[]);
195 void get_taucld (l2str *l2rec, float taucld[]);
196 void get_clfr (l2str *l2rec, float clfr[]);
197 void get_bsi(l2str *l2rec, float BSi[]);
198 void get_ssn(l2str *l2rec, float ssn[]);
199 void get_angstrom(l2str *l2rec, int band, float angst[]);
200 void get_ms_epsilon(l2str *l2rec, float eps[]);
201 void get_es(l2str *l2rec, int band, float es[]);
202 void get_toa_refl(l2str *l2rec, int band, float rhot[]);
203 void get_dust_index(l2str *l2rec, float dust[]);
204 void get_ndvi(l1str *l1rec, float ndvi[]);
205 void get_evi(l1str *l1rec, float evi[]);
206 void get_evi2(l1str *l1rec, float evi2[]);
207 void get_evi3(l1str *l1rec, float evi3[]);
208 void get_cci(l1str *l1rec, float cci[]);
209 void get_ndii(l1str *l1rec, float ndii[]);
210 void get_ndsi(l1str *l1rec, float ndsi[]);
211 void get_ndwi(l1str *l1rec, float ndwi[]);
212 int get_hyper_vi(l1str *l1rec, int product_number, float product[]);
213 void get_smoke(l2str *l2rec, float smoke[]);
214 void get_Kd(l2str *l2rec, l2prodstr *p, float Kd[]);
215 void get_photic_depth(l2str *l2rec, l2prodstr *p, float Z[]);
216 void cdom_morel(l2str *l2rec, l2prodstr *p, float prod[]);
217 void cdom_mannino(l2str *l2rec, int prodnum, float prod[]);
218  //void get_soa(l2str *l2rec, int32_t prodID, float prod[]);
219  //int run_soa_sma(l2str *l2rec, int32_t ip);
220 void vcal(l2str *l2rec, l2prodstr *p, float vcal[]);
221 float aw_spectra(int32_t wl, int32_t width);
222 float bbw_spectra(int32_t wl, int32_t width);
223 void get_aw_bbw(l2str *l2rec, float wave[], int nwave, float *aw, float *bbw);
224 float seawater_nsw(float wave, float sst, float sss, float *dnswds);
225 float seawater_bb(float wave, float sst, float sss, double delta);
226 void seawater_set(l1str *l1rec);
227 float seawater_get_n(int32_t ip, int32_t ib);
228 float seawater_get_a(int32_t ip, int32_t ib);
229 float seawater_get_bb(int32_t ip, int32_t ib);
230 void get_bbws(l2str *l2rec, l2prodstr *p, float prod[]);
231 void get_avw(l2str *l2rec, float avw[]);
232 void get_Rrs_brightness(l2str *l2rec, float Rrs_brightness[]);
233 void get_lambda_max(l2str *l2rec, float lambda_max[]);
234 void get_Cphyt(l2str *l2rec, float cphyt[]);
235 void get_Cpicophyt(l2str *l2rec, l2prodstr *p, float *cell_abundance);
236 
237 int atmocor1_land(l1str *l1rec, int32_t ip);
238 void polcor(l1str *l1rec, int32_t ip);
239 int get_rhos(l1str *l1rec, int32_t ip);
240 int8_t *get_qual_sst(l2str *l2rec);
241 int8_t *get_qual_sst4(l2str *l2rec);
242 int8_t *get_qual_sst_triple(l2str *l2rec);
243 int16_t *get_flags_sst(l2str *l2rec);
244 int16_t *get_flags_sst4(l2str *l2rec);
245 int16_t *get_flags_sst_triple(l2str *l2rec);
246 float *get_sst_dust_correction(l2str *l2rec);
247 float *get_sst(l2str *l2rec);
248 float *get_sst4(l2str *l2rec);
249 float *get_sst_triple(l2str *l2rec);
250 float *get_bias_sst(l2str *l2rec);
251 float *get_bias_sst4(l2str *l2rec);
252 float *get_bias_sst_triple(l2str *l2rec);
253 float *get_stdv_sst(l2str *l2rec);
254 float *get_stdv_sst4(l2str *l2rec);
255 float *get_stdv_sst_triple(l2str *l2rec);
256 float *get_bias_mean_sst(l2str *l2rec);
257 float *get_bias_mean_sst4(l2str *l2rec);
258 float *get_bias_mean_sst_triple(l2str *l2rec);
259 int16_t *get_counts_sst(l2str *l2rec);
260 int16_t *get_counts_sst4(l2str *l2rec);
261 int16_t *get_counts_sst_triple(l2str *l2rec);
262 
263 float get_sstref(short reftyp, char *file, l1str *l1rec, int32_t ip);
264 float get_sssref(char *file, float lon, float lat, int day);
265 void calcite(l2str *l2rec, l2prodstr *p, float caco3[]);
266 void tindx_morel(l2str *l2rec, int32_t ip, float *tindx);
267 void tindx_shi(l2str *l2rec, int32_t ip, float *tindx);
268 float conv_rrs_to_555(float Rrs, float wave, float dRrs_in, float *dRrs_out);
269 
270 float water_vapor(int ib, float wv, float airmass);
271 int ice_mask_init(char *file, int year, int day, float threshold);
272 char ice_mask(float lon, float lat);
273 float ice_fraction(float lon, float lat);
274 void get_ice_frac(l2str *l2rec, float ice[]);
275 void get_tauc(l2str *l2rec, float tauc[]);
276 void get_mgiop(l2str *l2rec, l2prodstr *p, float prod[]);
277 void get_gsm(l2str *l2rec, l2prodstr *p, float prod[]);
278 int16_t *get_iter_gsm(l2str *l2rec);
279 void iops_gsm(l2str *l2rec);
280 void get_giop(l2str *l2rec, l2prodstr *p, float prod[]);
281 int16_t *get_iter_giop(l2str *l2rec);
282 int16_t *get_flags_giop(l2str *l2rec);
283 void iops_giop(l2str *l2rec);
284 void get_carder(l2str *l2rec, l2prodstr *p, float prod[]);
285 int16_t *get_flags_carder(l2str *l2rec);
286 void iops_carder(l2str *l2rec);
287 void chl_carder_empirical(l2str *l2rec, float prod[]);
288 void get_pml(l2str *l2rec, l2prodstr *p, float prod[]);
289 void iops_pml(l2str *l2rec);
290 void get_qaa(l2str *l2rec, l2prodstr *p, float prod[]);
291 unsigned char *get_flags_qaa(l2str *l2rec);
292 void iops_qaa(l2str *l2rec);
293 void get_niwa(l2str *l2rec, l2prodstr *p, float prod[]);
294 void iops_niwa(l2str *l2rec);
295 int16_t *get_flags_niwa(l2str *l2rec);
296 void iops_las(l2str *l2rec);
297 int get_bbp_qaa(l2str *l2rec, int ip, float tab_wave[], float tab_bbp[], int tab_nwave);
298 int get_bbp_las(l2str *l2rec, int ip, float tab_wave[], float tab_bbp[], int tab_nwave);
299 float get_bbp_las_eta(l2str *l2rec, int ip);
300 float get_bbp_las_eta_ksm(l2str *l2rec, int ip);
301 void get_iops(l2str *l2rec, int32_t iop_opt);
302 void set_iop_flag(float wave[], int32_t nwave,
303  float a[], float aph[], float adg[],
304  float bb[], float bbp[], int16_t *flag);
305 float aph_bricaud(float wave, float chl);
306 float aph_ciotti(float wave, float sf);
307 float get_aphstar(float wave, int dwave, int ftype, float proxy);
308 float rrs_above_to_below(float Rrs);
309 void optical_class(l2str *l2rec, l2prodstr *p, float prod[]);
310 float *get_class_ward_owmc(l2str *l2rec);
311 float *get_class_k_owmc(l2str *l2rec);
312 float *get_class_34k_w_owmc(l2str *l2rec);
313 
314  /*
315 void myprod1(l2str *l2rec, float prod[]);
316 void myprod2(l2str *l2rec, float prod[]);
317 void myprod3(l2str *l2rec, float prod[]);
318 void myprod4(l2str *l2rec, float prod[]);
319 void myprod5(l2str *l2rec, float prod[]);
320 void myprod6(l2str *l2rec, float prod[]);
321 void myprod7(l2str *l2rec, float prod[]);
322 void myprod8(l2str *l2rec, float prod[]);
323 void myprod9(l2str *l2rec, float prod[]);
324 void myprod10(l2str *l2rec, float prod[]);
325  */
326 
327 float westernmost(float lon1, float lon2);
328 float easternmost(float lon1, float lon2);
329 
330 /* Filter functions */
331 
332 void fctl_init(fctlstr *fctl);
333 int fctl_set(fctlstr *fctl, int32_t npix, char *fname,
334  int32_t band, int32_t nx, int32_t ny, int32_t minfill, int32_t nbands);
335 void filter(fctlstr *fctl, l1qstr *l1que, l1str *l1rec, int32_t dscan);
336 int rdfilter(char *file, fctlstr *fctl, int32_t nbands);
337 void fdilate(l1qstr *l1que, int32_t nx, int32_t ny, int flag, char kernel[], l1str *l1rec);
338 void fclean(l1qstr *l1que, int32_t nx, int32_t ny, int flag, char kernel[], l1str *l1rec);
339 void fLTmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
340 void fLTRmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
341 void fLTmed(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
342 void fLTRmed(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
343 void fEPSmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
344 void fEPSiqmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
345 void fLTRiqmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec);
346 void fLTrat(l1qstr *l1que, int32_t nx, int32_t ny, l1str *l1rec);
347 
348 /* viirs pixel conversion */
349 void viirs_pxcvt_2uag(int, int *, int *);
350 void viirs_pxcvt_2ag(int, int *);
351 void viirs_pxcvt_agdel(int, int, int *);
352 
353 /* Fortran functions called from C */
354 
355 void sunangs_(int *iyr, int *iday, float *gmt, float *xlon, float *ylat,
356  float *sunz, float *suna);
357 int getglint_(float *, float *, float *, float *, float *, float *);
358 int getglint_iqu_(float *, float *, float *, float *, float *, float *, float *, float *);
359 void get_um_prod_(int32_t* idProd, int32_t* pix, float* val);
360 void clear_um_prod_();
361  /*
362 int atmcor_soa_(
363  int32_t *sensorID,
364  char *sensorNm,
365  int32_t *nwave,
366  float *wave,
367  int32_t *scan,
368  int32_t *pixel,
369  float *solz,
370  float *senz,
371  float *raz,
372  float *lat,
373  float *lon,
374  float *Lt,
375  float *rho_r,
376  float *Fo,
377  float *Tau_r,
378  float *aw,
379  float *bbw,
380  float *aphstar,
381  float *adg_s,
382  float *bbp_s,
383  float *Rs,
384  float *Rw,
385  float *wv,
386  float *t_sen,
387  float *t_sol,
388  float *optTaua,
389  float *optW0,
390  float *optChl,
391  float *optAcdm,
392  float *pcentCDM,
393  float *optBbp,
394  float *optMr,
395  float *optMi,
396  float *optV,
397  int32_t *status);
398  */
399 
400 void get_fdiff(l2str *l2rec, float fdiff[]);
401 
402 void get_cdom_morel(l2str *l2rec, l2prodstr *p, float prod[]);
403 
404 void optical_water_type(l2str *l2rec, l2prodstr *p, void *vptr);
405 
406 void* prodgen(l2prodstr *p, l2str *l2rec);
407 
408 void virtual_constellation(l2str *l2rec, l2prodstr *p, float prod[]);
409 void bioOptBandShift(l2str *l2rec, l2prodstr *p, float prod[]);
410 
411 void get_swim(l2str *l2rec, l2prodstr *p, float prod[]);
412 void iops_swim(l2str *l2rec);
413 
414 int compfloat(float *x, float *y);
415 void elev_init(char* elevFilename, char* elevAuxFilename);
416 float get_elev(float lat, float lon);
417 
418 int read_target_l3(filehandle *file, l1str *l1rec, int32_t nbands, tgstr *tgrec);
419 int ncio_dim_siz(int, char *);
420 int ncio_grab_f_ds(int, char *, float *);
421 int ncio_grab_stdsclf_ds(int, char *, float, float *);
422 
423 float get_mld(char* mldfile, float lon, float lat, int day);
424 void get_pft_hirata(l2str *l2rec, l2prodstr *p, float prod[]);
425 void get_pft_uitz(l2str *l2rec, l2prodstr *p, float prod[]);
426 void get_npp(l2str *l2rec, int32_t, float prod[]);
427 float chl_abi(l2str *l2rec, float nLw[]);
428 
429 void run_raman_cor(l2str *l2rec, int ip);
430 void get_bpar(l2str *l2rec, l2prodstr *p, float prod[]) ;
431 
432 void get_habs_ci(l2str *l2rec, l2prodstr *p, float ci[]);
433 void get_habs_mph(l2str *l2rec, l2prodstr *p, float mph_chl[]);
434 uint8_t* get_flags_habs_mph(l2str *l2rec);
435 uint8_t* get_flags_habs(l2str *l2rec);
436 void get_psd_ksm(l2str *l2rec, l2prodstr *p, float prod[]);
437 
438 int get_cmp( l2str *l2rec, int prodnum, float prod[]);
439 unsigned char *get_cmp_byt( l2str *l2rec, int32_t );
440 
441 float* giop_get_aph_pointer();
442 float* giop_get_adg_pointer();
443 float* giop_get_bbp_pointer();
444 float* giop_get_bbp_s_pointer();
445 float* giop_get_ubbp_s_pointer();
446 float* giop_get_a_unc_pointer();
447 float* giop_get_bb_unc_pointer();
448 void run_giop(l2str *l2rec);
449 int giop_ran(int recnum);
450 
451 float first_deriv(float x[], float y[], int n);
452 
453 void gas_trans_uncertainty(l1str *l1rec);
454 int noise_index_oci(float wave);
455 void noise_model_ocis(l1str *l1rec, float *noise);
456 void noise_model_hmodisa(l1str *l1rec, float *noise);
457 void noise_model_hmodist(l1str *l1rec, float *noise);
458 void lt_agregat_ocis(l1str*l1rec);
459 float *get_uncertainty(l1str *l1rec);
460 void Kd490_unc(l2str *l2rec,int32_t ip);
461 
462 void get_unc_fsat(l2str *l2rec, float uflh[]);
463 float get_aphstar_pderiv(float wave, int dwave, int ftype, float proxy);
464 void get_Cphyt_unc(l2str *l2rec, float cphyt_unc[]);
465 
466 void get_sdp(l2str *l2rec, l2prodstr *p, float prod[]);
467 
468 #ifdef __cplusplus
469 }
470 #endif
471 
472 #endif
float pp_airmass(float theta)
Definition: airmass.c:14
float * giop_get_aph_pointer()
Definition: giop.c:3789
#define L1_MAXPROD
Definition: filehandle.h:20
int8_t * get_qual_sst_triple(l2str *l2rec)
Retrive Qual level for SST3.
Definition: sst.c:166
void get_fsat2(l2str *l2rec, float flh[])
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
Definition: l1stat_chk.c:586
subroutine dust
Definition: 6sm1.f:3800
void calcite(l2str *l2rec, l2prodstr *p, float caco3[])
Definition: calcite.c:541
char ice_mask(float lon, float lat)
Definition: ice_mask.c:993
void get_Cphyt(l2str *l2rec, float cphyt[])
Definition: get_Cphyt.c:19
void get_gsm(l2str *l2rec, l2prodstr *p, float prod[])
Definition: gsm.c:803
int convl21(l2str *l2rec, tgstr *tgrec, int32_t spix, int32_t epix, float *Lt, vcstr *vrec)
Definition: convl21.c:15
void get_taucld(l2str *l2rec, float taucld[])
Definition: get_par.c:292
void fLTRmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:673
void get_dust_index(l2str *l2rec, float dust[])
void elev_init(char *elevFilename, char *elevAuxFilename)
Definition: elev.c:66
int get_rhos(l1str *l1rec, int32_t ip)
Definition: get_rhos.c:23
float get_mld(char *mldfile, float lon, float lat, int day)
Definition: get_mld.cpp:347
void fLTRmed(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:1093
subroutine kernel(is, mu, rm, xpl, psl, bp)
Definition: 6sm1.f:4700
int16_t * get_flags_giop(l2str *l2rec)
Definition: giop.c:3729
void get_rho_mumm(l2str *l2rec, int32_t ip, int32_t iw, float *rhom)
Definition: mumm.c:25
float easternmost(float lon1, float lon2)
void filter(fctlstr *fctl, l1qstr *l1que, l1str *l1rec, int32_t dscan)
Definition: filter.c:1398
void get_rhown_nir(char *fqfile, float Rrs[], float wave[], int32_t nir_s, int32_t nir_l, float aw[], float bbw[], float chl, float rhown[], float dRrs[], float dchl, float drhown[])
int32_t day
int get_height(l1str *l1rec, int32_t ip, int terrain_corrected)
Definition: get_height.c:20
void lowercase(char *s)
int msl12_input(int argc, char *argv[], const char *progName, filehandle *l1file)
Definition: msl12_input.c:4359
void iops_niwa(l2str *l2rec)
Definition: get_niwa_iop.c:109
void get_fqy2(l2str *l2rec, float fqy[])
int atmocor2(l2str *l2rec, aestr *aerec, int32_t ip)
Definition: atmocor2.c:11
void fLTRiqmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:1166
void get_Rrs_brightness(l2str *l2rec, float Rrs_brightness[])
Definition: get_avw.c:172
float get_sstref(short reftyp, char *file, l1str *l1rec, int32_t ip)
Definition: sstref.c:1601
void nlw_outband(int32_t evalmask, int32_t sensorID, float wave[], int32_t nwave, float Lw[], float nLw[], float outband_correction[])
Definition: nlw_outband.c:3
int l2gen_init_options(clo_optionList_t *list, const char *prog)
Definition: msl12_input.c:680
void get_evi(l1str *l1rec, float evi[])
Calculate Enhanced Vegetation Index CAT_ix 38.
Definition: get_ndvi.c:91
float get_aphstar(float wave, int dwave, int ftype, float proxy)
Definition: aph.c:372
float aph_ciotti(float wave, float sf)
Definition: aph.c:266
int getl1rec(int32_t recnum, int32_t dscan, l1str *l1rec)
Definition: getl1rec.c:169
int noise_index_oci(float wave)
derive the index of OCI wavelength in MODIS wavelength domain
void get_ndii(l1str *l1rec, float ndii[])
Main entry point for getting ndii.
Definition: get_ndii.c:81
float fresnel_coef(float mu, float n)
Definition: aerosol.c:1041
void get_ipar_below_surface(l2str *l2rec, float ipar[])
Definition: get_par.c:490
int ncio_dim_siz(int, char *)
Definition: ncio.c:18
int closel2(filehandle *l2file)
Definition: l2_generic.c:1440
float get_bbp_las_eta(l2str *l2rec, int ip)
Definition: las_iop.c:627
void glint_rad(int32_t num_iter, int32_t nband, int32_t nir_s, int32_t nir_l, float glint_coef, float air_mass, float mu0, float F0[], float taur[], float taua[], float La[], float TLg[], uncertainty_t *errstr)
Definition: glint.c:40
void close_target(void)
Definition: target_io.c:37
int read_target(filehandle *file, int32_t recnum, tgstr *tgrec)
Definition: target_io.c:105
int open_aer(filehandle *file)
Definition: aer_io.c:73
map< string, float > F0
Definition: DDSensor.cpp:39
void fresnel_sol(float wave[], int32_t nwave, float solz, float ws, float brdf[], int return_tf)
Definition: brdf.c:160
float seawater_get_n(int32_t ip, int32_t ib)
Definition: seawater_get.c:17
void get_tauc(l2str *l2rec, float tauc[])
uint8_t * get_flags_habs(l2str *l2rec)
Definition: get_habs.c:694
float aph_bricaud(float wave, float chl)
Definition: aph.c:181
int32_t alloc_target(int32_t npix, int32_t nbands, tgstr *tgrec)
Definition: alloc_target.c:12
void iops_carder(l2str *l2rec)
Definition: carder.c:1013
void foqint_morel(char *file, float wave[], int32_t nwave, float solz, float senzp, float phi, float chl, float brdf[])
Definition: brdf.c:314
int dem_init()
Definition: read_mask.c:43
void get_photic_depth(l2str *l2rec, l2prodstr *p, float Z[])
Definition: photic_depth.c:303
int getglint_(float *, float *, float *, float *, float *, float *)
Definition: getglint.c:130
read l1rec
void get_smoke(l2str *l2rec, float smoke[])
Definition: get_smoke.c:20
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band
int16_t * get_flags_niwa(l2str *l2rec)
Definition: get_niwa_iop.c:99
int msl12_option_input(int argc, char *argv[], clo_optionList_t *list, char *progName, filehandle *l1file)
void get_angstrom(l2str *l2rec, int band, float angst[])
Definition: aerosol.c:6296
void close_aer(filehandle *file)
void get_clfr(l2str *l2rec, float clfr[])
Definition: get_par.c:315
void viirs_pxcvt_agdel(int, int, int *)
Definition: viirs_pxcvt.c:106
int16_t * get_flags_sst(l2str *l2rec)
Retrive Cloud Mask Flags for SST.
Definition: sst.c:179
void tindx_shi(l2str *l2rec, int32_t ip, float *tindx)
Definition: turbid.c:4
uint8_t * get_flags_habs_mph(l2str *l2rec)
Definition: get_habs.c:370
float * get_class_34k_w_owmc(l2str *l2rec)
Definition: get_owmc.c:214
int ice_mask_init(char *file, int year, int day, float threshold)
Definition: ice_mask.c:900
void get_ipar2(l2str *l2rec, float ipar[])
Definition: get_par.c:480
int setanc(l1str *l1rec)
Definition: setanc.c:628
int open_target(filehandle *file)
Definition: target_io.c:79
int get_hyper_vi(l1str *l1rec, int product_number, float product[])
float * giop_get_adg_pointer()
Definition: giop.c:3775
float ylat[LAC_PIXEL_NUM]
Definition: l1a_seawifs.c:92
float westernmost(float lon1, float lon2)
void get_mu_cosine(l2str *l2rec, float mu[])
Definition: get_par.c:59
void rayleigh(l1str *l1rec, int32_t ip)
Definition: rayleigh.c:169
float * get_bias_mean_sst(l2str *l2rec)
Get the means SSES bias for SST.
Definition: sst.c:259
int8_t * get_qual_sst4(l2str *l2rec)
Retrive Qual level for SST4.
Definition: sst.c:153
void get_fdiff(l2str *l2rec, float fdiff[])
void get_sdp(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_sdp.c:1273
float chl_abi(l2str *l2rec, float nLw[])
Definition: get_chl.c:633
void gaseous_transmittance(l1str *l1rec, int32_t ip)
Definition: gas_trans.c:633
float get_default_chl(l2str *l2rec, float Rrs[])
Definition: get_chl.c:679
void polcor(l1str *l1rec, int32_t ip)
Definition: polcor.c:17
float * get_sst_dust_correction(l2str *l2rec)
Retrive the dust SST correction for MODIS and product SST *.
Definition: sst.c:9
void get_par2(l2str *l2rec, float par[])
Definition: get_par.c:69
float * giop_get_bbp_pointer()
Definition: giop.c:3782
void Kd490_unc(l2str *l2rec, int32_t ip)
Definition: get_Kd.c:1323
void get_ndvi(l1str *l1rec, float ndvi[])
Calculate Normalized Difference Vegetation Index CAT_ix 32.
Definition: get_ndvi.c:46
void msl12_input_init()
Definition: msl12_input.c:495
void cpl1rec(l1str *l1new, l1str *l1old)
Definition: cpl1rec.c:6
int aerosol(l2str *l2rec, int32_t aer_opt_in, aestr *aerec, int32_t ip, float wave[], int32_t nwave, int32_t nir_s_in, int32_t nir_l_in, float F0_in[], float La1_in[], float La2_out[], float t_sol_out[], float t_sen_out[], float *eps, float taua_out[], int32_t *modmin, int32_t *modmax, float *modrat, int32_t *modmin2, int32_t *modmax2, float *modrat2, float *mbac_w)
Definition: aerosol.c:5651
void viirs_pxcvt_2ag(int, int *)
Definition: viirs_pxcvt.c:62
unsigned char * get_flags_qaa(l2str *l2rec)
Definition: get_qaa.c:253
void fLTrat(l1qstr *l1que, int32_t nx, int32_t ny, l1str *l1rec)
int ocbrdf(l2str *l2rec, int32_t ip, int32_t brdf_opt, float wave[], int32_t nwave, float solz, float senz, float phi, float ws, float chl, float nLw[], float Fo[], float brdf[])
Definition: brdf.c:40
int rdfilter(char *file, fctlstr *fctl, int32_t nbands)
Definition: filter.c:300
double eps
Definition: gha2000.c:3
void optical_class(l2str *l2rec, l2prodstr *p, float prod[])
void get_bbws(l2str *l2rec, l2prodstr *p, float prod[])
Definition: seawater.c:254
float * giop_get_bbp_s_pointer()
Definition: giop.c:3804
int l2gen_usage(const char *prog)
Definition: msl12_input.c:4414
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
void free_l2(l2str *l2rec)
Definition: alloc_l2.c:7
instr * input
int land_mask(float lat, float lon)
Definition: read_mask.c:80
void get_um_prod_(int32_t *idProd, int32_t *pix, float *val)
int openl2(filehandle *l2file)
Definition: l2_generic.c:181
int16_t * get_iter_gsm(l2str *l2rec)
Definition: gsm.c:873
void noise_model_ocis(l1str *l1rec, float *noise)
float first_deriv(float x[], float y[], int n)
Definition: aerosol.c:289
int compfloat(float *x, float *y)
Definition: filter.c:730
int32_t prodlist(int32_t sensorID, int32_t evalmask, const char *inprod, const char *defprod, char outprod[L1_MAXPROD][32])
l1qstr l1que
Definition: getl1rec.c:7
float ky_airmass(float theta)
Definition: airmass.c:4
void get_par_below_surface(l2str *l2rec, float par[])
Definition: get_par.c:51
void get_habs_ci(l2str *l2rec, l2prodstr *p, float ci[])
Definition: get_habs.c:85
void get_Cpicophyt(l2str *l2rec, l2prodstr *p, float *cell_abundance)
Definition: get_Cpicophyt.c:38
int b128_msk_init(char *landfile, int msknum)
Definition: b128_msk_get.c:30
int b128_msk_get(float lat, float lon, int msknum)
Definition: b128_msk_get.c:183
int land_mask_init()
Definition: read_mask.c:23
void get_fqy(l2str *l2rec, float fqy[])
Definition: fluorescence.c:258
void get_evi3(l1str *l1rec, float evi3[])
Calculate Enhanced Vegetation Index - EVI3 CAT_ix 64.
Definition: get_ndvi.c:212
int writel2(filehandle *l2file, int32_t recnum, l2str *l2rec, int outfile_number)
Definition: l2_generic.c:939
void update_flag_cnts16(int32_t *flag_cnt, int16_t *flags, int32_t nflags, int32_t npix, uint32_t init_mask)
Definition: l2_generic.c:1502
void get_par(l2str *l2rec, float par[])
Definition: get_par.c:338
void fEPSmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:853
void get_npp(l2str *l2rec, int32_t, float prod[])
float * giop_get_a_unc_pointer()
Definition: giop.c:3814
read recnum
void update_flag_cnts(int32_t *flag_cnt, int32_t *flags, int32_t nflags, int32_t npix, uint32_t init_mask)
Definition: l2_generic.c:1487
float seawater_nsw(float wave, float sst, float sss, float *dnswds)
Definition: seawater.c:8
float seawater_get_a(int32_t ip, int32_t ib)
Definition: seawater_get.c:21
void get_bsi(l2str *l2rec, float BSi[])
void chl_carder_empirical(l2str *l2rec, float prod[])
Definition: carder.c:1168
int acq_sfc_albedo(l1str *l1rec)
void fLTmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:616
float get_sssref(char *file, float lon, float lat, int day)
Definition: sssref.c:360
void get_Kd(l2str *l2rec, l2prodstr *p, float Kd[])
Definition: get_Kd.c:1246
int16_t * get_flags_sst_triple(l2str *l2rec)
Retrive Cloud Mask Flags for SST3.
Definition: sst.c:206
float * giop_get_bb_unc_pointer()
Definition: giop.c:3819
int ncio_grab_stdsclf_ds(int, char *, float, float *)
Definition: ncio.c:101
list(APPEND LIBS ${NETCDF_LIBRARIES}) find_package(GSL REQUIRED) include_directories($
Definition: CMakeLists.txt:8
void fdilate(l1qstr *l1que, int32_t nx, int32_t ny, int flag, char kernel[], l1str *l1rec)
Definition: filter.c:361
int land_bath_mask(l1str *l1rec, int32_t ip)
Definition: read_mask.c:125
int get_cmp(l2str *l2rec, int prodnum, float prod[])
Definition: get_cmp.c:41
int read_target_l3(filehandle *file, l1str *l1rec, int32_t nbands, tgstr *tgrec)
Definition: target_io.c:209
void gothic_R(float wave[], int32_t nwave, float solz, float senz, float ws, float R[])
Definition: brdf.c:266
void update_qual_cnts(int32_t *flag_cnt, int8_t *flags, int32_t nflags, int32_t npix)
Definition: l2_generic.c:1517
float get_elev(float lat, float lon)
Definition: elev.c:108
void cdom_mannino(l2str *l2rec, int prodnum, float prod[])
Definition: cdom_mannino.c:7
void iops_gsm(l2str *l2rec)
Definition: gsm.c:883
int bath_mask_init(char *file)
Definition: read_mask.c:102
void get_pml(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_pml.c:268
int16_t * get_iter_giop(l2str *l2rec)
Definition: giop.c:3717
int fctl_set(fctlstr *fctl, int32_t npix, char *fname, int32_t band, int32_t nx, int32_t ny, int32_t minfill, int32_t nbands)
Definition: filter.c:92
void get_qaa(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_qaa.c:260
void gas_trans_uncertainty(l1str *l1rec)
Definition: gas_trans.c:742
void get_tsm(l2str *l2rec, int prodnum, float prod[])
void get_Cphyt_unc(l2str *l2rec, float cphyt_unc[])
Definition: get_Cphyt.c:86
void get_ndwi(l1str *l1rec, float ndwi[])
Main entry point for getting NDWI.
Definition: get_ndwi.c:79
void get_par_scalar(l2str *l2rec, float par[])
Definition: get_par.c:40
void iops_qaa(l2str *l2rec)
Definition: get_qaa.c:321
float * get_bias_sst_triple(l2str *l2rec)
Retrive the bias SSES for SST3 (VIIRS)
Definition: sst.c:48
void get_rhown_mumm(l2str *l2rec, int32_t ip, int32_t nir_s, int32_t nir_l, float rhown[])
Definition: mumm.c:74
void get_es(l2str *l2rec, int band, float es[])
Definition: get_es.c:24
int16_t * get_counts_sst4(l2str *l2rec)
Retrive Counts SSES for SST4.
Definition: sst.c:87
void clear_um_prod_()
float * get_sst(l2str *l2rec)
Get the sst for SST.
Definition: sst.c:219
float aw_spectra(int32_t wl, int32_t width)
int bath_mask(float lat, float lon)
Definition: read_mask.c:108
void get_giop(l2str *l2rec, l2prodstr *p, float prod[])
Definition: giop.c:3454
void noise_model_hmodist(l1str *l1rec, float *noise)
float * get_sst4(l2str *l2rec)
Get the sst for SST4.
Definition: sst.c:233
float bbw_spectra(int32_t wl, int32_t width)
const double delta
float seawater_get_bb(int32_t ip, int32_t ib)
Definition: seawater_get.c:25
float * get_sst_triple(l2str *l2rec)
Get the sst for SST3.
Definition: sst.c:246
void optical_water_type(l2str *l2rec, l2prodstr *p, void *vptr)
Definition: owt.c:325
void get_toa_refl(l2str *l2rec, int band, float rhot[])
Definition: get_toa_refl.c:19
void iops_swim(l2str *l2rec)
Definition: swim.c:799
int32_t l3file(int32_t sdfid, int32_t c_sdfid, int32_t *nbins, int32_t *c_nbins, char *ptype)
Definition: l3stat_chk.c:347
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
float * get_stdv_sst4(l2str *l2rec)
Retrive the STD bias SSES for SST4.
Definition: sst.c:113
void get_aw_bbw(l2str *l2rec, float wave[], int nwave, float *aw, float *bbw)
void get_ndsi(l1str *l1rec, float ndsi[])
Definition: get_ndsi.c:73
void get_poc(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_poc.c:225
int write_qual_flag_pcnts(idDS ds_id, FILE *fpmeta, int32_t *flag_cnt, int32_t nflags, const char *const flag_lname[])
Definition: l2_generic.c:1556
int acq_cth_albedo(l1str *l1rec)
void init_l2prod()
void whitecaps(int32_t sensorID, int32_t evalmask, int32_t nwave, float ws, float ws_max, float rhof[])
Definition: whitecaps.c:51
float * get_bias_sst(l2str *l2rec)
Retrive the bias SSES for SST (both VIIRS and MODIS)
Definition: sst.c:22
void get_unc_fsat(l2str *l2rec, float uflh[])
Definition: fluorescence.c:62
void get_evi2(l1str *l1rec, float evi2[])
Calculate Enhanced Vegetation Index - EVI2 CAT_ix 63.
Definition: get_ndvi.c:164
void get_pft_uitz(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_pft_uitz.c:387
void cdom_morel(l2str *l2rec, l2prodstr *p, float prod[])
float * get_class_k_owmc(l2str *l2rec)
Definition: get_owmc.c:209
void write_product_XML_file(char *filename)
Utility functions for allocating and freeing two-dimensional arrays of various types.
void get_pft_hirata(l2str *l2rec, l2prodstr *p, float prod[])
void get_rhown_eval(char *fqfile, float Rrs[], float wave[], int32_t nir_s, int32_t nir_l, int32_t nwave, float aw[], float bbw[], float chl, float solz, float senz, float phi, float rhown[], l2str *l2rec, int32_t ip)
int init_cld_dat(l1str *l1rec)
void sunangs_(int *iyr, int *iday, float *gmt, float *xlon, float *ylat, float *sunz, float *suna)
Definition: sunangs.c:25
int32_t l2_seawifs(filehandle *l1file, filehandle *l2file)
void lt_agregat_ocis(l1str *l1rec)
Definition: getl1rec.c:115
float fresnel_sen(float senz, int return_tf)
Definition: brdf.c:127
float xlon[LAC_PIXEL_NUM]
Definition: l1a_seawifs.c:93
int read_albedo(int32_t d_np, int32_t d_nl, int32_t st_lin, int32_t ix_clim, int ncid, int *d_id, unsigned char ***alb_dat)
float * get_bias_mean_sst_triple(l2str *l2rec)
Get the means SSES bias for SST3.
Definition: sst.c:285
ftype
Definition: mapgen.py:234
void atmocor1(l1str *l1rec, int32_t ip)
Definition: atmocor1.c:38
float * get_uncertainty(l1str *l1rec)
void get_ssn(l2str *l2rec, float ssn[])
int write_flag_pcnts(idDS ds_id, FILE *fpmeta, int32_t *flag_cnt, int32_t nflags, const char *const flag_lname[], int32_t numScans, int32_t numPixels)
Definition: l2_generic.c:1532
int giop_ran(int recnum)
Definition: giop.c:643
void set_iop_flag(float wave[], int32_t nwave, float a[], float aph[], float adg[], float bb[], float bbp[], int16_t *flag)
void get_ipar(l2str *l2rec, float ipar[])
Definition: ipar.c:18
void get_fsat(l2str *l2rec, float flh[])
Definition: fluorescence.c:168
void run_raman_cor(l2str *l2rec, int ip)
Definition: raman.c:817
int32_t nband
int ncio_grab_f_ds(int, char *, float *)
Definition: ncio.c:57
int getglint_iqu_(float *, float *, float *, float *, float *, float *, float *, float *)
Definition: getglint.c:135
void fEPSiqmean(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:1249
int read_aer(filehandle *file, int32_t recnum, aestr *aerec)
Definition: aer_io.c:99
void bioOptBandShift(l2str *l2rec, l2prodstr *p, float prod[])
float get_aphstar_pderiv(float wave, int dwave, int ftype, float proxy)
Definition: aph.c:408
flags
Definition: DDAlgorithm.h:22
float * giop_get_ubbp_s_pointer()
Definition: giop.c:3809
int get_bbp_qaa(l2str *l2rec, int ip, float tab_wave[], float tab_bbp[], int tab_nwave)
Definition: get_qaa.c:353
unsigned char * get_cmp_byt(l2str *l2rec, int32_t)
int32_t alloc_aer(int32_t npix, int32_t nbands, aestr *aerec)
Definition: alloc_aer.c:12
float * get_bias_mean_sst4(l2str *l2rec)
Get the means SSES bias for SST4.
Definition: sst.c:272
int32_t nbands
int8_t * get_qual_sst(l2str *l2rec)
Retrive Qual level (0-5) for SST.
Definition: sst.c:139
int32_t alloc_l2(l1str *l1rec, l2str *l2rec)
Definition: alloc_l2.c:17
int msl12_input_defaults(filehandle *l1file)
Definition: msl12_input.c:4385
void fctl_init(fctlstr *fctl)
Definition: filter.c:19
void vcal(l2str *l2rec, l2prodstr *p, float vcal[])
Definition: vcal.c:25
void iops_pml(l2str *l2rec)
Definition: get_pml.c:313
float * get_stdv_sst(l2str *l2rec)
Retrive the STD bias SSES for SST.
Definition: sst.c:61
void get_ms_epsilon(l2str *l2rec, float eps[])
Definition: aerosol.c:6344
void init_l2(l2str *l2rec, int32_t nbands)
Definition: init_l2.c:11
void * prodgen(l2prodstr *p, l2str *l2rec)
Definition: prodgen.c:101
void free_l1q(void)
Definition: getl1rec.c:13
int16_t * get_counts_sst(l2str *l2rec)
Retrive Counts SSES for SST.
Definition: sst.c:74
void get_habs_mph(l2str *l2rec, l2prodstr *p, float mph_chl[])
Definition: get_habs.c:275
void free_deminfo()
float rrs_above_to_below(float Rrs)
Definition: giop.c:1969
int get_bbp_las(l2str *l2rec, int ip, float tab_wave[], float tab_bbp[], int tab_nwave)
Definition: las_iop.c:605
void get_iops(l2str *l2rec, int32_t iop_opt)
Definition: convl12.c:118
float get_bbp_las_eta_ksm(l2str *l2rec, int ip)
Definition: las_iop_ksm.c:745
Definition: dfutils.h:28
void iops_giop(l2str *l2rec)
Definition: giop.c:3741
void get_ipar_scalar(l2str *l2rec, float ipar[])
Definition: get_par.c:501
void fclean(l1qstr *l1que, int32_t nx, int32_t ny, int flag, char kernel[], l1str *l1rec)
Definition: filter.c:536
data_t s[NROOTS]
Definition: decode_rs.h:75
int32 epix
Definition: l1_czcs_hdf.c:23
void get_carder(l2str *l2rec, l2prodstr *p, float prod[])
Definition: carder.c:957
int16_t * get_counts_sst_triple(l2str *l2rec)
Retrive Counts SSES for SST3.
Definition: sst.c:100
void get_mgiop(l2str *l2rec, l2prodstr *p, float prod[])
Definition: mgiop.c:10
void iops_las(l2str *l2rec)
Definition: las_iop.c:581
void run_giop(l2str *l2rec)
Definition: giop.c:2230
void get_psd_ksm(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_psd_ksm.c:432
int32_t get_modis_calfile(int32_t sd_id, char *file)
float water_vapor(int ib, float wv, float airmass)
Definition: water_vapor.c:4
void get_cdom_morel(l2str *l2rec, l2prodstr *p, float prod[])
Definition: cdom_morel.c:319
float ice_fraction(float lon, float lat)
Definition: ice_mask.c:1018
#define R
Definition: make_L3_v1.1.c:96
int atmocor1_land(l1str *l1rec, int32_t ip)
Definition: atmocor1_land.c:20
float bin_climatology(char *l3file, int32_t day, float lon, float lat, char *prodname)
l2prodstr * get_l2prod_index(const char *name, int32_t sensorID, int32_t numBands, int32_t numPixels, int32_t numScans, int32_t *wave)
void get_swim(l2str *l2rec, l2prodstr *p, float prod[])
Definition: swim.c:741
float get_dem(float lat, float lon)
Definition: read_mask.c:112
void get_lambda_max(l2str *l2rec, float lambda_max[])
Definition: get_avw.c:228
float * get_stdv_sst_triple(l2str *l2rec)
Retrive the STD bias SSES for SST3.
Definition: sst.c:126
void get_chl(l2str *l2rec, int prodnum, float prod[])
Definition: get_chl.c:749
int loadl1(filehandle *l1file, l1str *l1rec)
Definition: loadl1.c:36
float * get_bias_sst4(l2str *l2rec)
Retrive the bias SSES for SST4 (MODIS)
Definition: sst.c:35
void virtual_constellation(l2str *l2rec, l2prodstr *p, float prod[])
float conv_rrs_to_555(float Rrs, float wave, float dRrs_in, float *dRrs_out)
Definition: convert_band.c:17
void noise_model_hmodisa(l1str *l1rec, float *noise)
int16_t * get_flags_sst4(l2str *l2rec)
Retrive Cloud Mask Flags for SST4.
Definition: sst.c:193
void get_avw(l2str *l2rec, float avw[])
Definition: get_avw.c:80
void fLTmed(l1qstr *l1que, int32_t nx, int32_t ny, int ib, int32_t minfill, char kernel[], l1str *l1rec)
Definition: filter.c:1022
int32 l2file(int32 sdfid, int32 *nsamp, int32 *nscans, char *dtype)
Definition: l2stat_chk.c:313
void qint_morel(float wave[], int32_t nwave, float solz, float chl, float Qn[])
Definition: brdf.c:672
void get_depth_classification(l2str *l2rec, float depth[])
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
int32_t sensorID[MAXNFILES]
Definition: l2bin.cpp:91
HISTORY txt for MOD_PR01(step one of PGE01) History follows the following convention needed due to new Aqua ReprocessingActual and the expected LUT revision number from PCF Changed to use PGE version for ProductionHistory Added Archive including ProcessingEnvironment Corrected handling of bad to resovle GSFcd02514 Changed to check staged LUT revision number versus the expected LUT revision number from thereby resolving defect report MODxl02056 This change also avoids the memory access violation reported in MODur00039 Changed the way output arrays were initialized with fill to be more but placed into the L1A output product and thought of as valid packets These packets had an invalid frame count in them and since only the last valid packet of any specific type gets it frame count data written to the output product
Definition: HISTORY.txt:176
void get_las(l2str *l2rec, l2prodstr *p, float prod[])
Definition: las_iop.c:492
int32_t iyr
Definition: atrem_corl1.h:161
void get_niwa(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_niwa_iop.c:67
int16_t * get_flags_carder(l2str *l2rec)
Definition: carder.c:948
int convl12(l1str *l1rec, l2str *l2rec, int32_t spix, int32_t epix, aestr *aerec)
Definition: convl12.c:16
float seawater_bb(float wave, float sst, float sss, double delta)
Definition: seawater.c:176
void viirs_pxcvt_2uag(int, int *, int *)
Definition: viirs_pxcvt.c:11
int npix
Definition: get_cmp.c:28
float p[MODELMAX]
Definition: atrem_corl1.h:131
float * get_class_ward_owmc(l2str *l2rec)
Definition: get_owmc.c:204
void get_ice_frac(l2str *l2rec, float ice[])
Definition: get_ice_frac.c:17
int32_t l1b_seawifs(filehandle *l1file, filehandle *ofile, int32_t sscan, int32_t escan, int32_t dscan, int32_t spixl, int32_t epixl, int32_t dpixl)
void get_bpar(l2str *l2rec, l2prodstr *p, float prod[])
Definition: get_bpar.c:482
void setflagbits_l2(l2str *l2rec, int32_t ipix)
Definition: setflags_l2.c:14
void get_cci(l1str *l1rec, float cci[])
Definition: get_cci.c:73
float poc_stramski_hybrid(float *Rrs, int32_t sensorID)
void tindx_morel(l2str *l2rec, int32_t ip, float *tindx)
Definition: turbid.c:65
void seawater_set(l1str *l1rec)
Definition: seawater_get.c:8