41 ERRMSG(
"Give parameters: <ctl> <gps.nc> <map.tab>");
44 const double z = scan_ctl(argc, argv,
"Z", -1,
"20", NULL);
50 printf(
"Write map data: %s\n", argv[3]);
51 if (!(out = fopen(argv[3],
"w")))
52 ERRMSG(
"Cannot create file!");
57 "# $2 = altitude [km]\n"
58 "# $3 = longitude [deg]\n"
59 "# $4 = latitude [deg]\n"
60 "# $5 = pressure [hPa]\n"
61 "# $6 = temperature [K]\n"
62 "# $7 = water vapor vmr [ppm]\n"
63 "# $8 = temperature perturbation [K]\n"
64 "# $9 = tropopause height [km]\n\n");
67 for (
int ids = 0; ids < gps->
nds; ids++)
68 for (
int iz = 0; iz < gps->
nz[ids]; iz++)
69 if (fabs(gps->
z[ids][iz] - z) < 0.01) {
70 fprintf(out,
"%.2f %g %g %g %g %g %g %g %g\n",
71 gps->
time[ids], gps->
z[ids][iz], gps->
lon[ids][iz],
72 gps->
lat[ids][iz], gps->
p[ids][iz], gps->
t[ids][iz],
73 gps->
wv[ids][iz], gps->
pt[ids][iz], gps->
th[ids]);
void read_gps(char *filename, gps_t *gps)
Read GPS-RO data file.
GPS Code Collection library declarations.
int main(int argc, char *argv[])
double time[NDS]
Time (seconds since 2000-01-01T00:00Z).
double pt[NDS][NZ]
Temperature perturbation [K].
double t[NDS][NZ]
Temperature [K].
double wv[NDS][NZ]
Water vapor volume mixing ratio [ppm].
int nz[NDS]
Number of altitudes per profile.
double lon[NDS][NZ]
Longitude [deg].
int nds
Number of profiles.
double p[NDS][NZ]
Pressure [hPa].
double th[NDS]
Tropopause height [km].
double z[NDS][NZ]
Altitude [km].
double lat[NDS][NZ]
Latitude [deg].