MPTRAC
atm_dist.c
Go to the documentation of this file.
1/*
2 This file is part of MPTRAC.
3
4 MPTRAC is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 MPTRAC is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with MPTRAC. If not, see <http://www.gnu.org/licenses/>.
16
17 Copyright (C) 2013-2026 Forschungszentrum Juelich GmbH
18*/
19
25#include "mptrac.h"
26
27/* ------------------------------------------------------------
28 Functions...
29 ------------------------------------------------------------ */
30
32void usage(
33 void);
34
36double finite_stat(
37 const double *data,
38 int np,
39 const char *param,
40 double *work);
41
42/* ------------------------------------------------------------
43 Main...
44 ------------------------------------------------------------ */
45
46int main(
47 int argc,
48 char *argv[]) {
49
50 ctl_t ctl;
51
52 atm_t *atm1, *atm2;
53
54 FILE *out;
55
56 double *ahtd, *aqtd, *avtd, ahtdm, aqtdm[NQ], avtdm, *lat1_old, *lat2_old,
57 *lh1, *lh2, *lon1_old, *lon2_old, *lv1, *lv2, *rhtd, *rqtd, *rvtd, rhtdm,
58 rel_min[NQ], rqtdm[NQ], rvtdm, t0 =
59 0, x0[3], x1[3], x2[3], z1, *z1_old, z2, *z2_old, *work;
60
61 int init = 0, np;
62
63 /* Print usage information... */
64 USAGE;
65
66 /* Check arguments... */
67 if (argc < 6)
68 ERRMSG("Missing or invalid command-line arguments.\n\n"
69 "Usage: atm_dist <ctl> <dist.tab> <param> <atm1a> <atm1b> [<atm2a> <atm2b> ...]\n\n"
70 "Use -h for full help.");
71
72 /* Allocate... */
73 ALLOC(atm1, atm_t, 1);
74 ALLOC(atm2, atm_t, 1);
75 ALLOC(lon1_old, double,
76 NP);
77 ALLOC(lat1_old, double,
78 NP);
79 ALLOC(z1_old, double,
80 NP);
81 ALLOC(lh1, double,
82 NP);
83 ALLOC(lv1, double,
84 NP);
85 ALLOC(lon2_old, double,
86 NP);
87 ALLOC(lat2_old, double,
88 NP);
89 ALLOC(z2_old, double,
90 NP);
91 ALLOC(lh2, double,
92 NP);
93 ALLOC(lv2, double,
94 NP);
95 ALLOC(ahtd, double,
96 NP);
97 ALLOC(avtd, double,
98 NP);
99 ALLOC(aqtd, double,
100 NP * NQ);
101 ALLOC(rhtd, double,
102 NP);
103 ALLOC(rvtd, double,
104 NP);
105 ALLOC(rqtd, double,
106 NP * NQ);
107 ALLOC(work, double,
108 NP);
109
110 /* Read control parameters... */
111 mptrac_read_ctl(argv[1], argc, argv, &ctl);
112
113 if (ctl.met_coord_type != 0)
114 ERRMSG("atm_dist currently supports only lat/lon grids");
115 const int ens =
116 (int) scan_ctl(argv[1], argc, argv, "DIST_ENS", -1, "-999", NULL);
117 const double p0 =
118 P(scan_ctl(argv[1], argc, argv, "DIST_Z0", -1, "-1000", NULL));
119 const double p1 =
120 P(scan_ctl(argv[1], argc, argv, "DIST_Z1", -1, "1000", NULL));
121 const double lat0 =
122 scan_ctl(argv[1], argc, argv, "DIST_LAT0", -1, "-1000", NULL);
123 const double lat1 =
124 scan_ctl(argv[1], argc, argv, "DIST_LAT1", -1, "1000", NULL);
125 const double lon0 =
126 scan_ctl(argv[1], argc, argv, "DIST_LON0", -1, "-1000", NULL);
127 const double lon1 =
128 scan_ctl(argv[1], argc, argv, "DIST_LON1", -1, "1000", NULL);
129 const double zscore =
130 scan_ctl(argv[1], argc, argv, "DIST_ZSCORE", -1, "-999", NULL);
131
132 /* Write info... */
133 LOG(1, "Write transport deviations: %s", argv[2]);
134
135 /* Create output file... */
136 if (!(out = fopen(argv[2], "w")))
137 ERRMSG("Cannot create file!");
138
139 /* Write header... */
140 fprintf(out,
141 "# $1 = time [s]\n"
142 "# $2 = time difference [s]\n"
143 "# $3 = absolute horizontal distance (%s) [km]\n"
144 "# $4 = relative horizontal distance (%s) [%%]\n"
145 "# $5 = absolute vertical distance (%s) [km]\n"
146 "# $6 = relative vertical distance (%s) [%%]\n",
147 argv[3], argv[3], argv[3], argv[3]);
148 for (int iq = 0; iq < ctl.nq; iq++) {
149 rel_min[iq] =
150 scan_ctl(argv[1], argc, argv, "DIST_REL_MIN", iq, "0", NULL);
151 if (rel_min[iq] > 0)
152 fprintf(out,
153 "# Relative %s differences are masked where |q1| + |q2| <= %g %s.\n",
154 ctl.qnt_name[iq], rel_min[iq], ctl.qnt_unit[iq]);
155 fprintf(out,
156 "# $%d = %s absolute difference (%s) [%s]\n"
157 "# $%d = %s relative difference (%s) [%%]\n",
158 7 + 2 * iq, ctl.qnt_name[iq], argv[3], ctl.qnt_unit[iq],
159 8 + 2 * iq, ctl.qnt_name[iq], argv[3]);
160 }
161 fprintf(out, "# $%d = number of particles\n\n", 7 + 2 * ctl.nq);
162
163 /* Loop over file pairs... */
164 for (int f = 4; f < argc; f += 2) {
165
166 /* Read atmopheric data... */
167 if (!mptrac_read_atm(argv[f], &ctl, atm1)
168 || !mptrac_read_atm(argv[f + 1], &ctl, atm2))
169 continue;
170
171 /* Check if structs match... */
172 if (atm1->np != atm2->np)
173 ERRMSG("Different numbers of particles!");
174
175 /* Get time from filename... */
176 int time_offset = ctl.atm_type < 2 ? 23 : 22;
177 const double t = time_from_filename(argv[f], time_offset, 1);
178
179 /* Save initial time... */
180 if (!init) {
181 init = 1;
182 t0 = t;
183 }
184
185 /* Init... */
186 np = 0;
187 for (int ip = 0; ip < atm1->np; ip++) {
188 ahtd[ip] = avtd[ip] = rhtd[ip] = rvtd[ip] = 0;
189 for (int iq = 0; iq < ctl.nq; iq++)
190 aqtd[iq * NP + ip] = rqtd[iq * NP + ip] = 0;
191 }
192
193 /* Loop over air parcels... */
194 for (int ip = 0; ip < atm1->np; ip++) {
195
196 /* Check air parcel index... */
197 if (ctl.qnt_idx > 0
198 && (atm1->q[ctl.qnt_idx][ip] != atm2->q[ctl.qnt_idx][ip]))
199 ERRMSG("Air parcel index does not match!");
200
201 /* Check ensemble index... */
202 if (ctl.qnt_ens > 0
203 && (atm1->q[ctl.qnt_ens][ip] != ens
204 || atm2->q[ctl.qnt_ens][ip] != ens))
205 continue;
206
207 /* Check time... */
208 if (!isfinite(atm1->time[ip]) || !isfinite(atm2->time[ip]))
209 continue;
210
211 /* Check spatial range... */
212 if (atm1->p[ip] > p0 || atm1->p[ip] < p1
213 || atm1->lon[ip] < lon0 || atm1->lon[ip] > lon1
214 || atm1->lat[ip] < lat0 || atm1->lat[ip] > lat1)
215 continue;
216 if (atm2->p[ip] > p0 || atm2->p[ip] < p1
217 || atm2->lon[ip] < lon0 || atm2->lon[ip] > lon1
218 || atm2->lat[ip] < lat0 || atm2->lat[ip] > lat1)
219 continue;
220
221 /* Convert coordinates... */
222 geo2cart(0, atm1->lon[ip], atm1->lat[ip], x1);
223 geo2cart(0, atm2->lon[ip], atm2->lat[ip], x2);
224 z1 = Z(atm1->p[ip]);
225 z2 = Z(atm2->p[ip]);
226
227 /* Calculate absolute transport deviations... */
228 ahtd[np] = DIST(x1, x2);
229 avtd[np] = z1 - z2;
230 for (int iq = 0; iq < ctl.nq; iq++)
231 aqtd[iq * NP + np] = atm1->q[iq][ip] - atm2->q[iq][ip];
232
233 /* Calculate relative transport deviations... */
234 if (f > 4) {
235
236 /* Get trajectory lengths... */
237 geo2cart(0, lon1_old[ip], lat1_old[ip], x0);
238 lh1[ip] += DIST(x0, x1);
239 lv1[ip] += fabs(z1_old[ip] - z1);
240
241 geo2cart(0, lon2_old[ip], lat2_old[ip], x0);
242 lh2[ip] += DIST(x0, x2);
243 lv2[ip] += fabs(z2_old[ip] - z2);
244
245 /* Get relative transport deviations... */
246 if (lh1[ip] + lh2[ip] > 0)
247 rhtd[np] = 200. * DIST(x1, x2) / (lh1[ip] + lh2[ip]);
248 if (lv1[ip] + lv2[ip] > 0)
249 rvtd[np] = 200. * (z1 - z2) / (lv1[ip] + lv2[ip]);
250 }
251
252 /* Get relative transport deviations... */
253 for (int iq = 0; iq < ctl.nq; iq++) {
254 const double q1 = atm1->q[iq][ip];
255 const double q2 = atm2->q[iq][ip];
256 const double denom = fabs(q1) + fabs(q2);
257 if (denom <= rel_min[iq])
258 rqtd[iq * NP + np] = GSL_NAN;
259 else
260 rqtd[iq * NP + np] = 200. * (q1 - q2) / denom;
261 }
262
263 /* Save positions of air parcels... */
264 lon1_old[ip] = atm1->lon[ip];
265 lat1_old[ip] = atm1->lat[ip];
266 z1_old[ip] = z1;
267
268 lon2_old[ip] = atm2->lon[ip];
269 lat2_old[ip] = atm2->lat[ip];
270 z2_old[ip] = z2;
271
272 /* Increment air parcel counter... */
273 np++;
274 }
275
276 /* Filter data... */
277 if (zscore > 0 && np > 1) {
278
279 /* Get means and standard deviations of transport deviations... */
280 const size_t n = (size_t) np;
281 const double muh = gsl_stats_mean(ahtd, 1, n);
282 const double muv = gsl_stats_mean(avtd, 1, n);
283 const double sigh = gsl_stats_sd(ahtd, 1, n);
284 const double sigv = gsl_stats_sd(avtd, 1, n);
285
286 /* Filter data... */
287 np = 0;
288 for (size_t i = 0; i < n; i++)
289 if (fabs((ahtd[i] - muh) / sigh) < zscore
290 && fabs((avtd[i] - muv) / sigv) < zscore) {
291 ahtd[np] = ahtd[i];
292 rhtd[np] = rhtd[i];
293 avtd[np] = avtd[i];
294 rvtd[np] = rvtd[i];
295 for (int iq = 0; iq < ctl.nq; iq++) {
296 aqtd[iq * NP + np] = aqtd[iq * NP + (int) i];
297 rqtd[iq * NP + np] = rqtd[iq * NP + (int) i];
298 }
299 np++;
300 }
301 }
302
303 /* Get statistics... */
304 if (strcasecmp(argv[3], "mean") == 0) {
305 ahtdm = gsl_stats_mean(ahtd, 1, (size_t) np);
306 rhtdm = gsl_stats_mean(rhtd, 1, (size_t) np);
307 avtdm = gsl_stats_mean(avtd, 1, (size_t) np);
308 rvtdm = gsl_stats_mean(rvtd, 1, (size_t) np);
309 for (int iq = 0; iq < ctl.nq; iq++) {
310 aqtdm[iq] = gsl_stats_mean(&aqtd[iq * NP], 1, (size_t) np);
311 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
312 }
313 } else if (strcasecmp(argv[3], "stddev") == 0) {
314 ahtdm = gsl_stats_sd(ahtd, 1, (size_t) np);
315 rhtdm = gsl_stats_sd(rhtd, 1, (size_t) np);
316 avtdm = gsl_stats_sd(avtd, 1, (size_t) np);
317 rvtdm = gsl_stats_sd(rvtd, 1, (size_t) np);
318 for (int iq = 0; iq < ctl.nq; iq++) {
319 aqtdm[iq] = gsl_stats_sd(&aqtd[iq * NP], 1, (size_t) np);
320 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
321 }
322 } else if (strcasecmp(argv[3], "min") == 0) {
323 ahtdm = gsl_stats_min(ahtd, 1, (size_t) np);
324 rhtdm = gsl_stats_min(rhtd, 1, (size_t) np);
325 avtdm = gsl_stats_min(avtd, 1, (size_t) np);
326 rvtdm = gsl_stats_min(rvtd, 1, (size_t) np);
327 for (int iq = 0; iq < ctl.nq; iq++) {
328 aqtdm[iq] = gsl_stats_min(&aqtd[iq * NP], 1, (size_t) np);
329 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
330 }
331 } else if (strcasecmp(argv[3], "max") == 0) {
332 ahtdm = gsl_stats_max(ahtd, 1, (size_t) np);
333 rhtdm = gsl_stats_max(rhtd, 1, (size_t) np);
334 avtdm = gsl_stats_max(avtd, 1, (size_t) np);
335 rvtdm = gsl_stats_max(rvtd, 1, (size_t) np);
336 for (int iq = 0; iq < ctl.nq; iq++) {
337 aqtdm[iq] = gsl_stats_max(&aqtd[iq * NP], 1, (size_t) np);
338 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
339 }
340 } else if (strcasecmp(argv[3], "skew") == 0) {
341 ahtdm = gsl_stats_skew(ahtd, 1, (size_t) np);
342 rhtdm = gsl_stats_skew(rhtd, 1, (size_t) np);
343 avtdm = gsl_stats_skew(avtd, 1, (size_t) np);
344 rvtdm = gsl_stats_skew(rvtd, 1, (size_t) np);
345 for (int iq = 0; iq < ctl.nq; iq++) {
346 aqtdm[iq] = gsl_stats_skew(&aqtd[iq * NP], 1, (size_t) np);
347 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
348 }
349 } else if (strcasecmp(argv[3], "kurt") == 0) {
350 ahtdm = gsl_stats_kurtosis(ahtd, 1, (size_t) np);
351 rhtdm = gsl_stats_kurtosis(rhtd, 1, (size_t) np);
352 avtdm = gsl_stats_kurtosis(avtd, 1, (size_t) np);
353 rvtdm = gsl_stats_kurtosis(rvtd, 1, (size_t) np);
354 for (int iq = 0; iq < ctl.nq; iq++) {
355 aqtdm[iq] = gsl_stats_kurtosis(&aqtd[iq * NP], 1, (size_t) np);
356 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
357 }
358 } else if (strcasecmp(argv[3], "absdev") == 0) {
359 ahtdm = gsl_stats_absdev_m(ahtd, 1, (size_t) np, 0.0);
360 rhtdm = gsl_stats_absdev_m(rhtd, 1, (size_t) np, 0.0);
361 avtdm = gsl_stats_absdev_m(avtd, 1, (size_t) np, 0.0);
362 rvtdm = gsl_stats_absdev_m(rvtd, 1, (size_t) np, 0.0);
363 for (int iq = 0; iq < ctl.nq; iq++) {
364 aqtdm[iq] = gsl_stats_absdev_m(&aqtd[iq * NP], 1, (size_t) np, 0.0);
365 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
366 }
367 } else if (strcasecmp(argv[3], "median") == 0) {
368 ahtdm = gsl_stats_median(ahtd, 1, (size_t) np);
369 rhtdm = gsl_stats_median(rhtd, 1, (size_t) np);
370 avtdm = gsl_stats_median(avtd, 1, (size_t) np);
371 rvtdm = gsl_stats_median(rvtd, 1, (size_t) np);
372 for (int iq = 0; iq < ctl.nq; iq++) {
373 aqtdm[iq] = gsl_stats_median(&aqtd[iq * NP], 1, (size_t) np);
374 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
375 }
376 } else if (strcasecmp(argv[3], "mad") == 0) {
377 ahtdm = gsl_stats_mad0(ahtd, 1, (size_t) np, work);
378 rhtdm = gsl_stats_mad0(rhtd, 1, (size_t) np, work);
379 avtdm = gsl_stats_mad0(avtd, 1, (size_t) np, work);
380 rvtdm = gsl_stats_mad0(rvtd, 1, (size_t) np, work);
381 for (int iq = 0; iq < ctl.nq; iq++) {
382 aqtdm[iq] = gsl_stats_mad0(&aqtd[iq * NP], 1, (size_t) np, work);
383 rqtdm[iq] = finite_stat(&rqtd[iq * NP], np, argv[3], work);
384 }
385 } else
386 ERRMSG("Unknown parameter!");
387
388 /* Write output... */
389 fprintf(out, "%.2f %.2f %g %g %g %g", t, t - t0,
390 ahtdm, rhtdm, avtdm, rvtdm);
391 for (int iq = 0; iq < ctl.nq; iq++) {
392 fprintf(out, " ");
393 fprintf(out, ctl.qnt_format[iq], aqtdm[iq]);
394 fprintf(out, " ");
395 fprintf(out, ctl.qnt_format[iq], rqtdm[iq]);
396 }
397 fprintf(out, " %d\n", np);
398 }
399
400 /* Close file... */
401 fclose(out);
402
403 /* Free... */
404 free(atm1);
405 free(atm2);
406 free(lon1_old);
407 free(lat1_old);
408 free(z1_old);
409 free(lh1);
410 free(lv1);
411 free(lon2_old);
412 free(lat2_old);
413 free(z2_old);
414 free(lh2);
415 free(lv2);
416 free(ahtd);
417 free(avtd);
418 free(aqtd);
419 free(rhtd);
420 free(rvtd);
421 free(rqtd);
422 free(work);
423
424 return EXIT_SUCCESS;
425}
426
427/*****************************************************************************/
428
430void usage(
431 void) {
432
433 printf("\nMPTRAC atm_dist tool.\n\n");
434 printf
435 ("Calculate transport deviations between pairs of trajectory data sets.\n");
436 printf("\n");
437 printf("Usage:\n");
438 printf
439 (" atm_dist <ctl> <dist.tab> <param> <atm1a> <atm1b> [<atm2a> <atm2b> ...]\n");
440 printf("\n");
441 printf("Arguments:\n");
442 printf(" <ctl> Control file.\n");
443 printf(" <dist.tab> Output table.\n");
444 printf
445 (" <param> Statistic: mean, stddev, min, max, skew, kurt, absdev,\n");
446 printf(" median, or mad.\n");
447 printf(" <atm*a/b> Atmospheric input files to compare pairwise.\n");
448 printf("\nControl parameters:\n");
449 printf
450 (" DIST_REL_MIN[iq] Mask qnt-specific relative differences where\n");
451 printf
452 (" |q1| + |q2| is smaller than or equal to this\n");
453 printf(" threshold in the qnt unit [default: 0].\n");
454 printf("\nFurther information:\n");
455 printf(" Manual: https://slcs-jsc.github.io/mptrac/\n");
456}
457
458
459/*****************************************************************************/
460
463 const double *data,
464 int np,
465 const char *param,
466 double *work) {
467
468 int n = 0;
469 for (int i = 0; i < np; i++)
470 if (isfinite(data[i]))
471 work[n++] = data[i];
472
473 if (n <= 0)
474 return GSL_NAN;
475
476 if (strcasecmp(param, "mean") == 0)
477 return gsl_stats_mean(work, 1, (size_t) n);
478 if (strcasecmp(param, "stddev") == 0)
479 return gsl_stats_sd(work, 1, (size_t) n);
480 if (strcasecmp(param, "min") == 0)
481 return gsl_stats_min(work, 1, (size_t) n);
482 if (strcasecmp(param, "max") == 0)
483 return gsl_stats_max(work, 1, (size_t) n);
484 if (strcasecmp(param, "skew") == 0)
485 return gsl_stats_skew(work, 1, (size_t) n);
486 if (strcasecmp(param, "kurt") == 0)
487 return gsl_stats_kurtosis(work, 1, (size_t) n);
488 if (strcasecmp(param, "absdev") == 0)
489 return gsl_stats_absdev_m(work, 1, (size_t) n, 0.0);
490 if (strcasecmp(param, "median") == 0)
491 return gsl_stats_median(work, 1, (size_t) n);
492 if (strcasecmp(param, "mad") == 0)
493 return gsl_stats_mad0(work, 1, (size_t) n, work);
494
495 ERRMSG("Unknown parameter!");
496 return GSL_NAN;
497}
int main(int argc, char *argv[])
Definition: atm_dist.c:46
double finite_stat(const double *data, int np, const char *param, double *work)
Calculate a statistic on finite values only.
Definition: atm_dist.c:462
void usage(void)
Print command-line help.
Definition: atm_dist.c:430
double scan_ctl(const char *filename, int argc, char *argv[], const char *varname, const int arridx, const char *defvalue, char *value)
Scans a control file or command-line arguments for a specified variable.
Definition: mptrac.c:11856
int mptrac_read_atm(const char *filename, const ctl_t *ctl, atm_t *atm)
Reads air parcel data from a specified file into the given atmospheric structure.
Definition: mptrac.c:6088
double time_from_filename(const char *filename, const int offset, const int with_seconds)
Extracts and converts a timestamp from a filename to Julian seconds.
Definition: mptrac.c:12128
void mptrac_read_ctl(const char *filename, int argc, char *argv[], ctl_t *ctl)
Reads control parameters from a configuration file and populates the given structure.
Definition: mptrac.c:6223
void geo2cart(const double z, const double lon, const double lat, double *x)
Converts geographic coordinates (longitude, latitude, altitude) to Cartesian coordinates.
Definition: mptrac.c:2548
MPTRAC library declarations.
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
Definition: mptrac.h:2172
#define USAGE
Print usage information on -h or --help.
Definition: mptrac.h:1979
#define Z(p)
Convert pressure to altitude.
Definition: mptrac.h:2009
#define P(z)
Compute pressure at given altitude.
Definition: mptrac.h:1550
#define NQ
Maximum number of quantities per data point.
Definition: mptrac.h:364
#define ALLOC(ptr, type, n)
Allocate memory for a pointer with error handling.
Definition: mptrac.h:457
#define NP
Maximum number of atmospheric data points.
Definition: mptrac.h:359
#define LOG(level,...)
Print a log message with a specified logging level.
Definition: mptrac.h:2102
#define DIST(a, b)
Calculate the distance between two points in Cartesian coordinates.
Definition: mptrac.h:770
Air parcel data.
Definition: mptrac.h:3311
double time[NP]
Time [s].
Definition: mptrac.h:3317
double lat[NP]
Latitude [deg].
Definition: mptrac.h:3326
double lon[NP]
Longitude [deg].
Definition: mptrac.h:3323
int np
Number of air parcels.
Definition: mptrac.h:3314
double q[NQ][NP]
Quantity data (for various, user-defined attributes).
Definition: mptrac.h:3329
double p[NP]
Pressure [hPa].
Definition: mptrac.h:3320
Control parameters.
Definition: mptrac.h:2260
char qnt_format[NQ][LEN]
Quantity output format.
Definition: mptrac.h:2279
int atm_type
Type of atmospheric data files (0=ASCII, 1=binary, 2=netCDF, 3=CLaMS_traj, 4=CLaMS_pos).
Definition: mptrac.h:3077
char qnt_unit[NQ][LEN]
Quantity units.
Definition: mptrac.h:2276
char qnt_name[NQ][LEN]
Quantity names.
Definition: mptrac.h:2270
int qnt_ens
Quantity array index for ensemble IDs.
Definition: mptrac.h:2285
int met_coord_type
Type of coordinates for meteo data (-1=detect, 0=lat/lon [deg], 1=UTM [m]).
Definition: mptrac.h:2613
int qnt_idx
Quantity array index for air parcel IDs.
Definition: mptrac.h:2282
int nq
Number of quantities.
Definition: mptrac.h:2267