OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
anc_acq.c File Reference
#include "l12_proto.h"
#include "met_cvt.h"
#include "anc_acq.h"
#include <gsl/gsl_errno.h>
#include <gsl/gsl_interp2d.h>
#include <gsl/gsl_spline2d.h>
Include dependency graph for anc_acq.c:

Go to the source code of this file.

Classes

struct  met_sto_str
 

Macros

#define ANC_STAT_1T   1 /* one time used */
 
#define ANC_STAT_2T_END
 
#define ANC_STAT_2T_START
 
#define ANC_STAT_3T   3 /* all 3 files with different times */
 
#define ANC_STAT_CLIM   0 /* a climatology in use */
 
#define NPRM   7
 
#define ANCBAD   -999.
 
#define OZ_KG_M2_TO_DU   1. / 2.1415e-5
 
#define USE_PMSL
 
#define ANC_SRC_TYP_ECMWF   0 /* types of anc file data */
 
#define ANC_SRC_TYP_STD_HDF   1 /* old HDF from NCEP (met) TOMS (oz) */
 
#define ANC_SRC_TYP_OLCI   2 /* OLCI tie point at data points */
 
#define ANC_SRC_TYP_GMAO   3 /* GMAP FP-IT or FP forecast */
 
#define ANC_SRC_TYP_BAD   -1 /* a bad or undefined type */
 

Enumerations

enum  out_nam {
  ZW, MW, PR, WV,
  RH, SFCP, SFCRH, SFCT,
  ICEFR
}
 
enum  out_prof {
  TPROF, RHPROF, HPROF, QPROF,
  O3PROF
}
 
enum  out_aerosol {
  BCEXTTAU, BCSCATAU, DUEXTTAU, DUSCATAU,
  SSEXTTAU, SSSCATAU, SUEXTTAU, SUSCATAU,
  OCEXTTAU, OCSCATAU, TOTEXTTAU, TOTSCATAU
}
 

Functions

int anc_acq_init (instr *input, l1str *l1rec, int32_t *anc_id)
 
int32_t anc_acq_ck (char *file, char *file_olci)
 
int32_t anc_acq_f_stat (char **files, char prioritize_files, int32_t n_anc)
 
int32_t anc_acq_lin_met (l1str *l1rec)
 
int32_t anc_acq_lin_aerosol (l1str *l1rec)
 
int32_t anc_acq_lin_prof (l1str *l1rec)
 
int32_t init_anc_aerosol (l1str *l1rec)
 
int init_anc_add (l1str *l1rec)
 
int32_t anc_acq_lin_oz (l1str *l1rec)
 
int32_t anc_acq_gmao_met_prep (char *file, gen_int_str *met_int)
 
int32_t anc_acq_gmao_prof_prep (char *file, gen_int_str *prof_int, int32_t nlvl_expect)
 
int32_t anc_acq_gmao_oz_prep (char *file, gen_int_str *oz_int)
 
int32_t anc_acq_gmao_aer_prep (char *file, gen_int_str *aer_int)
 
int32_t anc_acq_eval_pt (gen_int_str *met_int, int32_t iprm, int32_t ilvl, float lat, float lon, int32_t t_interp, int32_t *data_ix, float wt_t1, int32_t ntim_int, int32_t nlvl, int32_t nprm, float *final_val, float *unc)
 
int32_t anc_acq_fnd_t_interp (double s_time, double *anc_time, int32_t anc_f_stat, int32_t *t_interp, int32_t *data_ix, float *wt)
 
int32_t anc_acq_read_gmao (char *file, char *group, char *ds_name, float **data, unsigned char **qa, double *time, int32_t *nlon, int32_t *nlat, int32_t *nlvl, double **lon_coord, double **lat_coord)
 
int32_t anc_acq_ecmwf_init (char **files, char **prm_nm, int n_prm, int32_t sto_ix)
 
int anc_acq_lin (int32_t anc_class, l1str *l1rec)
 
int anc_acq_lin_olci (int anc_class, char *file, l1str *l1rec)
 
float anc_miss_fill (int32_t prod_ix)
 
float bilin_interp (float *data, int xbox_st, int nx, int ybox_st, float xfrac, float yfrac)
 
