JURASSIC
Functions
nadir.c File Reference

Create observation geometry for a nadir sounder. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Create observation geometry for a nadir sounder.

Definition in file nadir.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file nadir.c.

29 {
30
31 static ctl_t ctl;
32 static obs_t obs;
33
34 /* Check arguments... */
35 if (argc < 3)
36 ERRMSG("Give parameters: <ctl> <obs>");
37
38 /* Read control parameters... */
39 read_ctl(argc, argv, &ctl);
40 double t0 = scan_ctl(argc, argv, "T0", -1, "0", NULL);
41 double t1 = scan_ctl(argc, argv, "T1", -1, "0", NULL);
42 double dt = scan_ctl(argc, argv, "DT", -1, "1", NULL);
43 double obsz = scan_ctl(argc, argv, "OBSZ", -1, "700", NULL);
44 double lat0 = scan_ctl(argc, argv, "LAT0", -1, "-8.01", NULL);
45 double lat1 = scan_ctl(argc, argv, "LAT1", -1, "8.01", NULL);
46 double dlat = scan_ctl(argc, argv, "DLAT", -1, "0.18", NULL);
47
48 /* Create measurement geometry... */
49 for (double t = t0; t <= t1; t += dt)
50 for (double lat = lat0; lat <= lat1; lat += dlat) {
51 obs.time[obs.nr] = t;
52 obs.obsz[obs.nr] = obsz;
53 obs.vplat[obs.nr] = lat;
54 if ((++obs.nr) >= NR)
55 ERRMSG("Too many rays!");
56 }
57
58 /* Write observation data... */
59 write_obs(NULL, argv[2], &ctl, &obs);
60
61 return EXIT_SUCCESS;
62}
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4550
void write_obs(const char *dirname, const char *filename, const ctl_t *ctl, const obs_t *obs)
Write observation data.
Definition: jurassic.c:5673
double scan_ctl(int argc, char *argv[], const char *varname, int arridx, const char *defvalue, char *value)
Search control parameter file for variable entry.
Definition: jurassic.c:5117
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
#define NR
Maximum number of ray paths.
Definition: jurassic.h:368
Forward model control parameters.
Definition: jurassic.h:541
Observation geometry and radiance data.
Definition: jurassic.h:734
double vplat[NR]
View point latitude [deg].
Definition: jurassic.h:758
double obsz[NR]
Observer altitude [km].
Definition: jurassic.h:743
double time[NR]
Time (seconds since 2000-01-01T00:00Z).
Definition: jurassic.h:740
int nr
Number of ray paths.
Definition: jurassic.h:737
Here is the call graph for this function: