OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <DtAlgorithm.h>

Inheritance diagram for DtAlgorithm:
[legend]
Collaboration diagram for DtAlgorithm:
[legend]

Public Types

enum  SIZES { ISMALL, IBIG }
 
enum  STATS { IBEST, IAVG }
 

Public Member Functions

 DtAlgorithm ()
 
virtual ~DtAlgorithm ()
 
virtual int initialize (map< string, ddata * > imap)
 
virtual vector< stringget_products ()
 
virtual map< string, ddata * > process (vector< size_t > start, vector< size_t > count, map< string, ddata * > imap)
 
int compute_gas_correction ()
 
int fit_line (float x[], float y[], float sig[], int ndata, float &A, float &B)
 
- Public Member Functions inherited from DDAlgorithm
 DDAlgorithm ()
 
virtual ~DDAlgorithm ()
 

Public Attributes

dtGasCorrectionLUT gc_lut_
 
unsigned char cmask_
 
float rfld_ [NUM_RFL_BANDS]
 
float cloud_fraction_
 
float scatter_angle_
 
float glint_angle_
 
float glint_refl_
 
float ndvi_
 

Static Public Attributes

static constexpr int LINE = 1
 
static constexpr int GRIDX = LINE
 
static constexpr int GRIDY = LINE
 
static constexpr int NUM_CASES_SMALL = 4
 
static constexpr int NUM_CASES_BIG = 5
 
static constexpr int NUM_LUTS = 4
 
static constexpr int NUM_LATS = 180
 
static constexpr int NUM_LONS = 360
 
static constexpr float MINMTHET0 =0.0
 
static constexpr float MAXMTHET0 =80.0
 
static constexpr float MINMTHET =0.0
 
static constexpr float MAXMTHET =72.0
 
static constexpr float MINMPHI =0.0
 
static constexpr float MAXMPHI =180.0
 
static constexpr float MAXTAU =5.0
 
static constexpr float MINTAU =-0.01
 
static constexpr int NUM_RFL_BANDS = 10
 
static constexpr int DT_OWAVES = 7
 
static constexpr int DT_LWAVES = 3
 
static constexpr int MODIS_WAVES = 7
 
static constexpr int VIIRS_WAVES = 3
 
static const float wind_ [WIND_LUT_ENTRIES]
 
static const float pressure_ [P_LEVELS]
 

Protected Member Functions

int interp_extrap (int num, float xin, float x[], float y[], float &yout)
 
int mean_std (int n, float *data, float &mean, float &sdev)
 
int mean_std_weighted (int n, float *data, float &mean, float &sdev, float *weight)
 
int sort_index (int numPts, float array[], int index[])
 
int sort_inplace (int numPts, float array1[], float array2[])
 
int set_byte (short val, short bitPos, short &target)
 
int compute_glint_angle ()
 
int compute_scatter_angle (float &scat_angle)
 
- Protected Member Functions inherited from DDAlgorithm
int get_inputs (vector< size_t > start, vector< size_t > count, map< string, ddata * > imap)
 
map< string, ddata * > set_outputs ()
 
map< string, ddata * > set_fills ()
 

Protected Attributes

int SZA_0_
 
int SZA_1_
 
int THE_0_
 
int THE_1_
 
int PHI_0_
 
int PHI_1_
 
- Protected Attributes inherited from DDAlgorithm
size_t lines_
 
size_t pixels_
 
float rfl_ [NTWL]
 
float rfla_ [NTWL][3][3]
 
float gasc_ [NTWL]
 
float lat_
 
float lon_
 
float solz_
 
float senz_
 
float raa_
 
float height_
 
float scatt_
 
float ws_
 
float pwv_
 
float oz_
 
float ps_
 
int month_
 
bool bgascorrect_
 
bool bglintmask_
 
bool bcloudmask_
 
bool btest_
 
unsigned char cloud_mask_
 
short qual_flag_
 
short aerosol_type_
 
short error_flag_
 
unsigned int l2_flags_
 
float scatter_ang_
 
float glint_ang_
 
float sse_
 
float fmf_
 
float aot_550_
 
float ae1_
 
float ae2_
 
float ndv_
 
float chlor_
 
float ssa_ [NLWL+1]
 
float sr_ [NLWL+1]
 
float aot_ [NOWL+1]
 

Friends

class DtCloudMaskLand
 
class DtCloudMaskOcean
 
class DtSedimentMask
 

Detailed Description

Definition at line 48 of file DtAlgorithm.h.

Member Enumeration Documentation

◆ SIZES

enum SIZES
Enumerator
ISMALL 
IBIG 

Definition at line 84 of file DtAlgorithm.h.

