OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
atrem_corl1.h File Reference
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <timeutils.h>
#include "l12_proto.h"
Include dependency graph for atrem_corl1.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  param_table
 

Macros

#define NBANDS   1024 /* maximum number of bands */
 
#define NH2OMAX   60
 
#define NH2OMAXM1   (NH2OMAX-1)
 
#define FINSTMAX   100
 
#define MODELMAX   25
 
#define ATREM_O3   1
 
#define ATREM_CO2   2
 
#define ATREM_NO2   4
 
#define ATREM_CO   8
 
#define ATREM_CH4   16
 
#define ATREM_O2   32
 
#define ATREM_N2O   64
 

Typedefs

typedef float t_array[NBANDS]
 

Functions

float get_atrem (float *tg_tot, float *rhot, paramstr *P)
 
int get_atrem_cor (l1str *l1rec, int32_t ip, float *rhot, float *tg_tot, float *tg_sol, float *tg_sen)
 
int init_atrem (int32_t sensorID, paramstr *P, l1str *l2rec, int32_t nbands)
 
int32_t rdatreminfo (int32_t sensorID, int32_t evalmask, const char *pname, void **pval)
 
int get_angle_limits (float **angle_limit, float **senz, float **solz, int *n_senz, int *n_solz)
 
float get_current_angle_limit (float insenz, float insolz, int *i, int *j, float **anglelimit, float senz[], float solz[], int n_senz, int n_solz)
 
int32_t hunt (float *xx, int32_t n, double x, int32_t jlo)
 
int init_tpvmr (int model)
 
int getModelNum (float lat, int32_t day)
 
int findMatch_ (float *list, int *nobs, float *elem)
 
void channelRatio_ ()
 
void ecdf_ (float *xcdf, float *ycdf, int32_t *bin_number, float *xs, int32_t *sample_size)
 
void kdistgasabs_ (float *kcdf, float *abscf, float *waveno, float *wavobs, int32_t *np_hi, int32_t *nlayers, int32_t *nwave)
 
void model_adjust ()
 
void locate_pos_ (float *xx, int32_t *n1, float *x1, int32_t *jj)
 
void get_input_ ()
 
void model_adj_ ()
 
void geometry_ ()
 
void init_speccal_ ()
 
void tran_table_ ()
 

Variables

struct {
   int32_t   h2o
 
   int32_t   co2
 
   int32_t   o3
 
   int32_t   n2o
 
   int32_t   co
 
   int32_t   ch4
 
   int32_t   o2
 
   int32_t   no2
 
getinput1_
 
struct {
   char   filename [FILENAME_MAX]
 
   int32_t   dln
 
input_l2gen_
 
struct {
   float   tg_sol [NBANDS]
 
   float   tg_sen [NBANDS]
 
   float   tg_solo [NBANDS]
 
   float   tg_seno [NBANDS]
 
tran_table_l2gen_
 
struct {
   float   h [MODELMAX]
 
   float   t [MODELMAX]
 
   float   p [MODELMAX]
 
   float   vmr [MODELMAX]
 
   int32_t   nb
 
   int32_t   nl
 
   int32_t   model
 
   int32_t   iaer
 
   float   v
 
   float   taer55
 
   float   vrto3
 
   float   sno2
 
getinput3_
 
struct {
   float   wavobs [NBANDS]
 
   float   fwhm [NBANDS]
 
getinput4_
 
struct {
   int32_t   nobs
 
   int32_t   full_calc
 
   float   hsurf
 
   float   dlt
 
   float   dlt2
 
getinput5_
 
struct {
   float   wndow1
 
   float   wndow2
 
   float   wp94c
 
   float   wndow3
 
   float   wndow4
 
   float   w1p14c
 
getinput6_
 
struct {
   int32_t   nb1
 
   int32_t   nb2
 
   int32_t   nbp94
 
   int32_t   nb3
 
   int32_t   nb4
 
   int32_t   nb1p14
 
getinput7_
 
struct {
   int32_t   imn
 
   int32_t   idy
 
   int32_t   iyr
 
   int32_t   ih
 
   int32_t   im
 
   int32_t   is
 
getinput8_
 
struct {
   float   xpss
 
   float   xppp
 
getinput14_
 
struct {
   float   clmvap
 
   float   q
 
model_adj1_
 
struct {
   float   hp [MODELMAX]
 
   float   tp [MODELMAX]
 
   float   pp [MODELMAX]
 
   float   vmrp [MODELMAX]
 
model_adj2_
 
struct {
   int32_t   k_plane
 
   float   dvap_plane
 
   float   dvap_layer
 
   float   dp_plane
 
   float   dp_layer
 
   float   clmvapp
 
model_adj3_
 
struct {
   int32_t   k_surf
 
model_adj4_
 
struct {
   int32_t   nh2o
 
init_speccal3_
 
struct {
   int32_t   ist1
 
   int32_t   ied1
 
   int32_t   ist2
 
   int32_t   ied2
 
   int32_t   istp94
 
   int32_t   iedp94
 
init_speccal6_
 
struct {
   int32_t   ist3
 
   int32_t   ied3
 
   int32_t   ist4
 
   int32_t   ied4
 
   int32_t   ist1p14
 
   int32_t   ied1p14
 
init_speccal7_
 
struct {
   float   wt1
 
   float   wt2
 
   float   wt3
 
   float   wt4
 
   int32_t   ja
 
init_speccal8_
 
struct {
   float   ncv2
 
   float   ncvhf2
 
   float   ncvtt2
 
   int32_t   istrt2
 
   int32_t   iend2
 
   float   finst2 [FINSTMAX]
 
init_speccal10_
 
struct {
   int32_t   natot
 
   int32_t   nbtot
 
   int32_t   nctot
 
   int32_t   ndtot
 
init_speccal11_
 
struct {
   float   sh2o
 
   float   vaptot [NH2OMAX]
 
   float   r0p94 [NH2OMAX]
 
   float   r1p14 [NH2OMAX]
 
   float   trntbl [NH2OMAX][NBANDS]
 
tran_table1_
 
struct {
   float   g_vap [MODELMAX]
 
   float   g_other [MODELMAX]
 
   float   g_vap_equiv
 
geometry3_
 
struct {
   float   vap_slant_mdl
 
geometry4_
 
struct {
   float   senzn_l2
 
   float   senaz_l2
 
   float   solzn_l2
 
   float   water_vapor
 
   int   ja
 
   int   jb
 
   int   splitpaths
 
   float   f1a
 
   float   f2a
 
   float   f1b
 
   float   f2b
 
geometry_l2gen_
 
struct {
   float   tpvmr [81][7]
 
tpvmr_init1_
 
struct {
   float   cst1
 
   float   cst2
 
   float   cst3
 
   float   cst4
 
   float   cst5
 
   float   cst6
 
   double   rp94
 
   double   r1p14
 
   int32_t   jac
 
   int32_t   jbc
 
debug_atrem
 

Macro Definition Documentation

◆ ATREM_CH4

#define ATREM_CH4   16

Definition at line 26 of file atrem_corl1.h.

◆ ATREM_CO

#define ATREM_CO   8

Definition at line 25 of file atrem_corl1.h.

◆ ATREM_CO2

#define ATREM_CO2   2

Definition at line 23 of file atrem_corl1.h.

◆ ATREM_N2O

#define ATREM_N2O   64

Definition at line 28 of file atrem_corl1.h.

◆ ATREM_NO2

#define ATREM_NO2   4

Definition at line 24 of file atrem_corl1.h.

◆ ATREM_O2

#define ATREM_O2   32

Definition at line 27 of file atrem_corl1.h.

◆ ATREM_O3

#define ATREM_O3   1

Definition at line 22 of file atrem_corl1.h.

◆ FINSTMAX

#define FINSTMAX   100

Definition at line 19 of file atrem_corl1.h.

◆ MODELMAX

#define MODELMAX   25

Definition at line 20 of file atrem_corl1.h.

◆ NBANDS

#define NBANDS   1024 /* maximum number of bands */

Definition at line 16 of file atrem_corl1.h.

◆ NH2OMAX

#define NH2OMAX   60

Definition at line 17 of file atrem_corl1.h.

◆ NH2OMAXM1

#define NH2OMAXM1   (NH2OMAX-1)

Definition at line 18 of file atrem_corl1.h.

Typedef Documentation

◆ t_array

typedef float t_array[NBANDS]

Definition at line 30 of file atrem_corl1.h.

Function Documentation

◆ channelRatio_()

void channelRatio_ ( )

◆ ecdf_()

void ecdf_ ( float *  xcdf,
float *  ycdf,
int32_t *  bin_number,
float *  xs,
int32_t *  sample_size 
)

Definition at line 22 of file numerical.c.

◆ findMatch_()

int findMatch_ ( float *  list,
int *  nobs,
float *  elem 
)

Definition at line 1394 of file get_atrem_corl1.c.

◆ geometry_()

void geometry_ ( )

◆ get_angle_limits()

int get_angle_limits ( float **  angle_limit,
float **  senz,
float **  solz,
int *  n_senz,
int *  n_solz 
)

Definition at line 1174 of file get_atrem_corl1.c.

◆ get_atrem()

float get_atrem ( float *  tg_tot,
float *  rhot,
paramstr *  P 
)

Definition at line 358 of file get_atrem_corl1.c.

◆ get_atrem_cor()

int get_atrem_cor ( l1str *  l1rec,
int32_t  ip,
float *  rhot,
float *  tg_tot,
float *  tg_sol,
float *  tg_sen 
)

Definition at line 147 of file get_atrem_corl1v3.c.

◆ get_current_angle_limit()

float get_current_angle_limit ( float  insenz,
float  insolz,
int *  i,
int *  j,
float **  anglelimit,
float  senz[],
float  solz[],
int  n_senz,
int  n_solz 
)

◆ get_input_()

void get_input_ ( )

◆ getModelNum()

int getModelNum ( float  lat,
int32_t  day 
)

Definition at line 715 of file get_atrem_corl1.c.

◆ hunt()

int32_t hunt ( float *  xx,
int32_t  n,
double  x,
int32_t  jlo 
)

Definition at line 478 of file get_atrem_cor3.c.

◆ init_atrem()

int init_atrem ( int32_t  sensorID,
paramstr *  P,
l1str *  l2rec,
int32_t  nbands 
)

Definition at line 755 of file get_atrem_corl1.c.

◆ init_speccal_()

void init_speccal_ ( )

◆ init_tpvmr()

int init_tpvmr ( int  model)

Definition at line 680 of file get_atrem_corl1.c.

◆ kdistgasabs_()

void kdistgasabs_ ( float *  kcdf,
float *  abscf,
float *  waveno,
float *  wavobs,
int32_t *  np_hi,
int32_t *  nlayers,
int32_t *  nwave 
)

◆ locate_pos_()

void locate_pos_ ( float *  xx,
int32_t *  n1,
float *  x1,
int32_t *  jj 
)

Definition at line 2007 of file get_atrem_corl1v2.c.

◆ model_adj_()

void model_adj_ ( )

◆ model_adjust()

void model_adjust ( )

Definition at line 1842 of file get_atrem_corl1v2.c.

◆ rdatreminfo()

int32_t rdatreminfo ( int32_t  sensorID,
int32_t  evalmask,
const char *  pname,
void **  pval 
)

read in atrem initialization information.

Parameters
sensorIDid of the sensor to lookup
evalmaskset to 32 to get info out of the "eval" directory
pnamename of the parameter to retrieve
pvalpointer to the requested data
Returns
the number of bands, -1 if error

Definition at line 38 of file rdatreminfo.c.

◆ tran_table_()

void tran_table_ ( )

Variable Documentation

◆ ch4

int32_t ch4

Definition at line 118 of file atrem_corl1.h.

◆ clmvap

float clmvap

Definition at line 169 of file atrem_corl1.h.

◆ clmvapp

float clmvapp

Definition at line 178 of file atrem_corl1.h.

◆ co

int32_t co

Definition at line 118 of file atrem_corl1.h.

◆ co2

int32_t co2

Definition at line 118 of file atrem_corl1.h.

◆ cst1

float cst1

Definition at line 237 of file atrem_corl1.h.

◆ cst2

float cst2

Definition at line 237 of file atrem_corl1.h.

◆ cst3

float cst3

Definition at line 237 of file atrem_corl1.h.

◆ cst4

float cst4

Definition at line 237 of file atrem_corl1.h.

◆ cst5

float cst5

Definition at line 237 of file atrem_corl1.h.

◆ cst6

float cst6

Definition at line 237 of file atrem_corl1.h.

◆ debug_atrem

struct { ... } debug_atrem

◆ dln

int32_t dln

Definition at line 123 of file atrem_corl1.h.

◆ dlt

float dlt

Definition at line 149 of file atrem_corl1.h.

◆ dlt2

float dlt2

Definition at line 149 of file atrem_corl1.h.

◆ dp_layer

float dp_layer

Definition at line 178 of file atrem_corl1.h.

◆ dp_plane

float dp_plane

Definition at line 178 of file atrem_corl1.h.

◆ dvap_layer

float dvap_layer

Definition at line 178 of file atrem_corl1.h.

◆ dvap_plane

float dvap_plane

Definition at line 178 of file atrem_corl1.h.

◆ f1a

float f1a

Definition at line 229 of file atrem_corl1.h.

◆ f1b

float f1b

Definition at line 229 of file atrem_corl1.h.

◆ f2a

float f2a

Definition at line 229 of file atrem_corl1.h.

◆ f2b

float f2b

Definition at line 229 of file atrem_corl1.h.

◆ filename

char filename[FILENAME_MAX]

Definition at line 122 of file atrem_corl1.h.

◆ finst2

float finst2[FINSTMAX]

Definition at line 205 of file atrem_corl1.h.

◆ full_calc

int32_t full_calc

Definition at line 148 of file atrem_corl1.h.

◆ fwhm

float fwhm[NBANDS]

Definition at line 144 of file atrem_corl1.h.

◆ g_other

float g_other[MODELMAX]

Definition at line 217 of file atrem_corl1.h.

◆ g_vap

float g_vap[MODELMAX]

Definition at line 217 of file atrem_corl1.h.

◆ g_vap_equiv

float g_vap_equiv

Definition at line 217 of file atrem_corl1.h.

◆ geometry3_

struct { ... } geometry3_

◆ geometry4_

struct { ... } geometry4_

◆ geometry_l2gen_

struct { ... } geometry_l2gen_

◆ getinput14_

struct { ... } getinput14_

◆ getinput1_

struct { ... } getinput1_

◆ getinput3_

struct { ... } getinput3_

◆ getinput4_

struct { ... } getinput4_

◆ getinput5_

struct { ... } getinput5_

◆ getinput6_

struct { ... } getinput6_

◆ getinput7_

struct { ... } getinput7_

◆ getinput8_

struct { ... } getinput8_

◆ h

float h[MODELMAX]

Definition at line 131 of file atrem_corl1.h.

◆ h2o

int32_t h2o

Definition at line 118 of file atrem_corl1.h.

◆ hp

float hp[MODELMAX]

Definition at line 173 of file atrem_corl1.h.

◆ hsurf

float hsurf

Definition at line 149 of file atrem_corl1.h.

◆ iaer

int32_t iaer

Definition at line 132 of file atrem_corl1.h.

◆ idy

int32_t idy

Definition at line 161 of file atrem_corl1.h.

◆ ied1

int32_t ied1

Definition at line 190 of file atrem_corl1.h.

◆ ied1p14

int32_t ied1p14

Definition at line 194 of file atrem_corl1.h.

◆ ied2

int32_t ied2

Definition at line 190 of file atrem_corl1.h.

◆ ied3

int32_t ied3

Definition at line 194 of file atrem_corl1.h.

◆ ied4

int32_t ied4

Definition at line 194 of file atrem_corl1.h.

◆ iedp94

int32_t iedp94

Definition at line 190 of file atrem_corl1.h.

◆ iend2

int32_t iend2

Definition at line 204 of file atrem_corl1.h.

◆ ih

int32_t ih

Definition at line 161 of file atrem_corl1.h.

◆ im

int32_t im

Definition at line 161 of file atrem_corl1.h.

◆ imn

int32_t imn

Definition at line 161 of file atrem_corl1.h.

◆ init_speccal10_

struct { ... } init_speccal10_

◆ init_speccal11_

struct { ... } init_speccal11_

◆ init_speccal3_

struct { ... } init_speccal3_

◆ init_speccal6_

struct { ... } init_speccal6_

◆ init_speccal7_

struct { ... } init_speccal7_

◆ init_speccal8_

struct { ... } init_speccal8_

◆ input_l2gen_

struct { ... } input_l2gen_

◆ is

int32_t is

Definition at line 161 of file atrem_corl1.h.

◆ ist1

int32_t ist1

Definition at line 190 of file atrem_corl1.h.

◆ ist1p14

int32_t ist1p14

Definition at line 194 of file atrem_corl1.h.

◆ ist2

int32_t ist2

Definition at line 190 of file atrem_corl1.h.

◆ ist3

int32_t ist3

Definition at line 194 of file atrem_corl1.h.

◆ ist4

int32_t ist4

Definition at line 194 of file atrem_corl1.h.

◆ istp94

int32_t istp94

Definition at line 190 of file atrem_corl1.h.

◆ istrt2

int32_t istrt2

Definition at line 204 of file atrem_corl1.h.

◆ iyr

int32_t iyr

Definition at line 161 of file atrem_corl1.h.

◆ ja

int ja

Definition at line 199 of file atrem_corl1.h.

◆ jac

int32_t jac

Definition at line 239 of file atrem_corl1.h.

◆ jb

int jb

Definition at line 227 of file atrem_corl1.h.

◆ jbc

int32_t jbc

Definition at line 239 of file atrem_corl1.h.

◆ k_plane

int32_t k_plane

Definition at line 177 of file atrem_corl1.h.

◆ k_surf

int32_t k_surf

Definition at line 182 of file atrem_corl1.h.

◆ model

int32_t model

Definition at line 132 of file atrem_corl1.h.

◆ model_adj1_

struct { ... } model_adj1_

◆ model_adj2_

struct { ... } model_adj2_

◆ model_adj3_

struct { ... } model_adj3_

◆ model_adj4_

struct { ... } model_adj4_

◆ n2o

int32_t n2o

Definition at line 118 of file atrem_corl1.h.

◆ natot

int32_t natot

Definition at line 209 of file atrem_corl1.h.

◆ nb

int32_t nb

Definition at line 132 of file atrem_corl1.h.

◆ nb1

int32_t nb1

Definition at line 157 of file atrem_corl1.h.

◆ nb1p14

int32_t nb1p14

Definition at line 157 of file atrem_corl1.h.

◆ nb2

int32_t nb2

Definition at line 157 of file atrem_corl1.h.

◆ nb3

int32_t nb3

Definition at line 157 of file atrem_corl1.h.

◆ nb4

int32_t nb4

Definition at line 157 of file atrem_corl1.h.

◆ nbp94

int32_t nbp94

Definition at line 157 of file atrem_corl1.h.

◆ nbtot

int32_t nbtot

Definition at line 209 of file atrem_corl1.h.

◆ nctot

int32_t nctot

Definition at line 209 of file atrem_corl1.h.

◆ ncv2

float ncv2

Definition at line 203 of file atrem_corl1.h.

◆ ncvhf2

float ncvhf2

Definition at line 203 of file atrem_corl1.h.

◆ ncvtt2

float ncvtt2

Definition at line 203 of file atrem_corl1.h.

◆ ndtot

int32_t ndtot

Definition at line 209 of file atrem_corl1.h.

◆ nh2o

int32_t nh2o

Definition at line 186 of file atrem_corl1.h.

◆ nl

int32_t nl

Definition at line 132 of file atrem_corl1.h.

◆ no2

int32_t no2

Definition at line 118 of file atrem_corl1.h.

◆ nobs

int32_t nobs

Definition at line 148 of file atrem_corl1.h.

◆ o2

int32_t o2

Definition at line 118 of file atrem_corl1.h.

◆ o3

int32_t o3

Definition at line 118 of file atrem_corl1.h.

◆ p

float p[MODELMAX]

Definition at line 131 of file atrem_corl1.h.

◆ pp

float pp[MODELMAX]

Definition at line 173 of file atrem_corl1.h.

◆ q

float q

Definition at line 169 of file atrem_corl1.h.

◆ r0p94

float r0p94[NH2OMAX]

Definition at line 213 of file atrem_corl1.h.

◆ r1p14

double r1p14

Definition at line 213 of file atrem_corl1.h.

◆ rp94

double rp94

Definition at line 238 of file atrem_corl1.h.

◆ senaz_l2

float senaz_l2

Definition at line 225 of file atrem_corl1.h.

◆ senzn_l2

float senzn_l2

Definition at line 225 of file atrem_corl1.h.

◆ sh2o

float sh2o

Definition at line 213 of file atrem_corl1.h.

◆ sno2

float sno2

Definition at line 133 of file atrem_corl1.h.

◆ solzn_l2

float solzn_l2

Definition at line 225 of file atrem_corl1.h.

◆ splitpaths

int splitpaths

Definition at line 228 of file atrem_corl1.h.

◆ t

float t[MODELMAX]

Definition at line 131 of file atrem_corl1.h.

◆ taer55

float taer55

Definition at line 133 of file atrem_corl1.h.

◆ tg_sen

float tg_sen[NBANDS]

Definition at line 127 of file atrem_corl1.h.

◆ tg_seno

float tg_seno[NBANDS]

Definition at line 127 of file atrem_corl1.h.

◆ tg_sol

float tg_sol[NBANDS]

Definition at line 127 of file atrem_corl1.h.

◆ tg_solo

float tg_solo[NBANDS]

Definition at line 127 of file atrem_corl1.h.

◆ tp

float tp[MODELMAX]

Definition at line 173 of file atrem_corl1.h.

◆ tpvmr

float tpvmr[81][7]

Definition at line 233 of file atrem_corl1.h.

◆ tpvmr_init1_

struct { ... } tpvmr_init1_

◆ tran_table1_

struct { ... } tran_table1_

◆ tran_table_l2gen_

struct { ... } tran_table_l2gen_

◆ trntbl

float trntbl[NH2OMAX][NBANDS]

Definition at line 213 of file atrem_corl1.h.

◆ v

float v

Definition at line 133 of file atrem_corl1.h.

◆ vap_slant_mdl

float vap_slant_mdl

Definition at line 221 of file atrem_corl1.h.

◆ vaptot

float vaptot[NH2OMAX]

Definition at line 213 of file atrem_corl1.h.

◆ vmr

float vmr[MODELMAX]

Definition at line 131 of file atrem_corl1.h.

◆ vmrp

float vmrp[MODELMAX]

Definition at line 173 of file atrem_corl1.h.

◆ vrto3

float vrto3

Definition at line 133 of file atrem_corl1.h.

◆ w1p14c

float w1p14c

Definition at line 153 of file atrem_corl1.h.

◆ water_vapor

float water_vapor

Definition at line 226 of file atrem_corl1.h.

◆ wavobs

float wavobs[NBANDS]

Definition at line 144 of file atrem_corl1.h.

◆ wndow1

float wndow1

Definition at line 153 of file atrem_corl1.h.

◆ wndow2

float wndow2

Definition at line 153 of file atrem_corl1.h.

◆ wndow3

float wndow3

Definition at line 153 of file atrem_corl1.h.

◆ wndow4

float wndow4

Definition at line 153 of file atrem_corl1.h.

◆ wp94c

float wp94c

Definition at line 153 of file atrem_corl1.h.

◆ wt1

float wt1

Definition at line 198 of file atrem_corl1.h.

◆ wt2

float wt2

Definition at line 198 of file atrem_corl1.h.

◆ wt3

float wt3

Definition at line 198 of file atrem_corl1.h.

◆ wt4

float wt4

Definition at line 198 of file atrem_corl1.h.

◆ xppp

float xppp

Definition at line 165 of file atrem_corl1.h.

◆ xpss

float xpss

Definition at line 165 of file atrem_corl1.h.