69#include <gsl/gsl_randist.h>
70#include <gsl/gsl_fft_complex.h>
71#include <gsl/gsl_multifit.h>
72#include <gsl/gsl_poly.h>
73#include <gsl/gsl_sort.h>
74#include <gsl/gsl_spline.h>
97#define L1_NCHAN_LW 717
100#define L1_NCHAN_MW 869
103#define L1_NCHAN_SW 637
106#define PERT_NTRACK 44000
109#define PERT_NXTRACK 120
129 int nc_result=(cmd); \
130 if(nc_result!=NC_NOERR) \
131 ERRMSG("%s", nc_strerror(nc_result)); \
335 const char *long_name);
342 const char *longname,
void hamming(wave_t *wave, int nit)
Apply Hamming filter to perturbations...
void merge_y(wave_t *wave1, wave_t *wave2)
Merge wave structs in y-direction.
void fit_wave(wave_t *wave, double amp, double phi, double kx, double ky, double *chisq)
Evaluate wave fit...
void create_wave(wave_t *wave, double amp, double lx, double ly, double phi, double fwhm)
Add linear wave pattern...
void noise_pert(pert_t *pert, int track0, int track1, double *mu, double *sig)
Estimate noise from perurbations.
void background_poly_help(const double *xx, double *yy, const int n, const int dim)
Get background based on polynomial fits.
#define PERT_NXTRACK
Across-track size of perturbation data.
void fft_help(double *fcReal, double *fcImag, int n)
Calculate 1-D FFT...
#define L1_NCHAN_LW
Number of CrIS longwave radiance channels.
void background_smooth(wave_t *wave, int npts_x, int npts_y)
Smooth background.
#define L1_NXTRACK
Across-track size of CrIS radiance granule.
#define L1_NTRACK
Along-track size of CrIS radiance granule.
void intpol_x(wave_t *wave, int n)
Interpolate to regular grid in x-direction.
void fft(wave_t *wave, double *Amax, double *phimax, double *lhmax, double *kxmax, double *kymax, double *alphamax, double *betamax, char *filename)
Calculate 2-D FFT...
#define L1_NFOV
Number of field of views of CrIS radiance granule.
#define WX
Across-track size of wave analysis data.
void noise(wave_t *wave, double *mu, double *sig)
Estimate noise.
void read_retr_help(double *help, int nds, int np, double mat[NDS][NPG])
Convert array.
#define PERT_NTRACK
Along-track size of perturbation data.
void ret2wave(retr_t *ret, wave_t *wave, int dataset, int ip)
Convert CrIS retrieval results to wave analysis struct.
void background_poly(wave_t *wave, int dim_x, int dim_y)
Get background based on polynomial fits.
void create_noise(wave_t *wave, double nedt)
Add noise to perturbations and temperatures...
int read_cris_l1(char *filename, cris_l1_t *l1, int apo)
Read CrIS Level-1 data.
void variance(wave_t *wave, double dh)
Compute local variance.
#define NDS
Maximum number of data sets per granule.
void read_retr(char *filename, retr_t *ret)
Read CrIS retrieval data.
void pert2wave(pert_t *pert, wave_t *wave, int track0, int track1, int xtrack0, int xtrack1)
Convert radiance perturbation data to wave analysis struct.
#define L1_NCHAN_MW
Number of CrIS midwave radiance channels.
#define L1_NCHAN_SW
Number of CrIS shortwave radiance channels.
#define NPG
Maximum number of data points per granule.
#define PERT_NFOV
Number of field of views of perturbation data.
void add_att(const int ncid, const int varid, const char *unit, const char *long_name)
Add variable attributes to netCDF file.
void create_background(wave_t *wave)
Set background...
void read_pert(char *filename, char *pertname, int dc, pert_t *pert)
Read radiance perturbation data.
#define WY
Along-track size of wave analysis data.
void read_wave(char *filename, wave_t *wave)
Read wave analysis data.
void gauss(wave_t *wave, double fwhm)
Apply Gaussian filter to perturbations...
void add_var(const int ncid, const char *varname, const char *unit, const char *longname, int type, int dimid[], int *varid, int ndims)
Add variable to netCDF file.
void median(wave_t *wave, int dx)
Apply median filter to perturbations...
void write_wave(char *filename, wave_t *wave)
Write wave analysis data.
void period(wave_t *wave, double lxymax, double dlxy, double *Amax, double *phimax, double *lhmax, double *kxmax, double *kymax, double *alphamax, double *betamax, char *filename)
Compute periodogram.
int nfov
Number of field of views.
int ntrack
Number of along-track values.
int nxtrack
Number of across-track values.
int np
Number of data points.
int nds
Number of data sets.
int nx
Number of across-track values.
int ny
Number of along-track values.
double time
Time (seconds since 2000-01-01T00:00Z).