44 ERRMSG(
"Give parameters: <ctl> <obs> <spec.tab>");
56 LOG(1,
"Write spectra: %s", argv[3]);
59 if (!(out = fopen(argv[3],
"w")))
60 ERRMSG(
"Cannot create file!");
64 "# $1 = time (seconds since 2000-01-01T00:00Z)\n"
65 "# $2 = observer altitude [km]\n"
66 "# $3 = observer longitude [deg]\n"
67 "# $4 = observer latitude [deg]\n"
68 "# $5 = view point altitude [km]\n"
69 "# $6 = view point longitude [deg]\n"
70 "# $7 = view point latitude [deg]\n"
71 "# $8 = tangent point altitude [km]\n"
72 "# $9 = tangent point longitude [deg]\n"
73 "# $10 = tangent point latitude [deg]\n"
74 "# $11 = channel frequency [cm^-1]\n"
75 "# $12 = channel radiance [W/(m^2 sr cm^-1)]\n"
76 "# $13 = channel transmittance [1]\n");
79 for (
int ir = 0; ir < obs->
nr; ir++) {
81 for (
int id = 0;
id < ctl.
nd;
id++)
82 fprintf(out,
"%.2f %g %g %g %g %g %g %g %g %g %.4f %g %g\n",
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
void read_obs(const char *dirname, const char *filename, const ctl_t *ctl, obs_t *obs)
Read observation data.
JURASSIC library declarations.
#define ERRMSG(...)
Print error message and quit program.
#define ALLOC(ptr, type, n)
Allocate memory.
#define LOG(level,...)
Print log message.
int main(int argc, char *argv[])
Forward model control parameters.
double nu[ND]
Centroid wavenumber of each channel [cm^-1].
int nd
Number of radiance channels.
Observation geometry and radiance data.
double tau[ND][NR]
Transmittance of ray path.
double rad[ND][NR]
Radiance [W/(m^2 sr cm^-1)].
double tplon[NR]
Tangent point longitude [deg].
double vpz[NR]
View point altitude [km].
double vplat[NR]
View point latitude [deg].
double obslon[NR]
Observer longitude [deg].
double obslat[NR]
Observer latitude [deg].
double obsz[NR]
Observer altitude [km].
double tplat[NR]
Tangent point latitude [deg].
double vplon[NR]
View point longitude [deg].
double time[NR]
Time (seconds since 2000-01-01T00:00Z).
double tpz[NR]
Tangent point altitude [km].
int nr
Number of ray paths.