NASA Logo
Ocean Color Science Software

ocssw V2022
giop.c File Reference
#include <stdio.h>
#include <math.h>
#include "l12_proto.h"
#include "giop.h"
#include "amoeba.h"
#include <gsl/gsl_errno.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_multifit_nlin.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_poly.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_permutation.h>
Include dependency graph for giop.c:

Go to the source code of this file.

Classes

struct  fit_data_str
 

Typedefs

typedef double realtype
 

Functions

void freeArray (void **a, int32_t m)
 
void freeDArray (double **a, int32_t m)
 
void giop_int_tab_file (char *file, char *ufile, int nx, float *x, float **y, float **uy)
 
void giop_ctl_start (giopstr *g, float chl)
 
void giop_ctl_init (giopstr *g, int nwave, float wave[], float aw[], float bbw[])
 
int giop_ran (int recnum)
 
void giop_model (giopstr *g, double par[], int nwave, float wave[], float aw[], float bbw[], float foq[], float aph[], float adg[], float bbp[], double rrs[], double **dfdpar, double **parstar)
 
void giop_model_iterate (giopstr *g, double par[], int nwave, float wave[], float aw[], float bbw[], float foq[], float aph[], float adg[], float bbp[], float acdom[], float anap[], float bbph[], float bbnap[], double rrs[], double **dfdpar, double **parstar)
 
double giop_amb (FITSTRUCT *ambdata, double par[])
 
int fit_giop_amb (giopstr *g, double Rrs[], double wts[], double par[], double Rrs_fit[], int16 *itercnt)
 
int giop_lm_fdf (const gsl_vector *parv, void *data, gsl_vector *f, gsl_matrix *J)
 
int giop_lm_f (const gsl_vector *parv, void *data, gsl_vector *f)
 
int giop_lm_df (const gsl_vector *parv, void *data, gsl_matrix *J)
 
float calc_uadg_s (giopstr *g, float Rrs1, float Rrs2, float uRrs1, float uRrs2, float covRrs1Rrs2)
 
float calc_ubbp_s (giopstr *g, float Rrs1, float Rrs2, float uRrs1, float uRrs2, float covRrs1Rrs2)
 
gsl_matrix * calc_pinv (gsl_matrix *A, const realtype rcond)
 
void calc_par_unc (giopstr *g, double par[], double uRrs[], double upar[])
 
int fit_giop_lm (giopstr *g, double Rrs[], double wts[], double par[], double *chi, int16 *itercnt)
 
int fit_giop_svd (giopstr *g, double rrs[], double wts[], double par[])
 
int fit_giop_svd_siop (giopstr *g, double rrs[], double wts[], double par[], double *chi)
 
float32 giop_chl (giopstr *g, int16 iopf, double par[], float *uchl)
 
float rrs_above_to_below (float Rrs)
 
float rrs_above_to_below_unc (float Rrs, float uRrs)
 
float rrs_below_to_above (float rrs_s)
 
float rrs_below_to_above_unc (float rrs_s, float urrs_s)
 
int get_bbp_lh (l2str *l2rec, giopstr *g, int ipb2, float tab_wave[], float tab_bbp[], float tab_ubbp[], int tab_nwave)
 
int get_bbp_chl (l2str *l2rec, giopstr *g, int ipb2, float tab_wave[], float tab_bbp[], float tab_ubbp[], int tab_nwave)
 
void run_giop (l2str *l2rec)
 
void get_giop (l2str *l2rec, l2prodstr *p, float prod[])
 
int16 * get_iter_giop (l2str *l2rec)
 
int16 * get_flags_giop (l2str *l2rec)
 
void iops_giop (l2str *l2rec)
 
float * giop_get_chl_pointer ()
 
float * giop_get_adg_pointer ()
 
float * giop_get_bbp_pointer ()
 
float * giop_get_aph_pointer ()
 
float ** giop_get_fitpar_pointer ()
 
float * giop_get_bbp_s_pointer ()
 
float * giop_get_ubbp_s_pointer ()
 
float * giop_get_a_unc_pointer ()
 
float * giop_get_bb_unc_pointer ()
 

Typedef Documentation

◆ realtype

typedef double realtype

Definition at line 50 of file giop.c.

Function Documentation

◆ calc_par_unc()

void calc_par_unc ( giopstr *  g,
double  par[],
double  uRrs[],
double  upar[] 
)

Definition at line 1399 of file giop.c.

◆ calc_pinv()

gsl_matrix* calc_pinv ( gsl_matrix *  A,
const realtype  rcond 
)

Definition at line 1305 of file giop.c.

◆ calc_uadg_s()

float calc_uadg_s ( giopstr *  g,
float  Rrs1,
float  Rrs2,
float  uRrs1,
float  uRrs2,
float  covRrs1Rrs2 
)

Definition at line 1241 of file giop.c.

◆ calc_ubbp_s()

float calc_ubbp_s ( giopstr *  g,
float  Rrs1,
float  Rrs2,
float  uRrs1,
float  uRrs2,
float  covRrs1Rrs2 
)

Definition at line 1266 of file giop.c.

◆ fit_giop_amb()

int fit_giop_amb ( giopstr *  g,
double  Rrs[],
double  wts[],
double  par[],
double  Rrs_fit[],
int16 *  itercnt 
)

Definition at line 1094 of file giop.c.

◆ fit_giop_lm()

int fit_giop_lm ( giopstr *  g,
double  Rrs[],
double  wts[],
double  par[],
double *  chi,
int16 *  itercnt 
)

Definition at line 1492 of file giop.c.

◆ fit_giop_svd()

int fit_giop_svd ( giopstr *  g,
double  rrs[],
double  wts[],
double  par[] 
)

Definition at line 1576 of file giop.c.

◆ fit_giop_svd_siop()

int fit_giop_svd_siop ( giopstr *  g,
double  rrs[],
double  wts[],
double  par[],
double *  chi 
)

Definition at line 1691 of file giop.c.

◆ freeArray()

void freeArray ( void **  a,
int32_t  m 
)

Definition at line 115 of file giop.c.

◆ freeDArray()

void freeDArray ( double **  a,
int32_t  m 
)

Definition at line 123 of file giop.c.

◆ get_bbp_chl()

int get_bbp_chl ( l2str *  l2rec,
giopstr *  g,
int  ipb2,
float  tab_wave[],
float  tab_bbp[],
float  tab_ubbp[],
int  tab_nwave 
)

Definition at line 2132 of file giop.c.

◆ get_bbp_lh()

int get_bbp_lh ( l2str *  l2rec,
giopstr *  g,
int  ipb2,
float  tab_wave[],
float  tab_bbp[],
float  tab_ubbp[],
int  tab_nwave 
)

Definition at line 2009 of file giop.c.

◆ get_flags_giop()

int16* get_flags_giop ( l2str *  l2rec)

Definition at line 3729 of file giop.c.

◆ get_giop()

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

Definition at line 3454 of file giop.c.

◆ get_iter_giop()

int16* get_iter_giop ( l2str *  l2rec)

Definition at line 3717 of file giop.c.

◆ giop_amb()

double giop_amb ( FITSTRUCT ambdata,
double  par[] 
)

Definition at line 1074 of file giop.c.

◆ giop_chl()

float32 giop_chl ( giopstr *  g,
int16  iopf,
double  par[],
float *  uchl 
)

Definition at line 1938 of file giop.c.

◆ giop_ctl_init()

void giop_ctl_init ( giopstr *  g,
int  nwave,
float  wave[],
float  aw[],
float  bbw[] 
)

Definition at line 266 of file giop.c.

◆ giop_ctl_start()

void giop_ctl_start ( giopstr *  g,
float  chl 
)

Definition at line 211 of file giop.c.

◆ giop_get_a_unc_pointer()

float* giop_get_a_unc_pointer ( )

Definition at line 3814 of file giop.c.

◆ giop_get_adg_pointer()

float* giop_get_adg_pointer ( )

Definition at line 3775 of file giop.c.

◆ giop_get_aph_pointer()

float* giop_get_aph_pointer ( )

Definition at line 3789 of file giop.c.

◆ giop_get_bb_unc_pointer()

float* giop_get_bb_unc_pointer ( )

Definition at line 3819 of file giop.c.

◆ giop_get_bbp_pointer()

float* giop_get_bbp_pointer ( )

Definition at line 3782 of file giop.c.

◆ giop_get_bbp_s_pointer()

float* giop_get_bbp_s_pointer ( )

Definition at line 3804 of file giop.c.

◆ giop_get_chl_pointer()

float* giop_get_chl_pointer ( )

Definition at line 3768 of file giop.c.

◆ giop_get_fitpar_pointer()

float** giop_get_fitpar_pointer ( )

Definition at line 3796 of file giop.c.

◆ giop_get_ubbp_s_pointer()

float* giop_get_ubbp_s_pointer ( )

Definition at line 3809 of file giop.c.

◆ giop_int_tab_file()

void giop_int_tab_file ( char *  file,
char *  ufile,
int  nx,
float *  x,
float **  y,
float **  uy 
)

Definition at line 138 of file giop.c.

◆ giop_lm_df()

int giop_lm_df ( const gsl_vector *  parv,
void *  data,
gsl_matrix *  J 
)

Definition at line 1232 of file giop.c.

◆ giop_lm_f()

int giop_lm_f ( const gsl_vector *  parv,
void *  data,
gsl_vector *  f 
)

Definition at line 1228 of file giop.c.

◆ giop_lm_fdf()

int giop_lm_fdf ( const gsl_vector *  parv,
void *  data,
gsl_vector *  f,
gsl_matrix *  J 
)

Definition at line 1157 of file giop.c.

◆ giop_model()

void giop_model ( giopstr *  g,
double  par[],
int  nwave,
float  wave[],
float  aw[],
float  bbw[],
float  foq[],
float  aph[],
float  adg[],
float  bbp[],
double  rrs[],
double **  dfdpar,
double **  parstar 
)

Definition at line 654 of file giop.c.

◆ giop_model_iterate()

void giop_model_iterate ( giopstr *  g,
double  par[],
int  nwave,
float  wave[],
float  aw[],
float  bbw[],
float  foq[],
float  aph[],
float  adg[],
float  bbp[],
float  acdom[],
float  anap[],
float  bbph[],
float  bbnap[],
double  rrs[],
double **  dfdpar,
double **  parstar 
)

Definition at line 911 of file giop.c.

◆ giop_ran()

int giop_ran ( int  recnum)

Definition at line 643 of file giop.c.

◆ iops_giop()

void iops_giop ( l2str *  l2rec)

Definition at line 3741 of file giop.c.

◆ rrs_above_to_below()

float rrs_above_to_below ( float  Rrs)

Definition at line 1969 of file giop.c.

◆ rrs_above_to_below_unc()

float rrs_above_to_below_unc ( float  Rrs,
float  uRrs 
)

Definition at line 1978 of file giop.c.

◆ rrs_below_to_above()

float rrs_below_to_above ( float  rrs_s)

Definition at line 1989 of file giop.c.

◆ rrs_below_to_above_unc()

float rrs_below_to_above_unc ( float  rrs_s,
float  urrs_s 
)

Definition at line 1998 of file giop.c.

◆ run_giop()

void run_giop ( l2str *  l2rec)

Definition at line 2230 of file giop.c.