OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
pml.c
Go to the documentation of this file.
1 /*
2  * pml.c
3  *
4  * Compute IOPs from rrs using PML IOP algorithm
5  *
6  * Plymouth Marine Laboratory
7  * UK
8  */
9 
10 /*
11  * This code implements the IOP code of Smyth et al. "" Applied Optics
12  */
13 
14 #include <stdlib.h>
15 #include <math.h>
16 #include "pml.h"
17 #include "l12_proto.h"
18 
19 static int iterate = 1;
20 static int idx410 = -1;
21 static int idx440 = -1;
22 static int idx490 = -1;
23 static int idx510 = -1;
24 static int idx555 = -1;
25 static int idx670 = -1;
26 static int initialized = 0;
27 
28 static float *aw;
29 static float *bbw;
30 
31 void pml_assert(int expr) {
32  if (expr) return;
33  else exit(1);
34 }
35 
42 int pml_is_initialized(void) {
43  return initialized;
44 }
45 
60 int pml_init(int iter8, int i410, int i440, int i490, int i510, int i555, int i670, float *awptr, float *bbwptr) {
61  iterate = iter8;
62  idx410 = i410;
63  idx440 = i440;
64  idx490 = i490;
65  idx510 = i510;
66  idx555 = i555;
67  idx670 = i670;
68  aw = awptr;
69  bbw = bbwptr;
70  initialized = 1;
71  return 0;
72 }
73 
int pml_init(int iter8, int i410, int i440, int i490, int i510, int i555, int i670, float *awptr, float *bbwptr)
Definition: pml.c:60
void pml_assert(int expr)
Definition: pml.c:31
int pml_is_initialized(void)
Definition: pml.c:42