|
GPS Code Collection
|
GPS Code Collection library declarations. More...
#include <netcdf.h>#include <gsl/gsl_multifit.h>#include <gsl/gsl_poly.h>#include <gsl/gsl_spline.h>#include "jurassic.h"Go to the source code of this file.
Data Structures | |
| struct | gps_t |
| GPS-RO profile data. More... | |
| struct | met_t |
| Meteorological data. More... | |
Macros | |
| #define | EP 73 |
| Maximum number of pressure levels for meteorological data. More... | |
| #define | EX 721 |
| Maximum number of longitudes for meteorological data. More... | |
| #define | EY 361 |
| Maximum number of latitudes for meteorological data. More... | |
| #define | NDS 10000 |
| Maximum number of GPS-RO profiles. More... | |
| #define | NZ 5000 |
| Maximum number of altitudes per GPS-RO profile. More... | |
| #define | MA 28.9644 |
| Molar mass of dry air [g/mol]. More... | |
| #define | RA (1e3 * RI / MA) |
| Specific gas constant of dry air [J/(kg K)]. More... | |
| #define | RI 8.3144598 |
| Ideal gas constant [J/(mol K)]. More... | |
| #define | LAPSE(p1, t1, p2, t2) |
| Calculate lapse rate. More... | |
| #define | NC(cmd) |
| Execute netCDF library command and check result. More... | |
| #define | P(z) (P0 * exp(-(z) / H0)) |
| Compute pressure at given altitude. More... | |
| #define | Z(p) (H0 * log(P0 / (p))) |
| Convert pressure to altitude. More... | |
Functions | |
| void | add_var (int ncid, const char *varname, const char *unit, const char *longname, int type, int dimid[], int *varid, int ndims) |
| Add variable to netCDF file. More... | |
| void | detrend_met (gps_t *gps, char *metbase, double dt_met) |
| Detrending by means of meteo data. More... | |
| void | gauss (gps_t *gps, double dx, double dy) |
| Calculate horizontal Gaussian mean to extract perturbations. More... | |
| void | grid_gps (gps_t *gps, double zmin, double zmax, int nz) |
| Interpolate GPS data to regular altitude grid. More... | |
| void | get_met (char *metbase, double dt_met, double t, met_t *met0, met_t *met1) |
| Get meteorological data for given timestep. More... | |
| void | get_met_help (double t, int direct, char *metbase, double dt_met, char *filename) |
| Get meteorological data for timestep. More... | |
| void | intpol_met_3d (float array[EX][EY][EP], int ip, int ix, int iy, double wp, double wx, double wy, double *var) |
| Linear interpolation of 3-D meteorological data. More... | |
| void | intpol_met_space (met_t *met, double p, double lon, double lat, double *t) |
| Spatial interpolation of meteorological data. More... | |
| void | intpol_met_time (met_t *met0, met_t *met1, double ts, double p, double lon, double lat, double *t) |
| Temporal interpolation of meteorological data. More... | |
| void | hamming_low_pass (gps_t *gps, double dz) |
| Apply vertical Hamming filter to extract perturbations. More... | |
| void | hamming_high_pass (gps_t *gps, double dz) |
| Apply vertical Hamming filter to reduce noise. More... | |
| void | poly (gps_t *gps, int dim, double zmin, double zmax) |
| Remove polynomial fit from perturbation profile. More... | |
| void | poly_help (double *xx, double *yy, int n, int dim, double xmin, double xmax) |
| Auxiliary function for polynomial interpolation. More... | |
| void | read_gps_prof (char *filename, gps_t *gps) |
| Read GPS-RO profile. More... | |
| void | read_gps (char *filename, gps_t *gps) |
| Read GPS-RO data file. More... | |
| void | read_met (char *filename, met_t *met) |
| Read meteorological data file. More... | |
| void | read_met_extrapolate (met_t *met) |
| Extrapolate meteorological data at lower boundary. More... | |
| void | read_met_help (int ncid, char *varname, char *varname2, met_t *met, float dest[EX][EY][EP], float scl) |
| Read and convert variable from meteorological data file. More... | |
| void | read_met_periodic (met_t *met) |
| Create meteorological data with periodic boundary conditions. More... | |
| void | spline (const double *x, const double *y, const int n, const double *x2, double *y2, const int n2, const int method) |
| Performs spline interpolation or linear interpolation. More... | |
| void | tropopause (gps_t *gps) |
| Find tropopause height. More... | |
| void | tropopause_spline (gps_t *gps, int met_tropo) |
| Find tropopause height using cubic spline interpolation. More... | |
| void | write_gps (char *filename, gps_t *gps) |
| Write GPS-RO data file. More... | |
GPS Code Collection library declarations.
Definition in file libgps.h.
| #define EP 73 |
| #define EX 721 |
| #define EY 361 |
| #define NZ 5000 |
| #define LAPSE | ( | p1, | |
| t1, | |||
| p2, | |||
| t2 | |||
| ) |
Calculate lapse rate.
| #define NC | ( | cmd | ) |
| #define P | ( | z | ) | (P0 * exp(-(z) / H0)) |
| #define Z | ( | p | ) | (H0 * log(P0 / (p))) |
| void add_var | ( | int | ncid, |
| const char * | varname, | ||
| const char * | unit, | ||
| const char * | longname, | ||
| int | type, | ||
| int | dimid[], | ||
| int * | varid, | ||
| int | ndims | ||
| ) |
| void detrend_met | ( | gps_t * | gps, |
| char * | metbase, | ||
| double | dt_met | ||
| ) |
Detrending by means of meteo data.
Definition at line 57 of file libgps.c.