◆ STATS

enum STATS
Enumerator
IBEST 
IAVG 

Definition at line 89 of file DtAlgorithm.h.

Constructor & Destructor Documentation

◆ DtAlgorithm()

Class constructor

Definition at line 41 of file DtAlgorithm.cpp.

◆ ~DtAlgorithm()

~DtAlgorithm ( )
virtual

Class destructor

Definition at line 64 of file DtAlgorithm.cpp.

Member Function Documentation

◆ compute_gas_correction()

int compute_gas_correction ( )

Compute gas correction

Definition at line 117 of file DtAlgorithm.cpp.

◆ compute_glint_angle()

int compute_glint_angle ( )
protected

Compute glint angle

Definition at line 453 of file DtAlgorithm.cpp.

◆ compute_scatter_angle()

int compute_scatter_angle ( float &  scat_angle)
protected

Compute scatter angle based on geometry for aerosol dark target algorithm

Definition at line 499 of file DtAlgorithm.cpp.

◆ fit_line()

int fit_line ( float  x[],
float  y[],
float  sig[],
int  ndata,
float &  A,
float &  B 
)

Linear fit data in x and y arrays to produce straight line coefficients Y = A + BX.

Definition at line 379 of file DtAlgorithm.cpp.

◆ get_products()

virtual vector<string> get_products ( )
inlinevirtual

Return a list of product names generated by the algorithm

Reimplemented from DDAlgorithm.

Reimplemented in DtAlgLand, and DtAlgOcean.

Definition at line 117 of file DtAlgorithm.h.

◆ initialize()

int initialize ( map< string, ddata * >  imap)
virtual

Initialize Input data

Reimplemented from DDAlgorithm.

Reimplemented in DtAlgLand, and DtAlgOcean.

Definition at line 76 of file DtAlgorithm.cpp.

◆ interp_extrap()

int interp_extrap ( int  num,
float  xin,
float  x[],
float  y[],
float &  yout 
)
protected

Subroutine performs linear interpolation/extrapolation.

Definition at line 284 of file DtAlgorithm.cpp.

◆ mean_std()

int mean_std ( int  n,
float *  data,
float &  mean,
float &  sdev 
)
protected

Subroutine returns the values of mean and standard deviation.

Definition at line 212 of file DtAlgorithm.cpp.

◆ mean_std_weighted()

int mean_std_weighted ( int  n,
float *  data,
float &  mean,
float &  sdev,
float *  weight 
)
protected

Subroutine returns the values of weighted mean and standard deviation subject to selection of data by a mask

Definition at line 246 of file DtAlgorithm.cpp.

◆ process()

map< string, ddata * > process ( vector< size_t >  start,
vector< size_t >  count,
map< string, ddata * >  imap 
)
virtual

Compute aerosol dark target algorithm

Reimplemented from DDAlgorithm.

Reimplemented in DtAlgLand, and DtAlgOcean.

Definition at line 103 of file DtAlgorithm.cpp.

◆ set_byte()

int set_byte ( short  val,
short  bitPos,
short &  target 
)
protected

Set bits in a quality control flag.

Definition at line 435 of file DtAlgorithm.cpp.

◆ sort_index()

int sort_index ( int  numPts,
float  array[],
int  index[] 
)
protected

This subroutine finds the sorted index of array

Definition at line 323 of file DtAlgorithm.cpp.

◆ sort_inplace()

int sort_inplace ( int  numPts,
float  array1[],
float  array2[] 
)
protected

Another sorting subroutine that sorts 2 arrays based on order of data in array 1.

Definition at line 350 of file DtAlgorithm.cpp.

Friends And Related Function Documentation

◆ DtCloudMaskLand

friend class DtCloudMaskLand
friend

Definition at line 50 of file DtAlgorithm.h.

◆ DtCloudMaskOcean

friend class DtCloudMaskOcean
friend

Definition at line 51 of file DtAlgorithm.h.

◆ DtSedimentMask

friend class DtSedimentMask
friend

Definition at line 52 of file DtAlgorithm.h.

Member Data Documentation

◆ cloud_fraction_

float cloud_fraction_

Public variables

Definition at line 140 of file DtAlgorithm.h.

◆ cmask_

unsigned char cmask_

Definition at line 95 of file DtAlgorithm.h.

◆ DT_LWAVES

constexpr int DT_LWAVES = 3
staticconstexpr

Definition at line 78 of file DtAlgorithm.h.

◆ DT_OWAVES

constexpr int DT_OWAVES = 7
staticconstexpr

Definition at line 77 of file DtAlgorithm.h.

◆ gc_lut_

Definition at line 94 of file DtAlgorithm.h.