int64_t jd4713bc_get_jd (int32_t year, int32_t month, int32_t day)
 
int jd4713bc_get_date (int64_t jd, int32_t *year, int32_t *month, int32_t *day)
 

Macro Definition Documentation

◆ ANC_SRC_TYP_BAD

#define ANC_SRC_TYP_BAD   -1 /* a bad or undefined type */

Definition at line 29 of file anc_acq.c.

◆ ANC_SRC_TYP_ECMWF

#define ANC_SRC_TYP_ECMWF   0 /* types of anc file data */

Definition at line 25 of file anc_acq.c.

◆ ANC_SRC_TYP_GMAO

#define ANC_SRC_TYP_GMAO   3 /* GMAP FP-IT or FP forecast */

Definition at line 28 of file anc_acq.c.

◆ ANC_SRC_TYP_OLCI

#define ANC_SRC_TYP_OLCI   2 /* OLCI tie point at data points */

Definition at line 27 of file anc_acq.c.

◆ ANC_SRC_TYP_STD_HDF

#define ANC_SRC_TYP_STD_HDF   1 /* old HDF from NCEP (met) TOMS (oz) */

Definition at line 26 of file anc_acq.c.

◆ ANC_STAT_1T

#define ANC_STAT_1T   1 /* one time used */

Definition at line 16 of file anc_acq.c.

◆ ANC_STAT_2T_END

#define ANC_STAT_2T_END
Value:
4 /* 2 different anc times in end of list
= files[0] = [1] != [2] */

Definition at line 17 of file anc_acq.c.

◆ ANC_STAT_2T_START

#define ANC_STAT_2T_START
Value:
2 /*2 different anc times in start of list
= files[0] ! [1] = [2] */

Definition at line 18 of file anc_acq.c.

◆ ANC_STAT_3T

#define ANC_STAT_3T   3 /* all 3 files with different times */

Definition at line 19 of file anc_acq.c.

◆ ANC_STAT_CLIM

#define ANC_STAT_CLIM   0 /* a climatology in use */

Definition at line 20 of file anc_acq.c.

◆ ANCBAD

#define ANCBAD   -999.

Definition at line 22 of file anc_acq.c.

◆ NPRM

#define NPRM   7

Definition at line 21 of file anc_acq.c.

◆ OZ_KG_M2_TO_DU

#define OZ_KG_M2_TO_DU   1. / 2.1415e-5

Definition at line 23 of file anc_acq.c.

◆ USE_PMSL

#define USE_PMSL
Value:
1 /* choice to use surface pressure (0) or use the MSL
(mean sea level) pressure (1) with appropriate
adjustment for land height */

Definition at line 24 of file anc_acq.c.

Enumeration Type Documentation

◆ out_aerosol

Enumerator
BCEXTTAU 
BCSCATAU 
DUEXTTAU 
DUSCATAU 
SSEXTTAU 
SSSCATAU 
SUEXTTAU 
SUSCATAU 
OCEXTTAU 
OCSCATAU 
TOTEXTTAU 
TOTSCATAU 

Definition at line 39 of file anc_acq.c.

◆ out_nam

enum out_nam
Enumerator
ZW 
MW 
PR 
WV 
RH 
SFCP 
SFCRH 
SFCT 
ICEFR 

Definition at line 31 of file anc_acq.c.

◆ out_prof

enum out_prof
Enumerator
TPROF 
RHPROF 
HPROF 
QPROF 
O3PROF 

Definition at line 35 of file anc_acq.c.

Function Documentation

◆ anc_acq_ck()

int32_t anc_acq_ck ( char *  file,
char *  file_olci 
)

Definition at line 171 of file anc_acq.c.

◆ anc_acq_ecmwf_init()

int32_t anc_acq_ecmwf_init ( char **  files,
char **  prm_nm,
int  n_prm,
int32_t  sto_ix 
)

Definition at line 2016 of file anc_acq.c.

◆ anc_acq_eval_pt()

int32_t anc_acq_eval_pt ( gen_int_str *  met_int,
int32_t  iprm,
int32_t  ilvl,
float  lat,
float  lon,
int32_t  t_interp,
int32_t *  data_ix,
float  wt_t1,
int32_t  ntim_int,
int32_t  nlvl,
int32_t  nprm,
float *  final_val,
float *  unc 
)

