31 static atm_t atm_in, atm_pts;
40 ERRMSG(
"Give parameters: <ctl> <atm_in> <atm_pts> <atm_out>");
46 read_atm(NULL, argv[2], &ctl, &atm_in);
47 read_atm(NULL, argv[3], &ctl, &atm_pts);
50 for (
int ip = 0; ip < atm_pts.
np; ip++) {
52 &atm_pts.
p[ip], &atm_pts.
t[ip], q, k);
53 for (
int ig = 0; ig < ctl.
ng; ig++)
54 atm_pts.
q[ig][ip] = q[ig];
55 for (
int iw = 0; iw < ctl.
nw; iw++)
56 atm_pts.
k[iw][ip] = k[iw];
int main(int argc, char *argv[])
void write_atm(const char *dirname, const char *filename, const ctl_t *ctl, const atm_t *atm)
Write atmospheric data.
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
void intpol_atm(const ctl_t *ctl, const atm_t *atm, const double z, double *p, double *t, double *q, double *k)
Interpolate atmospheric data.
void read_atm(const char *dirname, const char *filename, const ctl_t *ctl, atm_t *atm)
Read atmospheric data.
JURASSIC library declarations.
#define ERRMSG(...)
Print error message and quit program.
#define NG
Maximum number of emitters.
#define NW
Maximum number of spectral windows.
double k[NW][NP]
Extinction [km^-1].
double t[NP]
Temperature [K].
int np
Number of data points.
double z[NP]
Altitude [km].
double q[NG][NP]
Volume mixing ratio [ppv].
double p[NP]
Pressure [hPa].
Forward model control parameters.
int nw
Number of spectral windows.
int ng
Number of emitters.