◆ glint_angle_

float glint_angle_

Definition at line 142 of file DtAlgorithm.h.

◆ glint_refl_

float glint_refl_

Definition at line 143 of file DtAlgorithm.h.

◆ GRIDX

constexpr int GRIDX = LINE
staticconstexpr

Definition at line 57 of file DtAlgorithm.h.

◆ GRIDY

constexpr int GRIDY = LINE
staticconstexpr

Definition at line 58 of file DtAlgorithm.h.

◆ LINE

constexpr int LINE = 1
staticconstexpr

Definition at line 56 of file DtAlgorithm.h.

◆ MAXMPHI

constexpr float MAXMPHI =180.0
staticconstexpr

Definition at line 71 of file DtAlgorithm.h.

◆ MAXMTHET

constexpr float MAXMTHET =72.0
staticconstexpr

Definition at line 69 of file DtAlgorithm.h.

◆ MAXMTHET0

constexpr float MAXMTHET0 =80.0
staticconstexpr

Definition at line 67 of file DtAlgorithm.h.

◆ MAXTAU

constexpr float MAXTAU =5.0
staticconstexpr

Definition at line 73 of file DtAlgorithm.h.

◆ MINMPHI

constexpr float MINMPHI =0.0
staticconstexpr

Definition at line 70 of file DtAlgorithm.h.

◆ MINMTHET

constexpr float MINMTHET =0.0
staticconstexpr

Definition at line 68 of file DtAlgorithm.h.

◆ MINMTHET0

constexpr float MINMTHET0 =0.0
staticconstexpr

Definition at line 66 of file DtAlgorithm.h.

◆ MINTAU

constexpr float MINTAU =-0.01
staticconstexpr

Definition at line 74 of file DtAlgorithm.h.

◆ MODIS_WAVES

constexpr int MODIS_WAVES = 7
staticconstexpr

Definition at line 79 of file DtAlgorithm.h.

◆ ndvi_

float ndvi_

Definition at line 144 of file DtAlgorithm.h.

◆ NUM_CASES_BIG

constexpr int NUM_CASES_BIG = 5
staticconstexpr

Definition at line 60 of file DtAlgorithm.h.

◆ NUM_CASES_SMALL

constexpr int NUM_CASES_SMALL = 4
staticconstexpr

Definition at line 59 of file DtAlgorithm.h.

◆ NUM_LATS

constexpr int NUM_LATS = 180
staticconstexpr

Definition at line 62 of file DtAlgorithm.h.

◆ NUM_LONS

constexpr int NUM_LONS = 360
staticconstexpr

Definition at line 63 of file DtAlgorithm.h.

◆ NUM_LUTS

constexpr int NUM_LUTS = 4
staticconstexpr

Definition at line 61 of file DtAlgorithm.h.

◆ NUM_RFL_BANDS

constexpr int NUM_RFL_BANDS = 10
staticconstexpr

Definition at line 76 of file DtAlgorithm.h.

◆ PHI_0_

int PHI_0_
protected

Definition at line 153 of file DtAlgorithm.h.

◆ PHI_1_

int PHI_1_
protected

Definition at line 154 of file DtAlgorithm.h.

◆ pressure_

const float pressure_
static
Initial value:
= {
1000.0, 975.0, 950.0, 925.0, 900.0, 850.0, 800.0,
750.0, 700.0, 650.0, 600.0, 550.0, 500.0, 450.0, 400.0,
350.0, 300.0, 250.0, 200.0, 150.0, 100.0, 70.0, 50.0,
30.0, 20.0, 10.0 }

Definition at line 82 of file DtAlgorithm.h.

◆ rfld_

float rfld_[NUM_RFL_BANDS]

Definition at line 97 of file DtAlgorithm.h.

◆ scatter_angle_

float scatter_angle_

Definition at line 141 of file DtAlgorithm.h.

◆ SZA_0_

int SZA_0_
protected

Definition at line 149 of file DtAlgorithm.h.

◆ SZA_1_

int SZA_1_
protected

Definition at line 150 of file DtAlgorithm.h.

◆ THE_0_

int THE_0_
protected

Definition at line 151 of file DtAlgorithm.h.

◆ THE_1_

int THE_1_
protected

Definition at line 152 of file DtAlgorithm.h.

◆ VIIRS_WAVES

constexpr int VIIRS_WAVES = 3
staticconstexpr

Definition at line 80 of file DtAlgorithm.h.

◆ wind_

const float wind_
static
Initial value:
= {
2.0, 6.0, 10.0, 14.0 }

Definition at line 81 of file DtAlgorithm.h.


The documentation for this class was generated from the following files: