OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
swl0_proto.h
Go to the documentation of this file.
1 #ifndef _SWL0_PROTO_H
2 #define _SWL0_PROTO_H
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <libgen.h>
8 #include <math.h>
9 #include <unistd.h>
10 
11 #include "swl0_parms.h"
12 #include "swl0_types.h"
13 #include "swl0_struc.h"
14 #include "swl0_utils.h"
15 #include "swl1_struc.h"
16 #include "swl1_hdf.h"
17 #include "input_s.h"
18 #include "navblk_s.h"
19 #include "navctl_s.h"
20 #include "navqc_s.h"
21 #include "orbit_s.h"
22 #include "tilt_s.h"
23 #include "genutils.h"
24 
25 
26 INT32 getl0indx(char *filename, swl0ctl *l0ctl, swl0indx *indx);
27 INT16 getl0scene(swl0indx *indx, swl0scene *scene);
28 INT32 getnavdata(swl0scene *scene, input_sType navinp[]);
29 INT32 getorbdata(swl0indx *indx, input_sType gps[]);
30 void printindx(swl0indx *indx);
31 void printnav(swl0scene *scene);
32 int getl0scene_nav(FLOAT32 xnodel, INT32 tnode,
33  navblk_sType navblk[], tilt_states_sType *tiltblk, swl0scene *scene);
34 void printscene(int nscenes, swl0scene *scene);
35 INT32 getl1rec(INT16 iframe, swl0scene *scene, swl0ctl *l0ctl,
36  input_sType navinp[], navblk_sType navblk[],
37  tilt_states_sType *tiltblk, swl1rec l1rec[]);
38 void addL1Metrics(INT32 scanNum, swl1rec *l1rec);
39 l1met *getL1Metrics(void);
40 int mkmeta(const char *metafile, const char *l1afile, swl0scene *scene, swl0ctl *l0ctl);
41 INT32 getorbnum(FLOAT64 usec);
42 INT16 valid_instlm(INT16 mnftype, INT16 mnfnum, INT16 scanNum);
43 INT16 getEngQual(FLOAT32 ins_ana[], BYTE eng_qual[]);
44 
45 INT32 locate_temporal_anomalies(swl0indx *indx, char *timefile);
46 timeTab *temporal_anomaly(INT16 mnftype, INT16 year, INT16 day, INT32 msec);
47 
48 
49 extern int conv_soh_(BYTE *soh, FLOAT32 *scana, BYTE *scdis);
50 extern int conv_ins_(BYTE *soh, FLOAT32 *insta, BYTE *instd);
51 extern int acs_block_(void);
52 extern int ins_block_(void);
53 
54 extern int initnav_(input_sType input[],
55  INT32 *nframes,
56  navctl_sType *navctl,
57  navqc_sType *navqc,
58  orbit_sType *orbit,
59  INT32 *status);
60 
61 extern int swfnav_(navqc_sType *navqc,
62  navctl_sType *navctl,
63  input_sType input[],
64  INT32 *nframes,
65  orbit_sType *orbit,
66  INT32 *nlines,
67  navblk_sType navblk[],
68  tilt_states_sType *tiltblk,
69  FLOAT32 *xnodel,
70  INT32 *tnode);
71 
72 extern int geonav_(FLOAT32 pos[3],
73  FLOAT32 rm[3][3],
74  FLOAT32 coef[6],
75  FLOAT32 sunref[3],
76  INT32 *spix,
77  INT32 *ipix,
78  INT32 *npix,
79  FLOAT32 lat[],
80  FLOAT32 lon[],
81  FLOAT32 solz[],
82  FLOAT32 sola[],
83  FLOAT32 senz[],
84  FLOAT32 sena[]);
85 
86 int get_swf_def_meta(char *seadas_vs, char *data_center);
87 
88 
89 int get_swf_def_meta1(char *seadas_vs,
90  char *data_center,
91  char *station_name,
92  float *station_lat,
93  float *station_lon,
94  char *station_code);
95 
96 int gen_soft_id(char *seadas_vs, char *prog_vs, char *soft_id);
97 
98 #endif
double FLOAT64
Definition: elements.h:8
int initnav_(input_sType input[], INT32 *nframes, navctl_sType *navctl, navqc_sType *navqc, orbit_sType *orbit, INT32 *status)
int32_t day
int status
Definition: l1_czcs_hdf.c:32
int conv_soh_(BYTE *soh, FLOAT32 *scana, BYTE *scdis)
int acs_block_(void)
*********************************************HISTORY FILE for MOD_PR02AQUA **Version ****Point of no algorithm change is made in this so the and when the blackbody temperature is above a threshold Since the LWIR FPA temperature oscillates on orbit
Definition: HISTORY.txt:106
INT32 getl0indx(char *filename, swl0ctl *l0ctl, swl0indx *indx)
Definition: getl0indx.c:15
void printscene(int nscenes, swl0scene *scene)
read l1rec
int geonav_(FLOAT32 pos[3], FLOAT32 rm[3][3], FLOAT32 coef[6], FLOAT32 sunref[3], INT32 *spix, INT32 *ipix, INT32 *npix, FLOAT32 lat[], FLOAT32 lon[], FLOAT32 solz[], FLOAT32 sola[], FLOAT32 senz[], FLOAT32 sena[])
int32_t INT32
Definition: elements.h:6
void addL1Metrics(INT32 scanNum, swl1rec *l1rec)
Definition: getmetrics.c:16
l1met * getL1Metrics(void)
Definition: getmetrics.c:60
float32 * pos
Definition: l1_czcs_hdf.c:35
float * lat
int32 * msec
Definition: l1_czcs_hdf.c:31
int swfnav_(navqc_sType *navqc, navctl_sType *navctl, input_sType input[], INT32 *nframes, orbit_sType *orbit, INT32 *nlines, navblk_sType navblk[], tilt_states_sType *tiltblk, FLOAT32 *xnodel, INT32 *tnode)
int getl0scene_nav(FLOAT32 xnodel, INT32 tnode, navblk_sType navblk[], tilt_states_sType *tiltblk, swl0scene *scene)
void printnav(swl0scene *scene)
Definition: printnav.c:10
INT32 getnavdata(swl0scene *scene, input_sType navinp[])
Definition: getnavdata.c:8
INT32 getorbnum(FLOAT64 usec)
Definition: getorbnum.c:44
unsigned char BYTE
Definition: elements.h:4
short int INT16
Definition: elements.h:5
int ins_block_(void)
INT16 valid_instlm(INT16 mnftype, INT16 mnfnum, INT16 scanNum)
Definition: instlm.c:15
INT16 getl0scene(swl0indx *indx, swl0scene *scene)
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
float FLOAT32
Definition: elements.h:7
INT32 getl1rec(INT16 iframe, swl0scene *scene, swl0ctl *l0ctl, input_sType navinp[], navblk_sType navblk[], tilt_states_sType *tiltblk, swl1rec l1rec[])
Definition: getl1rec.c:45
void printindx(swl0indx *indx)
Definition: printindx.c:29
int gen_soft_id(char *seadas_vs, char *prog_vs, char *soft_id)
INT16 getEngQual(FLOAT32 ins_ana[], BYTE eng_qual[])
Definition: instlm.c:33
INT32 getorbdata(swl0indx *indx, input_sType gps[])
Definition: getorbdata.c:9
int16_t * nscenes
Definition: l2bin.cpp:86
int get_swf_def_meta(char *seadas_vs, char *data_center)
float * lon
int get_swf_def_meta1(char *seadas_vs, char *data_center, char *station_name, float *station_lat, float *station_lon, char *station_code)
int conv_ins_(BYTE *soh, FLOAT32 *insta, BYTE *instd)
int mkmeta(const char *metafile, const char *l1afile, swl0scene *scene, swl0ctl *l0ctl)
Definition: mkmeta.c:37
int npix
Definition: get_cmp.c:27
INT32 locate_temporal_anomalies(swl0indx *indx, char *timefile)
timeTab * temporal_anomaly(INT16 mnftype, INT16 year, INT16 day, INT32 msec)