| void gauss | ( | gps_t * | gps, |
| double | dx, | ||
| double | dy | ||
| ) |
Calculate horizontal Gaussian mean to extract perturbations.
Definition at line 94 of file libgps.c.
| void grid_gps | ( | gps_t * | gps, |
| double | zmin, | ||
| double | zmax, | ||
| int | nz | ||
| ) |
Interpolate GPS data to regular altitude grid.
Definition at line 136 of file libgps.c.
Get meteorological data for given timestep.
Definition at line 191 of file libgps.c.

| void get_met_help | ( | double | t, |
| int | direct, | ||
| char * | metbase, | ||
| double | dt_met, | ||
| char * | filename | ||
| ) |
Get meteorological data for timestep.
Definition at line 223 of file libgps.c.
| void intpol_met_3d | ( | float | array[EX][EY][EP], |
| int | ip, | ||
| int | ix, | ||
| int | iy, | ||
| double | wp, | ||
| double | wx, | ||
| double | wy, | ||
| double * | var | ||
| ) |
Linear interpolation of 3-D meteorological data.
Definition at line 249 of file libgps.c.
| void intpol_met_space | ( | met_t * | met, |
| double | p, | ||
| double | lon, | ||
| double | lat, | ||
| double * | t | ||
| ) |
Spatial interpolation of meteorological data.
Definition at line 278 of file libgps.c.

| void intpol_met_time | ( | met_t * | met0, |
| met_t * | met1, | ||
| double | ts, | ||
| double | p, | ||
| double | lon, | ||
| double | lat, | ||
| double * | t | ||
| ) |
Temporal interpolation of meteorological data.
Definition at line 307 of file libgps.c.

| void hamming_low_pass | ( | gps_t * | gps, |
| double | dz | ||
| ) |
Apply vertical Hamming filter to extract perturbations.
Definition at line 331 of file libgps.c.
| void hamming_high_pass | ( | gps_t * | gps, |
| double | dz | ||
| ) |
Apply vertical Hamming filter to reduce noise.
Definition at line 389 of file libgps.c.
| void poly | ( | gps_t * | gps, |
| int | dim, | ||
| double | zmin, | ||
| double | zmax | ||
| ) |
Remove polynomial fit from perturbation profile.
Definition at line 443 of file libgps.c.

| void poly_help | ( | double * | xx, |
| double * | yy, | ||
| int | n, | ||
| int | dim, | ||
| double | xmin, | ||
| double | xmax | ||
| ) |
Auxiliary function for polynomial interpolation.
Definition at line 469 of file libgps.c.
| void read_gps_prof | ( | char * | filename, |
| gps_t * | gps | ||
| ) |
Read GPS-RO profile.
Definition at line 528 of file libgps.c.
| void read_gps | ( | char * | filename, |
| gps_t * | gps | ||
| ) |
Read GPS-RO data file.
Definition at line 632 of file libgps.c.
| void read_met | ( | char * | filename, |
| met_t * | met | ||
| ) |
Read meteorological data file.
Definition at line 703 of file libgps.c.

| void read_met_extrapolate | ( | met_t * | met | ) |
| void read_met_help | ( | int | ncid, |
| char * | varname, | ||
| char * | varname2, | ||
| met_t * | met, | ||
| float | dest[EX][EY][EP], | ||
| float | scl | ||
| ) |
Read and convert variable from meteorological data file.
Definition at line 804 of file libgps.c.
| void read_met_periodic | ( | met_t * | met | ) |
Create meteorological data with periodic boundary conditions.
Definition at line 836 of file libgps.c.
| void spline | ( | const double * | x, |
| const double * | y, | ||
| const int | n, | ||
| const double * | x2, | ||
| double * | y2, | ||
| const int | n2, | ||
| const int | method | ||
| ) |
Performs spline interpolation or linear interpolation.
Definition at line 859 of file libgps.c.
| void tropopause | ( | gps_t * | gps | ) |
Find tropopause height.
Definition at line 906 of file libgps.c.
| void tropopause_spline | ( | gps_t * | gps, |
| int | met_tropo | ||
| ) |
Find tropopause height using cubic spline interpolation.
Definition at line 940 of file libgps.c.

| void write_gps | ( | char * | filename, |
| gps_t * | gps | ||
| ) |
Write GPS-RO data file.
Definition at line 1078 of file libgps.c.
