OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
calfile_utils.h
Go to the documentation of this file.
1 
2 #ifndef CALFILE_UTILS_H
3 #define CALFILE_UTILS_H
4 extern float ***aots;
5 extern float ***nlws;
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 extern int16_t fileID; // updated by file appender function...
12 //arrays to contain the values needed to avg over for inversion
13 
14 
15 #include "l1.h"
16 #include "aer_struc.h"
17 #include "target_struc.h"
18 #include <dfutils.h>
19 
20 typedef enum {
22 } caltype;
23 
24 typedef struct cal_struct {
25  int32_t sensorID;
26  int32_t year;
27  int32_t day;
28  int32_t msec;
29  int16_t iscan;
30  int32_t pixnum;
31  uint8_t detnum;
32  /* move to vars1D
33  float lon;
34  float lat;
35  */
36  uint8_t mside;
37  float *vars1D; //vars1D[nvars1d]
38  float **Lt; // Lt[nband][ndets]
39  float **vLt; // vLt[nband][ndets]
40  float **data; //data[nproducts][ndets]
41 } calstr;
42 
43 idDS calfile_open(char *ofile, int sensorID, int ydim, int xdim, int nprods, int nvars1d, char l2prods[L1_MAXPROD][32],
44  char vars1Dnames[L1_MAXPROD][32], long* numExistingRuns, caltype ctype);
45 int calfile_close(idDS ds_id);
46 int calfile_create(char *ofile, idDS *ds_id, int sensorID, int ydim, int xdim, int nprods, int nvars1d,
47  char l2prods[L1_MAXPROD][32], char vars1Dnames[L1_MAXPROD][32], caltype ctype);
48 int calfile_write(idDS ds_id, calstr *calrec, int recnum, int ydim, int xdim, int nprods, int nbands, int nvars1d,
49  char l2prods[L1_MAXPROD][32], char vars1Dnames[L1_MAXPROD][32], caltype ctype);
50 void inversion_init(long xdim, long iscan, int nbands, long ipix, aestr *aerec, tgstr *tgrec);
51 
52 calstr* alloc_calrec(int xdim, int nbands, int nprods, int nvar1d);
53 void free_calrec(calstr *calrec, int nbands, int nprods);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif
#define L1_MAXPROD
Definition: filehandle.h:20
int calfile_create(char *ofile, idDS *ds_id, int sensorID, int ydim, int xdim, int nprods, int nvars1d, char l2prods[L1_MAXPROD][32], char vars1Dnames[L1_MAXPROD][32], caltype ctype)
caltype
Definition: calfile_utils.h:20
int32_t pixnum
Definition: calfile_utils.h:30
int32_t msec
Definition: calfile_utils.h:28
int32_t sensorID
Definition: calfile_utils.h:25
int16_t fileID
float *** aots
uint8_t mside
Definition: calfile_utils.h:36
void free_calrec(calstr *calrec, int nbands, int nprods)
uint8_t detnum
Definition: calfile_utils.h:31
idDS calfile_open(char *ofile, int sensorID, int ydim, int xdim, int nprods, int nvars1d, char l2prods[L1_MAXPROD][32], char vars1Dnames[L1_MAXPROD][32], long *numExistingRuns, caltype ctype)
Definition: calfile_utils.c:48
@ CROSSCAL
Definition: calfile_utils.h:21
read recnum
float ** data
Definition: calfile_utils.h:40
int calfile_write(idDS ds_id, calstr *calrec, int recnum, int ydim, int xdim, int nprods, int nbands, int nvars1d, char l2prods[L1_MAXPROD][32], char vars1Dnames[L1_MAXPROD][32], caltype ctype)
int32_t year
Definition: calfile_utils.h:26
calstr * alloc_calrec(int xdim, int nbands, int nprods, int nvar1d)
float ** vLt
Definition: calfile_utils.h:39
float *** nlws
@ BINMATCH
Definition: calfile_utils.h:21
@ DET2DET
Definition: calfile_utils.h:21
int32_t nbands
int16_t iscan
Definition: calfile_utils.h:29
int32_t iscan
Definition: dfutils.h:28
void inversion_init(long xdim, long iscan, int nbands, long ipix, aestr *aerec, tgstr *tgrec)
float ** Lt
Definition: calfile_utils.h:38
float * vars1D
Definition: calfile_utils.h:37
int calfile_close(idDS ds_id)
int32_t sensorID[MAXNFILES]
Definition: l2bin.cpp:97
int32_t day
Definition: calfile_utils.h:27