OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
carder.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "l12_proto.h"
Include dependency graph for carder.c:

Go to the source code of this file.

Macros

#define N_PRM_HEADERS   35 /* leading comment lines in PARAM_FILE */
 
#define NX   32 /* elements minus one in aph675 array. */
 
#define N_ITER   5 /* iterations in bisection loop. 2^(N_ITER) = NX */
 
#define APH_MIN   0.0001 /* minimum aph675 value */
 
#define CARDER_FAIL   -1 /* value of products returned if failure */
 
#define CFLAG_FAIL   0x0001 /* failure (bad inputs) */
 
#define CFLAG_DEFAULT   0x0002 /* using default (empirical) algorithm*/
 
#define CFLAG_BLEND   0x0004 /* blending with default algorithm */
 
#define CFLAG_UNPKG   0x0010 /* unpackaged case */
 
#define CFLAG_PKG   0x0020 /* packaged case */
 
#define CFLAG_HIPKG   0x0040 /* highly packaged case */
 
#define CFLAG_GLOBAL   0x0080 /* global case */
 
#define CFLAG_LO412   0x0100 /* low input 412 reflectance */
 
#define CFLAG_LO555   0x0200 /* low input 55x reflectance */
 
#define CFLAG_CHLINC   0x0400 /* large inconsistency with default */
 
#define NDTNX   2048
 
#define NDTNY   1024
 

Functions

int carder_model (int32_t nbands, double *rrs, double *rrswl, float sst, float ndt, double *atot, double *aph, double *adg, double *bb, double *bbp, double *aphmPtr, double *adgmPtr, double *chlPtr, int16 *flags)
 
void alloc_carder (int32_t npix, int32_t nbands)
 
int carder_ran (int recnum)
 
void carder (l2str *l2rec)
 
int16 * get_flags_carder (l2str *l2rec)
 
void get_carder (l2str *l2rec, l2prodstr *p, float prod[])
 
void iops_carder (l2str *l2rec)
 
int carder_empirical (float *rrs, float sst, float ndt, float *chlPtr)
 
void chl_carder_empirical (l2str *l2rec, float prod[])
 

Macro Definition Documentation

◆ APH_MIN

#define APH_MIN   0.0001 /* minimum aph675 value */

Definition at line 42 of file carder.c.

◆ CARDER_FAIL

#define CARDER_FAIL   -1 /* value of products returned if failure */

Definition at line 43 of file carder.c.

◆ CFLAG_BLEND

#define CFLAG_BLEND   0x0004 /* blending with default algorithm */

Definition at line 48 of file carder.c.

◆ CFLAG_CHLINC

#define CFLAG_CHLINC   0x0400 /* large inconsistency with default */

Definition at line 57 of file carder.c.

◆ CFLAG_DEFAULT

#define CFLAG_DEFAULT   0x0002 /* using default (empirical) algorithm*/

Definition at line 47 of file carder.c.

◆ CFLAG_FAIL

#define CFLAG_FAIL   0x0001 /* failure (bad inputs) */

Definition at line 46 of file carder.c.

◆ CFLAG_GLOBAL

#define CFLAG_GLOBAL   0x0080 /* global case */

Definition at line 53 of file carder.c.

◆ CFLAG_HIPKG

#define CFLAG_HIPKG   0x0040 /* highly packaged case */

Definition at line 52 of file carder.c.

◆ CFLAG_LO412

#define CFLAG_LO412   0x0100 /* low input 412 reflectance */

Definition at line 55 of file carder.c.

◆ CFLAG_LO555

#define CFLAG_LO555   0x0200 /* low input 55x reflectance */

Definition at line 56 of file carder.c.

◆ CFLAG_PKG

#define CFLAG_PKG   0x0020 /* packaged case */

Definition at line 51 of file carder.c.

◆ CFLAG_UNPKG

#define CFLAG_UNPKG   0x0010 /* unpackaged case */

Definition at line 50 of file carder.c.

◆ N_ITER

#define N_ITER   5 /* iterations in bisection loop. 2^(N_ITER) = NX */

Definition at line 41 of file carder.c.

◆ N_PRM_HEADERS

#define N_PRM_HEADERS   35 /* leading comment lines in PARAM_FILE */

Definition at line 39 of file carder.c.

◆ NDTNX

#define NDTNX   2048

◆ NDTNY

#define NDTNY   1024

◆ NX

#define NX   32 /* elements minus one in aph675 array. */

Definition at line 40 of file carder.c.

Function Documentation

◆ alloc_carder()

void alloc_carder ( int32_t  npix,
int32_t  nbands 
)

Definition at line 784 of file carder.c.

◆ carder()

void carder ( l2str *  l2rec)

Definition at line 809 of file carder.c.

◆ carder_empirical()

int carder_empirical ( float *  rrs,
float  sst,
float  ndt,
float *  chlPtr 
)

Definition at line 1034 of file carder.c.

◆ carder_model()

int carder_model ( int32_t  nbands,
double *  rrs,
double *  rrswl,
float  sst,
float  ndt,
double *  atot,
double *  aph,
double *  adg,
double *  bb,
double *  bbp,
double *  aphmPtr,
double *  adgmPtr,
double *  chlPtr,
int16 *  flags 
)

Definition at line 100 of file carder.c.

◆ carder_ran()

int carder_ran ( int  recnum)

Definition at line 798 of file carder.c.

◆ chl_carder_empirical()

void chl_carder_empirical ( l2str *  l2rec,
float  prod[] 
)

Definition at line 1168 of file carder.c.

◆ get_carder()

void get_carder ( l2str *  l2rec,
l2prodstr *  p,
float  prod[] 
)

Definition at line 957 of file carder.c.

◆ get_flags_carder()

int16* get_flags_carder ( l2str *  l2rec)

Definition at line 948 of file carder.c.

◆ iops_carder()

void iops_carder ( l2str *  l2rec)

Definition at line 1013 of file carder.c.