Definition at line 1614 of file anc_acq.c.

◆ anc_acq_f_stat()

int32_t anc_acq_f_stat ( char **  files,
char  prioritize_files,
int32_t  n_anc 
)

Definition at line 288 of file anc_acq.c.

◆ anc_acq_fnd_t_interp()

int32_t anc_acq_fnd_t_interp ( double  s_time,
double *  anc_time,
int32_t  anc_f_stat,
int32_t *  t_interp,
int32_t *  data_ix,
float *  wt 
)

Definition at line 1711 of file anc_acq.c.

◆ anc_acq_gmao_aer_prep()

int32_t anc_acq_gmao_aer_prep ( char *  file,
gen_int_str *  aer_int 
)

Definition at line 1556 of file anc_acq.c.

◆ anc_acq_gmao_met_prep()

int32_t anc_acq_gmao_met_prep ( char *  file,
gen_int_str *  met_int 
)

Definition at line 1139 of file anc_acq.c.

◆ anc_acq_gmao_oz_prep()

int32_t anc_acq_gmao_oz_prep ( char *  file,
gen_int_str *  oz_int 
)

Definition at line 1484 of file anc_acq.c.

◆ anc_acq_gmao_prof_prep()

int32_t anc_acq_gmao_prof_prep ( char *  file,
gen_int_str *  prof_int,
int32_t  nlvl_expect 
)

Definition at line 1363 of file anc_acq.c.

◆ anc_acq_init()

int anc_acq_init ( instr *  input,
l1str *  l1rec,
int32_t *  anc_id 
)

Definition at line 74 of file anc_acq.c.

◆ anc_acq_lin()

int anc_acq_lin ( int32_t  anc_class,
l1str *  l1rec 
)

Definition at line 2308 of file anc_acq.c.

◆ anc_acq_lin_aerosol()

int32_t anc_acq_lin_aerosol ( l1str *  l1rec)

Definition at line 584 of file anc_acq.c.

◆ anc_acq_lin_met()

int32_t anc_acq_lin_met ( l1str *  l1rec)

Definition at line 373 of file anc_acq.c.

◆ anc_acq_lin_olci()

int anc_acq_lin_olci ( int  anc_class,
char *  file,
l1str *  l1rec 
)

Definition at line 2578 of file anc_acq.c.

◆ anc_acq_lin_oz()

int32_t anc_acq_lin_oz ( l1str *  l1rec)

Definition at line 989 of file anc_acq.c.

◆ anc_acq_lin_prof()

int32_t anc_acq_lin_prof ( l1str *  l1rec)

Definition at line 738 of file anc_acq.c.

◆ anc_acq_read_gmao()

int32_t anc_acq_read_gmao ( char *  file,
char *  group,
char *  ds_name,
float **  data,
unsigned char **  qa,
double *  time,
int32_t *  nlon,
int32_t *  nlat,
int32_t *  nlvl,
double **  lon_coord,
double **  lat_coord 
)

Definition at line 1826 of file anc_acq.c.

◆ anc_miss_fill()

float anc_miss_fill ( int32_t  prod_ix)

Definition at line 2911 of file anc_acq.c.

◆ bilin_interp()

float bilin_interp ( float *  data,
int  xbox_st,
int  nx,
int  ybox_st,
float  xfrac,
float  yfrac 
)

Definition at line 2949 of file anc_acq.c.

◆ init_anc_add()

int init_anc_add ( l1str *  l1rec)

Definition at line 939 of file anc_acq.c.

◆ init_anc_aerosol()

int32_t init_anc_aerosol ( l1str *  l1rec)

Definition at line 898 of file anc_acq.c.

◆ jd4713bc_get_date()

int jd4713bc_get_date ( int64_t  jd,
int32_t *  year,
int32_t *  month,
int32_t *  day 
)

Definition at line 3038 of file anc_acq.c.

◆ jd4713bc_get_jd()

int64_t jd4713bc_get_jd ( int32_t  year,
int32_t  month,
int32_t  day 
)

Definition at line 2999 of file anc_acq.c.