29 {
30
33
34 double clk[
NCL], sfeps[
NSF];
35
36
37 if (argc < 3)
38 ERRMSG(
"Give parameters: <ctl> <atm>");
39
40
42 double t0 =
scan_ctl(argc, argv,
"T0", -1,
"0", NULL);
43 double t1 =
scan_ctl(argc, argv,
"T1", -1,
"0", NULL);
44 double dt =
scan_ctl(argc, argv,
"DT", -1,
"1", NULL);
45 double z0 =
scan_ctl(argc, argv,
"Z0", -1,
"0", NULL);
46 double z1 =
scan_ctl(argc, argv,
"Z1", -1,
"90", NULL);
47 double dz =
scan_ctl(argc, argv,
"DZ", -1,
"1", NULL);
48 double clz =
scan_ctl(argc, argv,
"CLZ", -1,
"0", NULL);
49 double cldz =
scan_ctl(argc, argv,
"CLDZ", -1,
"0", NULL);
50 for (
int icl = 0; icl < ctl.
ncl; icl++)
51 clk[icl] =
scan_ctl(argc, argv,
"CLK", icl,
"0", NULL);
52 double sfz =
scan_ctl(argc, argv,
"SFZ", -1,
"0", NULL);
53 double sfp =
scan_ctl(argc, argv,
"SFP", -1,
"0", NULL);
54 double sft =
scan_ctl(argc, argv,
"SFT", -1,
"0", NULL);
55 for (
int isf = 0; isf < ctl.
nsf; isf++)
56 sfeps[isf] =
scan_ctl(argc, argv,
"SFEPS", isf,
"1", NULL);
57
58
59 for (double t = t0; t <= t1; t += dt)
60 for (double z = z0; z <= z1; z += dz) {
64 ERRMSG(
"Too many atmospheric grid points!");
65 }
66
67
69
70
73 for (
int icl = 0; icl < ctl.
ncl; icl++)
74 atm.
clk[icl] = clk[icl];
75
76
80 for (
int isf = 0; isf < ctl.
nsf; isf++)
81 atm.
sfeps[isf] = sfeps[isf];
82
83
85
86 return EXIT_SUCCESS;
87}
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.
double scan_ctl(int argc, char *argv[], const char *varname, int arridx, const char *defvalue, char *value)
Search control parameter file for variable entry.
void climatology(const ctl_t *ctl, atm_t *atm)
Interpolate climatological data.
#define ERRMSG(...)
Print error message and quit program.
#define NP
Maximum number of atmospheric data points.
#define NSF
Maximum number of surface layer spectral grid points.
#define NCL
Maximum number of cloud layer spectral grid points.
double time[NP]
Time (seconds since 2000-01-01T00:00Z).
double sfeps[NSF]
Surface emissivity.
double sfz
Surface height [km].
double sfp
Surface pressure [hPa].
double clz
Cloud layer height [km].
int np
Number of data points.
double cldz
Cloud layer depth [km].
double sft
Surface temperature [K].
double z[NP]
Altitude [km].
double clk[NCL]
Cloud layer extinction [km^-1].
Forward model control parameters.
int ncl
Number of cloud layer spectral grid points.
int nsf
Number of surface layer spectral grid points.