MPTRAC
trac.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-2024 Forschungszentrum Juelich GmbH
18*/
19
25#include "mptrac.h"
26
27#ifdef KPP
28#include "kpp_chem.h"
29#endif
30
31int main(
32 int argc,
33 char *argv[]) {
34
35 ctl_t ctl;
36
37 atm_t *atm;
38
39 cache_t *cache;
40
41 clim_t *clim;
42
43 met_t *met0, *met1;
44
45#ifdef ASYNCIO
46 met_t *met0TMP, *met1TMP, *mets;
47 ctl_t ctlTMP;
48#endif
49
50 FILE *dirlist;
51
52 char dirname[LEN], filename[2 * LEN];
53
54 double *dt, *rs;
55
56 int ntask = -1, rank = 0, size = 1;
57
58 /* Start timers... */
60
61 /* Initialize MPI... */
62#ifdef MPI
63 SELECT_TIMER("MPI_INIT", "INIT", NVTX_CPU);
64 MPI_Init(&argc, &argv);
65 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
66 MPI_Comm_size(MPI_COMM_WORLD, &size);
67#endif
68
69 /* Initialize GPUs... */
70#ifdef _OPENACC
71 SELECT_TIMER("ACC_INIT", "INIT", NVTX_GPU);
72 if (acc_get_num_devices(acc_device_nvidia) <= 0)
73 ERRMSG("Not running on a GPU device!");
74 acc_set_device_num(rank % acc_get_num_devices(acc_device_nvidia),
75 acc_device_nvidia);
76 acc_device_t device_type = acc_get_device_type();
77 acc_init(device_type);
78#endif
79
80 /* Check arguments... */
81 if (argc < 4)
82 ERRMSG("Give parameters: <dirlist> <ctl> <atm_in>");
83
84 /* Open directory list... */
85 if (!(dirlist = fopen(argv[1], "r")))
86 ERRMSG("Cannot open directory list!");
87
88 /* Loop over directories... */
89 while (fscanf(dirlist, "%4999s", dirname) != EOF) {
90
91 /* MPI parallelization... */
92 if ((++ntask) % size != rank)
93 continue;
94#ifdef _OPENACC
95 LOG(1, "Parallelization: ntask= %d | rank= %d | size= %d | acc_dev= %d",
96 ntask, rank, size, acc_get_device_num(device_type));
97#else
98 LOG(1, "Parallelization: ntask= %d | rank= %d | size= %d | acc_dev= nan",
99 ntask, rank, size);
100#endif
101
102 /* ------------------------------------------------------------
103 Initialize model run...
104 ------------------------------------------------------------ */
105
106 /* Allocate... */
107 SELECT_TIMER("ALLOC", "MEMORY", NVTX_CPU);
108 ALLOC(atm, atm_t, 1);
109 ALLOC(cache, cache_t, 1);
110 ALLOC(clim, clim_t, 1);
111 ALLOC(met0, met_t, 1);
112 ALLOC(met1, met_t, 1);
113#ifdef ASYNCIO
114 ALLOC(met0TMP, met_t, 1);
115 ALLOC(met1TMP, met_t, 1);
116#endif
117 ALLOC(dt, double,
118 NP);
119 ALLOC(rs, double,
120 3 * NP + 1);
121
122 /* Create data region on GPUs... */
123#ifdef _OPENACC
124 SELECT_TIMER("CREATE_DATA_REGION", "MEMORY", NVTX_GPU);
125#ifdef ASYNCIO
126#pragma acc enter data create(atm[:1], cache[:1], clim[:1], ctl, ctlTMP, met0[:1], met1[:1], met0TMP[:1], met1TMP[:1], dt[:NP], rs[:3 * NP])
127#else
128#pragma acc enter data create(atm[:1], cache[:1], clim[:1], ctl, met0[:1], met1[:1], dt[:NP], rs[:3 * NP])
129#endif
130#endif
131
132 /* Read control parameters... */
133 sprintf(filename, "%s/%s", dirname, argv[2]);
134 read_ctl(filename, argc, argv, &ctl);
135
136 /* Read climatological data... */
137 read_clim(&ctl, clim);
138
139 /* Read atmospheric data... */
140 sprintf(filename, "%s/%s", dirname, argv[3]);
141 if (!read_atm(filename, &ctl, atm))
142 ERRMSG("Cannot open file!");
143
144 /* Initialize timesteps... */
145 module_timesteps_init(&ctl, atm);
146
147 /* Initialize random number generator... */
148 module_rng_init(ntask);
149
150 /* Initialize meteo data... */
151#ifdef ASYNCIO
152 ctlTMP = ctl;
153#endif
154 get_met(&ctl, clim, ctl.t_start, &met0, &met1);
155 if (ctl.dt_mod > fabs(met0->lon[1] - met0->lon[0]) * 111132. / 150.)
156 WARN("Violation of CFL criterion! Check DT_MOD!");
157#ifdef ASYNCIO
158 get_met(&ctlTMP, clim, ctlTMP.t_start, &met0TMP, &met1TMP);
159#endif
160
161 /* Initialize isosurface data... */
162 if (ctl.isosurf >= 1 && ctl.isosurf <= 4)
163 module_isosurf_init(&ctl, met0, met1, atm, cache);
164
165 /* Initialize advection... */
166 module_advect_init(&ctl, met0, met1, atm);
167
168 /* Initialize chemistry... */
169 module_chem_init(&ctl, clim, met0, met1, atm);
170
171 /* Update GPU... */
172#ifdef _OPENACC
173 SELECT_TIMER("UPDATE_DEVICE", "MEMORY", NVTX_H2D);
174#pragma acc update device(atm[:1], cache[:1], clim[:1], ctl)
175#endif
176
177 /* ------------------------------------------------------------
178 Loop over timesteps...
179 ------------------------------------------------------------ */
180
181 /* Loop over timesteps... */
182#ifdef ASYNCIO
183 omp_set_nested(1);
184 int ompTrdnum = omp_get_max_threads();
185#endif
186 for (double t = ctl.t_start;
187 ctl.direction * (t - ctl.t_stop) < ctl.dt_mod;
188 t += ctl.direction * ctl.dt_mod) {
189#ifdef ASYNCIO
190#pragma omp parallel num_threads(2)
191 {
192#endif
193
194 /* Adjust length of final time step... */
195 if (ctl.direction * (t - ctl.t_stop) > 0)
196 t = ctl.t_stop;
197
198 /* Set time steps of air parcels... */
199 module_timesteps(&ctl, met0, atm, dt, t);
200
201 /* Get meteo data... */
202#ifdef ASYNCIO
203#pragma acc wait(5)
204#pragma omp barrier
205 if (omp_get_thread_num() == 0) {
206
207 /* Pointer swap... */
208 if (t != ctl.t_start) {
209 mets = met0;
210 met0 = met0TMP;
211 met0TMP = mets;
212
213 mets = met1;
214 met1 = met1TMP;
215 met1TMP = mets;
216 }
217#endif
218#ifndef ASYNCIO
219 if (t != ctl.t_start)
220 get_met(&ctl, clim, t, &met0, &met1);
221#endif
222
223 /* Sort particles... */
224 if (ctl.sort_dt > 0 && fmod(t, ctl.sort_dt) == 0)
225 module_sort(&ctl, met0, atm);
226
227 /* Check positions (initial)... */
228 module_position(&ctl, met0, met1, atm, dt);
229
230 /* Advection... */
231 if (ctl.advect > 0)
232 module_advect(&ctl, met0, met1, atm, dt);
233
234 /* Turbulent diffusion... */
235 if (ctl.turb_dx_trop > 0 || ctl.turb_dz_trop > 0
236 || ctl.turb_dx_strat > 0 || ctl.turb_dz_strat > 0)
237 module_diffusion_turb(&ctl, clim, atm, dt, rs);
238
239 /* Mesoscale diffusion... */
240 if (ctl.turb_mesox > 0 || ctl.turb_mesoz > 0)
241 module_diffusion_meso(&ctl, met0, met1, atm, cache, dt, rs);
242
243 /* Convection... */
244 if (ctl.conv_cape >= 0
245 && (ctl.conv_dt <= 0 || fmod(t, ctl.conv_dt) == 0))
246 module_convection(&ctl, met0, met1, atm, dt, rs);
247
248 /* Sedimentation... */
249 if (ctl.qnt_rp >= 0 && ctl.qnt_rhop >= 0)
250 module_sedi(&ctl, met0, met1, atm, dt);
251
252 /* Isosurface... */
253 if (ctl.isosurf >= 1 && ctl.isosurf <= 4)
254 module_isosurf(&ctl, met0, met1, atm, cache, dt);
255
256 /* Check positions (final)... */
257 module_position(&ctl, met0, met1, atm, dt);
258
259 /* Interpolate meteo data... */
260 if (ctl.met_dt_out > 0
261 && (ctl.met_dt_out < ctl.dt_mod
262 || fmod(t, ctl.met_dt_out) == 0))
263 module_meteo(&ctl, clim, met0, met1, atm, dt);
264
265 /* Check boundary conditions (initial)... */
266 if ((ctl.bound_lat0 < ctl.bound_lat1)
267 && (ctl.bound_p0 > ctl.bound_p1))
268 module_bound_cond(&ctl, clim, met0, met1, atm, dt);
269
270 /* Initialize quantity of total loss rate... */
271 if (ctl.qnt_loss_rate >= 0) {
272 PARTICLE_LOOP(0, atm->np, 1, "acc data present(ctl, atm)") {
273 atm->q[ctl.qnt_loss_rate][ip] = 0;
274 }
275 }
276
277 /* Decay of particle mass... */
278 if (ctl.tdec_trop > 0 && ctl.tdec_strat > 0)
279 module_decay(&ctl, clim, atm, dt);
280
281 /* Interparcel mixing... */
282 if (ctl.mixing_trop >= 0 && ctl.mixing_strat >= 0
283 && (ctl.mixing_dt <= 0 || fmod(t, ctl.mixing_dt) == 0))
284 module_mixing(&ctl, clim, atm, t);
285
286 /* Calculate the tracer vmr in the chemistry grid... */
287 if (ctl.oh_chem_reaction != 0 || ctl.h2o2_chem_reaction != 0
288 || (ctl.kpp_chem && fmod(t, ctl.dt_kpp) == 0))
289 module_chemgrid(&ctl, met0, met1, atm, t);
290
291 /* OH chemistry... */
292 if (ctl.oh_chem_reaction != 0)
293 module_oh_chem(&ctl, clim, met0, met1, atm, dt);
294
295 /* H2O2 chemistry (for SO2 aqueous phase oxidation)... */
296 if (ctl.h2o2_chem_reaction != 0)
297 module_h2o2_chem(&ctl, clim, met0, met1, atm, dt);
298
299 /* First-order tracer chemistry... */
300 if (ctl.tracer_chem)
301 module_tracer_chem(&ctl, clim, met0, met1, atm, dt);
302
303 /* KPP chemistry... */
304 if (ctl.kpp_chem && fmod(t, ctl.dt_kpp) == 0) {
305#ifdef KPP
306 module_kpp_chem(&ctl, clim, met0, met1, atm, dt);
307#else
308 ERRMSG("Code was compiled without KPP!");
309#endif
310 }
311
312 /* Wet deposition... */
313 if ((ctl.wet_depo_ic_a > 0 || ctl.wet_depo_ic_h[0] > 0)
314 && (ctl.wet_depo_bc_a > 0 || ctl.wet_depo_bc_h[0] > 0))
315 module_wet_deposition(&ctl, met0, met1, atm, dt);
316
317 /* Dry deposition... */
318 if (ctl.dry_depo_vdep > 0)
319 module_dry_deposition(&ctl, met0, met1, atm, dt);
320
321 /* Check boundary conditions (final)... */
322 if ((ctl.bound_lat0 < ctl.bound_lat1)
323 && (ctl.bound_p0 > ctl.bound_p1))
324 module_bound_cond(&ctl, clim, met0, met1, atm, dt);
325
326 /* Write output... */
327 write_output(dirname, &ctl, met0, met1, atm, t);
328#ifdef ASYNCIO
329 } else {
330 omp_set_num_threads(ompTrdnum);
331 if (ctl.direction * (t - ctl.t_stop + ctl.direction * ctl.dt_mod) <
332 ctl.dt_mod)
333 get_met(&ctl, clim, t + (ctl.direction * ctl.dt_mod), &met0TMP,
334 &met1TMP);
335 }
336 }
337#endif
338 }
339
340#ifdef ASYNCIO
341 omp_set_num_threads(ompTrdnum);
342#endif
343
344 /* ------------------------------------------------------------
345 Finalize model run...
346 ------------------------------------------------------------ */
347
348 /* Flush output buffer... */
349 fflush(NULL);
350
351 /* Report problem size... */
352 LOG(1, "SIZE_NP = %d", atm->np);
353 LOG(1, "SIZE_MPI_TASKS = %d", size);
354 LOG(1, "SIZE_OMP_THREADS = %d", omp_get_max_threads());
355#ifdef _OPENACC
356 LOG(1, "SIZE_ACC_DEVICES = %d", acc_get_num_devices(acc_device_nvidia));
357#else
358 LOG(1, "SIZE_ACC_DEVICES = %d", 0);
359#endif
360
361 /* Report memory usage... */
362 LOG(1, "MEMORY_ATM = %g MByte", sizeof(atm_t) / 1024. / 1024.);
363 LOG(1, "MEMORY_CACHE = %g MByte", sizeof(cache_t) / 1024. / 1024.);
364 LOG(1, "MEMORY_CLIM = %g MByte", sizeof(clim_t) / 1024. / 1024.);
365 LOG(1, "MEMORY_METEO = %g MByte", 2 * sizeof(met_t) / 1024. / 1024.);
366 LOG(1, "MEMORY_DYNAMIC = %g MByte", (3 * NP * sizeof(int)
367 + 4 * NP * sizeof(double)
368 + EX * EY * EP * sizeof(float)) /
369 1024. / 1024.);
370 LOG(1, "MEMORY_STATIC = %g MByte", (EX * EY * EP * sizeof(float)) /
371 1024. / 1024.);
372
373 /* Delete data region on GPUs... */
374#ifdef _OPENACC
375 SELECT_TIMER("DELETE_DATA_REGION", "MEMORY", NVTX_GPU);
376#ifdef ASYNCIO
377#pragma acc exit data delete (ctl, atm, cache, clim, met0, met1, dt, rs, met0TMP, met1TMP)
378#else
379#pragma acc exit data delete (ctl, atm, cache, clim, met0, met1, dt, rs)
380#endif
381#endif
382
383 /* Free... */
384 SELECT_TIMER("FREE", "MEMORY", NVTX_CPU);
385 free(atm);
386 free(cache);
387 free(clim);
388 free(met0);
389 free(met1);
390#ifdef ASYNCIO
391 free(met0TMP);
392 free(met1TMP);
393#endif
394 free(dt);
395 free(rs);
396 }
397
398 /* Report timers... */
400
401 /* Finalize MPI... */
402#ifdef MPI
403 MPI_Finalize();
404#endif
405
406 /* Stop timers... */
408
409 return EXIT_SUCCESS;
410}
void module_chem_init(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm)
Initializes the chemistry modules by setting atmospheric composition.
Definition: mptrac.c:2615
void module_timesteps(ctl_t *ctl, met_t *met0, atm_t *atm, double *dt, double t)
Calculate time steps for air parcels based on specified conditions.
Definition: mptrac.c:3888
int read_atm(const char *filename, ctl_t *ctl, atm_t *atm)
Reads air parcel data from a specified file into the given atmospheric structure.
Definition: mptrac.c:4183
void module_sedi(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Simulate sedimentation of particles in the atmosphere.
Definition: mptrac.c:3763
void module_advect_init(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm)
Initializes the advection module by setting up pressure fields.
Definition: mptrac.c:2350
void read_clim(ctl_t *ctl, clim_t *clim)
Reads various climatological data and populates the given climatology structure.
Definition: mptrac.c:4441
void module_wet_deposition(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Perform wet deposition calculations for air parcels.
Definition: mptrac.c:4024
void module_sort(ctl_t *ctl, met_t *met0, atm_t *atm)
Sort particles according to box index.
Definition: mptrac.c:3792
void module_rng_init(int ntask)
Initialize random number generators for parallel tasks.
Definition: mptrac.c:3628
void module_tracer_chem(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Simulate chemical reactions involving long-lived atmospheric tracers.
Definition: mptrac.c:3956
void module_advect(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Performs the advection of atmospheric particles using meteorological data.
Definition: mptrac.c:2192
void module_bound_cond(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Apply boundary conditions to particles based on meteorological and climatological data.
Definition: mptrac.c:2370
void module_timesteps_init(ctl_t *ctl, atm_t *atm)
Initialize start time and time interval for time-stepping.
Definition: mptrac.c:3925
void module_h2o2_chem(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Perform chemical reactions involving H2O2 within cloud particles.
Definition: mptrac.c:2946
void module_mixing(ctl_t *ctl, clim_t *clim, atm_t *atm, double t)
Update atmospheric properties through interparcel mixing.
Definition: mptrac.c:3302
void module_position(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Update the positions and pressure levels of atmospheric particles.
Definition: mptrac.c:3569
void module_meteo(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Update atmospheric properties using meteorological data.
Definition: mptrac.c:3202
void get_met(ctl_t *ctl, clim_t *clim, double t, met_t **met0, met_t **met1)
Retrieves meteorological data for the specified time.
Definition: mptrac.c:955
void module_oh_chem(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Perform hydroxyl chemistry calculations for atmospheric particles.
Definition: mptrac.c:3487
void module_chemgrid(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double tt)
Calculate grid data for chemistry modules.
Definition: mptrac.c:2465
void module_isosurf_init(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, cache_t *cache)
Initialize the isosurface module based on atmospheric data.
Definition: mptrac.c:3026
void module_dry_deposition(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt)
Simulate dry deposition of atmospheric particles.
Definition: mptrac.c:2883
void module_decay(ctl_t *ctl, clim_t *clim, atm_t *atm, double *dt)
Simulate exponential decay processes for atmospheric particles.
Definition: mptrac.c:2724
void 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:4789
void module_isosurf(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, cache_t *cache, double *dt)
Apply the isosurface module to adjust atmospheric properties.
Definition: mptrac.c:3090
void module_convection(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double *dt, double *rs)
Simulate convective processes for atmospheric particles.
Definition: mptrac.c:2652
void module_diffusion_meso(ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, cache_t *cache, double *dt, double *rs)
Simulate mesoscale diffusion for atmospheric particles.
Definition: mptrac.c:2763
void module_diffusion_turb(ctl_t *ctl, clim_t *clim, atm_t *atm, double *dt, double *rs)
Simulate turbulent diffusion for atmospheric particles.
Definition: mptrac.c:2843
void write_output(const char *dirname, ctl_t *ctl, met_t *met0, met_t *met1, atm_t *atm, double t)
Writes various types of output data to files in a specified directory.
Definition: mptrac.c:9757
MPTRAC library declarations.
#define LEN
Maximum length of ASCII data lines.
Definition: mptrac.h:236
void module_kpp_chem(ctl_t *ctl, clim_t *clim, met_t *met0, met_t *met1, atm_t *atm, double *dt)
KPP chemistry module.
#define PARTICLE_LOOP(ip0, ip1, check_dt,...)
Loop over particle indices with OpenACC acceleration.
Definition: mptrac.h:1225
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
Definition: mptrac.h:1881
#define EY
Maximum number of latitudes for meteo data.
Definition: mptrac.h:266
#define EX
Maximum number of longitudes for meteo data.
Definition: mptrac.h:261
#define WARN(...)
Print a warning message with contextual information.
Definition: mptrac.h:1848
#define ALLOC(ptr, type, n)
Allocate memory for a pointer with error handling.
Definition: mptrac.h:344
#define START_TIMERS
Starts a timer for tracking.
Definition: mptrac.h:1980
#define NP
Maximum number of atmospheric data points.
Definition: mptrac.h:241
#define SELECT_TIMER(id, group, color)
Select and start a timer with specific attributes.
Definition: mptrac.h:1961
#define PRINT_TIMERS
Print the current state of all timers.
Definition: mptrac.h:1940
#define LOG(level,...)
Print a log message with a specified logging level.
Definition: mptrac.h:1811
#define EP
Maximum number of pressure levels for meteo data.
Definition: mptrac.h:256
#define STOP_TIMERS
Stop the current timer.
Definition: mptrac.h:1995
Air parcel data.
Definition: mptrac.h:3068
int np
Number of air parcels.
Definition: mptrac.h:3071
double q[NQ][NP]
Quantity data (for various, user-defined attributes).
Definition: mptrac.h:3086
Cache data structure.
Definition: mptrac.h:3096
Climatological data.
Definition: mptrac.h:3230
Control parameters.
Definition: mptrac.h:2135
double wet_depo_ic_a
Coefficient A for wet deposition in cloud (exponential form).
Definition: mptrac.h:2814
int qnt_rhop
Quantity array index for particle density.
Definition: mptrac.h:2193
double mixing_trop
Interparcel exchange parameter for mixing in the troposphere.
Definition: mptrac.h:2724
double sort_dt
Time step for sorting of particle data [s].
Definition: mptrac.h:2585
double wet_depo_bc_a
Coefficient A for wet deposition below cloud (exponential form).
Definition: mptrac.h:2808
double conv_cape
CAPE threshold for convection module [J/kg].
Definition: mptrac.h:2622
int direction
Direction flag (1=forward calculation, -1=backward calculation).
Definition: mptrac.h:2439
double met_dt_out
Time step for sampling of meteo data along trajectories [s].
Definition: mptrac.h:2572
double turb_dz_trop
Vertical turbulent diffusion coefficient (troposphere) [m^2/s].
Definition: mptrac.h:2610
double turb_mesoz
Vertical scaling factor for mesoscale wind fluctuations.
Definition: mptrac.h:2619
int qnt_loss_rate
Quantity array index for total loss rate.
Definition: mptrac.h:2334
double turb_dx_strat
Horizontal turbulent diffusion coefficient (stratosphere) [m^2/s].
Definition: mptrac.h:2607
double bound_lat1
Boundary conditions maximum longitude [deg].
Definition: mptrac.h:2652
double turb_dx_trop
Horizontal turbulent diffusion coefficient (troposphere) [m^2/s].
Definition: mptrac.h:2604
int isosurf
Isosurface parameter (0=none, 1=pressure, 2=density, 3=theta, 4=balloon).
Definition: mptrac.h:2589
double bound_p1
Boundary conditions top pressure [hPa].
Definition: mptrac.h:2658
double turb_mesox
Horizontal scaling factor for mesoscale wind fluctuations.
Definition: mptrac.h:2616
int qnt_rp
Quantity array index for particle radius.
Definition: mptrac.h:2190
double mixing_strat
Interparcel exchange parameter for mixing in the stratosphere.
Definition: mptrac.h:2727
double dt_kpp
Time step for KPP chemistry [s].
Definition: mptrac.h:2799
double t_stop
Stop time of simulation [s].
Definition: mptrac.h:2445
double conv_dt
Time interval for convection module [s].
Definition: mptrac.h:2628
double bound_lat0
Boundary conditions minimum longitude [deg].
Definition: mptrac.h:2649
int tracer_chem
Switch for first order tracer chemistry module (0=off, 1=on).
Definition: mptrac.h:2802
double dt_mod
Time step of simulation [s].
Definition: mptrac.h:2448
int oh_chem_reaction
Reaction type for OH chemistry (0=none, 2=bimolecular, 3=termolecular).
Definition: mptrac.h:2784
double wet_depo_ic_h[3]
Coefficients for wet deposition in cloud (Henry's law: Hb, Cb, pH).
Definition: mptrac.h:2820
double tdec_strat
Life time of particles in the stratosphere [s].
Definition: mptrac.h:2682
int advect
Advection scheme (0=off, 1=Euler, 2=midpoint, 4=Runge-Kutta).
Definition: mptrac.h:2595
int kpp_chem
Switch for KPP chemistry module (0=off, 1=on).
Definition: mptrac.h:2796
double wet_depo_bc_h[2]
Coefficients for wet deposition below cloud (Henry's law: Hb, Cb).
Definition: mptrac.h:2823
double bound_p0
Boundary conditions bottom pressure [hPa].
Definition: mptrac.h:2655
int h2o2_chem_reaction
Reaction type for H2O2 chemistry (0=none, 1=SO2).
Definition: mptrac.h:2793
double dry_depo_vdep
Dry deposition velocity [m/s].
Definition: mptrac.h:2835
double mixing_dt
Time interval for mixing [s].
Definition: mptrac.h:2721
double turb_dz_strat
Vertical turbulent diffusion coefficient (stratosphere) [m^2/s].
Definition: mptrac.h:2613
double t_start
Start time of simulation [s].
Definition: mptrac.h:2442
double tdec_trop
Life time of particles in the troposphere [s].
Definition: mptrac.h:2679
Meteo data structure.
Definition: mptrac.h:3289
double lon[EX]
Longitude [deg].
Definition: mptrac.h:3307
int main(int argc, char *argv[])
Definition: trac.c:31