1 | !> @file module_interface.f90 |
---|
2 | !------------------------------------------------------------------------------! |
---|
3 | ! This file is part of PALM. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
6 | ! terms of the GNU General Public License as published by the Free Software |
---|
7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
8 | ! version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: module_interface.f90 4361 2020-01-07 12:22:38Z monakurppa $ |
---|
27 | ! Remove unused arrays in pmc_rrd_local |
---|
28 | ! |
---|
29 | ! 4360 2020-01-07 11:25:50Z suehring |
---|
30 | ! Add pcm_rrd_local and pcm_wrd_local |
---|
31 | ! |
---|
32 | ! 4331 2019-12-10 18:25:02Z suehring |
---|
33 | ! Change interface for doq_check_data_output, in order to perform further |
---|
34 | ! output checks. |
---|
35 | ! |
---|
36 | ! 4281 2019-10-29 15:15:39Z schwenkel |
---|
37 | ! Added dynamics boundary conditions |
---|
38 | ! |
---|
39 | ! 4272 2019-10-23 15:18:57Z schwenkel |
---|
40 | ! Further modularization of boundary conditions: moved boundary conditions to |
---|
41 | ! respective modules |
---|
42 | ! |
---|
43 | ! 4268 2019-10-17 11:29:38Z schwenkel |
---|
44 | ! Introduction of module_interface_boundary_conditions |
---|
45 | ! |
---|
46 | ! 4182 2019-08-22 15:20:23Z scharf |
---|
47 | ! Corrected "Former revisions" section |
---|
48 | ! |
---|
49 | ! 4173 2019-08-20 12:04:06Z gronemeier |
---|
50 | ! add vdi_internal_controls |
---|
51 | ! |
---|
52 | ! 4157 2019-08-14 09:19:12Z suehring |
---|
53 | ! Call doq_init from module interface |
---|
54 | ! |
---|
55 | ! 4132 2019-08-02 12:34:17Z suehring |
---|
56 | ! Bugfix in masked data output for diagnostic quantities |
---|
57 | ! |
---|
58 | ! 4131 2019-08-02 11:06:18Z monakurppa |
---|
59 | ! Add output of 3D plant-canopy outputs (merge from branch resler) |
---|
60 | ! |
---|
61 | ! 4048 2019-06-21 21:00:21Z knoop |
---|
62 | ! Moved turbulence_closure_mod calls into this module_interface |
---|
63 | ! |
---|
64 | ! 4047 2019-06-21 18:58:09Z knoop |
---|
65 | ! Introduction of the dynamics module |
---|
66 | ! |
---|
67 | ! 4039 2019-06-18 10:32:41Z suehring |
---|
68 | ! Introduce diagnostic output |
---|
69 | ! |
---|
70 | ! 4028 2019-06-13 12:21:37Z schwenkel |
---|
71 | ! Further modularization of particle code components |
---|
72 | ! |
---|
73 | ! 4017 2019-06-06 12:16:46Z schwenkel |
---|
74 | ! local_pf need INTENT(INOUT) attribute rather than INTENT(OUT). This is |
---|
75 | ! because INTENT(OUT) sets the array to not-defined. Especially for outputs that |
---|
76 | ! are not defined everywhere, e.g. land-surface outputs, this will be |
---|
77 | ! problematic as NaN will be output. |
---|
78 | ! |
---|
79 | ! 3987 2019-05-22 09:52:13Z kanani |
---|
80 | ! Introduce switchable DEBUG file output via debug_message routine |
---|
81 | ! |
---|
82 | ! 3956 2019-05-07 12:32:52Z monakurppa |
---|
83 | ! - Added calls for salsa_non_advective_processes and |
---|
84 | ! salsa_exchange_horiz_bounds |
---|
85 | ! - Moved the call for salsa_data_output_2d/3d before that of |
---|
86 | ! radiation_data_output_2d/3d. radiation_data_output_2d/3d tries to read a |
---|
87 | ! salsa output variable and encounters a segmentation fault for "Ntot" due |
---|
88 | ! to the shortoutput name |
---|
89 | ! |
---|
90 | ! 3931 2019-04-24 16:34:28Z schwenkel |
---|
91 | ! Changed non_transport_physics to non_advective_processes |
---|
92 | ! |
---|
93 | ! 3930 2019-04-24 14:57:18Z forkel |
---|
94 | ! Correct/complete module_interface introduction for chemistry model |
---|
95 | ! |
---|
96 | ! 3887 2019 -04-12 08:47:41Z schwenkel |
---|
97 | ! Changes related to global restructuring of location messages and introduction |
---|
98 | ! of additional debug messages |
---|
99 | ! |
---|
100 | ! 3880 2019 -04-08 21:43:02Z knoop |
---|
101 | ! Add a call for salsa_prognostic_equations |
---|
102 | ! |
---|
103 | ! 3840 2019-03-29 10:35:52Z knoop |
---|
104 | ! bugfix: intent of dummy arguments changed to inout |
---|
105 | ! |
---|
106 | ! 3770 2019-02-28 11:22:32Z moh.hefny |
---|
107 | ! removed unused variables in module_interface_check_data_output_ts |
---|
108 | ! |
---|
109 | ! 3767 08:18:02Z raasch |
---|
110 | ! unused variable file_index removed from subroutine parameter list |
---|
111 | ! |
---|
112 | ! 3766 2019-02-26 16:23:41Z raasch |
---|
113 | ! first argument removed from module_interface_rrd_*, statement added to avoid |
---|
114 | ! compiler warning about unused variable, file reformatted with respect to coding |
---|
115 | ! standards |
---|
116 | ! |
---|
117 | ! 3762 2019-02-25 16:54:16Z suehring |
---|
118 | ! only pass required arguments to surface_data_output_rrd_local |
---|
119 | ! |
---|
120 | ! 3747 2019-02-16 15:15:23Z gronemeier |
---|
121 | ! Call user_init_arrays |
---|
122 | ! |
---|
123 | ! 3745 2019-02-15 18:57:56Z suehring |
---|
124 | ! Add indoor model |
---|
125 | ! |
---|
126 | ! 3744 2019-02-15 18:38:58Z suehring |
---|
127 | ! Removed bio_check_parameters as the method is empty. |
---|
128 | ! |
---|
129 | ! 3735 2019-02-12 09:52:40Z dom_dwd_user |
---|
130 | ! Accepting variable j from check_parameters and passing it to |
---|
131 | ! bio_check_data_output |
---|
132 | ! Add required restart data for surface output module |
---|
133 | ! |
---|
134 | ! 3731 2019-02-11 13:06:27Z suehring |
---|
135 | ! Add check_parameters routine for virtual measurements |
---|
136 | ! |
---|
137 | ! 3711 2019-01-31 13:44:26Z knoop |
---|
138 | ! Introduced module_interface_init_checks for post-init checks |
---|
139 | ! |
---|
140 | ! 3705 2019-01-29 19:56:39Z suehring |
---|
141 | ! Add last_actions for virtual measurements |
---|
142 | ! |
---|
143 | ! 3704 2019-01-29 19:51:41Z suehring |
---|
144 | ! Some interface calls moved to module_interface + cleanup |
---|
145 | ! |
---|
146 | ! 3684 2019-01-20 20:20:58Z knoop |
---|
147 | ! Bugfix: made unit intend INOUT |
---|
148 | ! |
---|
149 | ! 3650 2019-01-04 13:01:33Z kanani |
---|
150 | ! Add restart routines for biometeorology |
---|
151 | ! |
---|
152 | ! 3649 2019-01-02 16:52:21Z suehring |
---|
153 | ! Initialize strings, in order to avoid compiler warnings for non-initialized |
---|
154 | ! characters with intent(out) attribute |
---|
155 | ! |
---|
156 | ! 3648 2019-01-02 16:35:46Z suehring |
---|
157 | ! 3641 2018-12-23 22:10:01Z knoop |
---|
158 | ! Initial implementation of the PALM module interface |
---|
159 | ! |
---|
160 | ! |
---|
161 | ! Description: |
---|
162 | ! ------------ |
---|
163 | !> This is the interface between the PALM model core and all its modules. |
---|
164 | !> |
---|
165 | !> @todo Re-format module to be consistent with coding standard |
---|
166 | !------------------------------------------------------------------------------! |
---|
167 | MODULE module_interface |
---|
168 | |
---|
169 | USE indices, & |
---|
170 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt |
---|
171 | |
---|
172 | USE kinds |
---|
173 | |
---|
174 | ! |
---|
175 | !-- load module-specific control parameters. |
---|
176 | !-- ToDo: move all of them to respective module or a dedicated central module |
---|
177 | |
---|
178 | USE dynamics_mod, & |
---|
179 | ONLY: dynamics_parin, & |
---|
180 | dynamics_check_parameters, & |
---|
181 | dynamics_check_data_output_ts, & |
---|
182 | dynamics_check_data_output_pr, & |
---|
183 | dynamics_check_data_output, & |
---|
184 | dynamics_init_masks, & |
---|
185 | dynamics_define_netcdf_grid, & |
---|
186 | dynamics_init_arrays, & |
---|
187 | dynamics_init, & |
---|
188 | dynamics_init_checks, & |
---|
189 | dynamics_header, & |
---|
190 | dynamics_actions, & |
---|
191 | dynamics_non_advective_processes, & |
---|
192 | dynamics_exchange_horiz, & |
---|
193 | dynamics_prognostic_equations, & |
---|
194 | dynamics_boundary_conditions, & |
---|
195 | dynamics_swap_timelevel, & |
---|
196 | dynamics_3d_data_averaging, & |
---|
197 | dynamics_data_output_2d, & |
---|
198 | dynamics_data_output_3d, & |
---|
199 | dynamics_statistics, & |
---|
200 | dynamics_rrd_global, & |
---|
201 | dynamics_rrd_local, & |
---|
202 | dynamics_wrd_global, & |
---|
203 | dynamics_wrd_local, & |
---|
204 | dynamics_last_actions |
---|
205 | |
---|
206 | USE turbulence_closure_mod, & |
---|
207 | ONLY: tcm_check_parameters, & |
---|
208 | tcm_check_data_output, & |
---|
209 | tcm_init_arrays, & |
---|
210 | tcm_init, & |
---|
211 | tcm_actions, & |
---|
212 | tcm_prognostic_equations, & |
---|
213 | tcm_boundary_conds, & |
---|
214 | tcm_swap_timelevel, & |
---|
215 | tcm_3d_data_averaging, & |
---|
216 | tcm_data_output_2d, & |
---|
217 | tcm_data_output_3d |
---|
218 | |
---|
219 | USE control_parameters, & |
---|
220 | ONLY: air_chemistry, & |
---|
221 | biometeorology, & |
---|
222 | debug_output, & |
---|
223 | debug_output_timestep, & |
---|
224 | indoor_model, & |
---|
225 | land_surface, & |
---|
226 | large_scale_forcing, & |
---|
227 | nesting_offline, & |
---|
228 | nudging, & |
---|
229 | ocean_mode, & |
---|
230 | plant_canopy, & |
---|
231 | salsa, & |
---|
232 | surface_output, & |
---|
233 | syn_turb_gen, & |
---|
234 | urban_surface, & |
---|
235 | vdi_checks, & |
---|
236 | virtual_flight, & |
---|
237 | virtual_measurement, & |
---|
238 | wind_turbine |
---|
239 | |
---|
240 | ! |
---|
241 | !-- load interface routines of all PALM modules |
---|
242 | USE biometeorology_mod, & |
---|
243 | ONLY: bio_parin, & |
---|
244 | bio_check_data_output, & |
---|
245 | bio_init, & |
---|
246 | bio_init_checks, & |
---|
247 | bio_header, & |
---|
248 | bio_3d_data_averaging, & |
---|
249 | bio_data_output_2d, & |
---|
250 | bio_data_output_3d, & |
---|
251 | bio_rrd_global, & |
---|
252 | bio_rrd_local, & |
---|
253 | bio_wrd_global, & |
---|
254 | bio_wrd_local |
---|
255 | |
---|
256 | USE bulk_cloud_model_mod, & |
---|
257 | ONLY: bulk_cloud_model, & |
---|
258 | bcm_parin, & |
---|
259 | bcm_check_parameters, & |
---|
260 | bcm_check_data_output_pr, & |
---|
261 | bcm_check_data_output, & |
---|
262 | bcm_init_arrays, & |
---|
263 | bcm_init, & |
---|
264 | bcm_header, & |
---|
265 | bcm_actions, & |
---|
266 | bcm_non_advective_processes, & |
---|
267 | bcm_exchange_horiz, & |
---|
268 | bcm_prognostic_equations, & |
---|
269 | bcm_boundary_conditions, & |
---|
270 | bcm_swap_timelevel, & |
---|
271 | bcm_3d_data_averaging, & |
---|
272 | bcm_data_output_2d, & |
---|
273 | bcm_data_output_3d, & |
---|
274 | bcm_rrd_global, & |
---|
275 | bcm_wrd_global, & |
---|
276 | bcm_rrd_local, & |
---|
277 | bcm_wrd_local |
---|
278 | |
---|
279 | USE chemistry_model_mod, & |
---|
280 | ONLY: chem_parin, & |
---|
281 | chem_check_parameters, & |
---|
282 | chem_check_data_output_pr, & |
---|
283 | chem_check_data_output, & |
---|
284 | chem_exchange_horiz_bounds, & |
---|
285 | chem_init_arrays, & |
---|
286 | chem_init, & |
---|
287 | chem_header, & |
---|
288 | chem_actions, & |
---|
289 | chem_non_advective_processes, & |
---|
290 | chem_prognostic_equations, & |
---|
291 | chem_boundary_conditions, & |
---|
292 | chem_swap_timelevel, & |
---|
293 | chem_3d_data_averaging, & |
---|
294 | chem_data_output_2d, & |
---|
295 | chem_data_output_3d, & |
---|
296 | chem_statistics, & |
---|
297 | chem_rrd_local, & |
---|
298 | chem_wrd_local |
---|
299 | |
---|
300 | USE diagnostic_output_quantities_mod, & |
---|
301 | ONLY: doq_3d_data_averaging, & |
---|
302 | doq_check_data_output, & |
---|
303 | doq_define_netcdf_grid, & |
---|
304 | doq_init, & |
---|
305 | doq_output_2d, & |
---|
306 | doq_output_3d, & |
---|
307 | doq_wrd_local |
---|
308 | ! doq_rrd_local, & |
---|
309 | |
---|
310 | USE flight_mod, & |
---|
311 | ONLY: flight_parin, & |
---|
312 | flight_header, & |
---|
313 | flight_init, & |
---|
314 | flight_rrd_global, & |
---|
315 | flight_wrd_global |
---|
316 | |
---|
317 | USE gust_mod, & |
---|
318 | ONLY: gust_module_enabled, & |
---|
319 | gust_parin, & |
---|
320 | gust_check_parameters, & |
---|
321 | gust_check_data_output_pr, & |
---|
322 | gust_check_data_output, & |
---|
323 | gust_init_arrays, & |
---|
324 | gust_init, & |
---|
325 | gust_header, & |
---|
326 | gust_actions, & |
---|
327 | gust_prognostic_equations, & |
---|
328 | gust_swap_timelevel, & |
---|
329 | gust_3d_data_averaging, & |
---|
330 | gust_data_output_2d, & |
---|
331 | gust_data_output_3d, & |
---|
332 | gust_statistics, & |
---|
333 | gust_rrd_global, & |
---|
334 | gust_wrd_global, & |
---|
335 | gust_rrd_local, & |
---|
336 | gust_wrd_local |
---|
337 | |
---|
338 | USE indoor_model_mod, & |
---|
339 | ONLY: im_parin, & |
---|
340 | im_check_data_output, & |
---|
341 | im_check_parameters, & |
---|
342 | im_data_output_3d, & |
---|
343 | im_init |
---|
344 | |
---|
345 | USE lagrangian_particle_model_mod, & |
---|
346 | ONLY: lpm_parin, & |
---|
347 | lpm_header, & |
---|
348 | lpm_check_parameters, & |
---|
349 | lpm_init_arrays, & |
---|
350 | lpm_init, & |
---|
351 | lpm_actions, & |
---|
352 | lpm_rrd_global, & |
---|
353 | lpm_rrd_local, & |
---|
354 | lpm_wrd_local, & |
---|
355 | lpm_wrd_global |
---|
356 | |
---|
357 | USE land_surface_model_mod, & |
---|
358 | ONLY: lsm_parin, & |
---|
359 | lsm_check_parameters, & |
---|
360 | lsm_check_data_output_pr, & |
---|
361 | lsm_check_data_output, & |
---|
362 | lsm_init_arrays, & |
---|
363 | lsm_init, & |
---|
364 | lsm_header, & |
---|
365 | lsm_swap_timelevel, & |
---|
366 | lsm_3d_data_averaging, & |
---|
367 | lsm_data_output_2d, & |
---|
368 | lsm_rrd_local, & |
---|
369 | lsm_wrd_local |
---|
370 | |
---|
371 | USE lsf_nudging_mod, & |
---|
372 | ONLY: lsf_nudging_check_parameters, & |
---|
373 | lsf_nudging_check_data_output_pr, & |
---|
374 | lsf_init, & |
---|
375 | nudge_init, & |
---|
376 | lsf_nudging_header |
---|
377 | |
---|
378 | USE multi_agent_system_mod, & |
---|
379 | ONLY: mas_parin |
---|
380 | |
---|
381 | USE nesting_offl_mod, & |
---|
382 | ONLY: nesting_offl_parin, & |
---|
383 | nesting_offl_check_parameters, & |
---|
384 | nesting_offl_header |
---|
385 | |
---|
386 | USE ocean_mod, & |
---|
387 | ONLY: ocean_parin, & |
---|
388 | ocean_check_parameters, & |
---|
389 | ocean_check_data_output_pr, & |
---|
390 | ocean_check_data_output, & |
---|
391 | ocean_init_arrays, & |
---|
392 | ocean_init, & |
---|
393 | ocean_header, & |
---|
394 | ocean_actions, & |
---|
395 | ocean_prognostic_equations, & |
---|
396 | ocean_boundary_conditions, & |
---|
397 | ocean_swap_timelevel, & |
---|
398 | ocean_3d_data_averaging, & |
---|
399 | ocean_data_output_2d, & |
---|
400 | ocean_data_output_3d, & |
---|
401 | ocean_rrd_global, & |
---|
402 | ocean_wrd_global, & |
---|
403 | ocean_rrd_local, & |
---|
404 | ocean_wrd_local |
---|
405 | |
---|
406 | USE particle_attributes, & |
---|
407 | ONLY: particle_advection |
---|
408 | |
---|
409 | USE plant_canopy_model_mod, & |
---|
410 | ONLY: pcm_parin, & |
---|
411 | pcm_check_parameters, & |
---|
412 | pcm_check_data_output, & |
---|
413 | pcm_init, & |
---|
414 | pcm_header, & |
---|
415 | pcm_3d_data_averaging, & |
---|
416 | pcm_data_output_3d, & |
---|
417 | pcm_rrd_local, & |
---|
418 | pcm_wrd_local |
---|
419 | |
---|
420 | USE radiation_model_mod, & |
---|
421 | ONLY: radiation, & |
---|
422 | radiation_parin, & |
---|
423 | radiation_check_parameters, & |
---|
424 | radiation_check_data_output_ts, & |
---|
425 | radiation_check_data_output_pr, & |
---|
426 | radiation_check_data_output, & |
---|
427 | radiation_init, & |
---|
428 | radiation_header, & |
---|
429 | radiation_3d_data_averaging, & |
---|
430 | radiation_data_output_2d, & |
---|
431 | radiation_data_output_3d, & |
---|
432 | radiation_rrd_local, & |
---|
433 | radiation_wrd_local |
---|
434 | |
---|
435 | USE salsa_mod, & |
---|
436 | ONLY: salsa_parin, & |
---|
437 | salsa_check_parameters, & |
---|
438 | salsa_check_data_output_pr, & |
---|
439 | salsa_check_data_output, & |
---|
440 | salsa_init_arrays, & |
---|
441 | salsa_init, & |
---|
442 | salsa_header, & |
---|
443 | salsa_actions, & |
---|
444 | salsa_non_advective_processes, & |
---|
445 | salsa_exchange_horiz_bounds, & |
---|
446 | salsa_prognostic_equations, & |
---|
447 | salsa_boundary_conditions, & |
---|
448 | salsa_swap_timelevel, & |
---|
449 | salsa_3d_data_averaging, & |
---|
450 | salsa_data_output_2d, & |
---|
451 | salsa_data_output_3d, & |
---|
452 | salsa_statistics, & |
---|
453 | salsa_rrd_local, & |
---|
454 | salsa_wrd_local |
---|
455 | |
---|
456 | USE spectra_mod, & |
---|
457 | ONLY: calculate_spectra, & |
---|
458 | spectra_parin, & |
---|
459 | spectra_check_parameters, & |
---|
460 | spectra_header |
---|
461 | |
---|
462 | USE surface_data_output_mod, & |
---|
463 | ONLY: surface_data_output_parin, & |
---|
464 | surface_data_output_check_parameters, & |
---|
465 | surface_data_output_init_arrays, & |
---|
466 | surface_data_output_rrd_local, & |
---|
467 | surface_data_output_rrd_global, & |
---|
468 | surface_data_output_wrd_local, & |
---|
469 | surface_data_output_wrd_global |
---|
470 | |
---|
471 | USE synthetic_turbulence_generator_mod, & |
---|
472 | ONLY: stg_parin, & |
---|
473 | stg_check_parameters, & |
---|
474 | stg_header, & |
---|
475 | stg_rrd_global, & |
---|
476 | stg_wrd_global |
---|
477 | |
---|
478 | USE urban_surface_mod, & |
---|
479 | ONLY: usm_parin, & |
---|
480 | usm_check_parameters, & |
---|
481 | usm_check_data_output, & |
---|
482 | usm_init_arrays, & |
---|
483 | usm_init, & |
---|
484 | usm_swap_timelevel, & |
---|
485 | usm_3d_data_averaging, & |
---|
486 | usm_rrd_local, & |
---|
487 | usm_wrd_local |
---|
488 | |
---|
489 | USE vdi_internal_controls, & |
---|
490 | ONLY: vdi_actions |
---|
491 | |
---|
492 | USE virtual_measurement_mod, & |
---|
493 | ONLY: vm_check_parameters, & |
---|
494 | vm_init, & |
---|
495 | vm_last_actions, & |
---|
496 | vm_parin |
---|
497 | |
---|
498 | USE wind_turbine_model_mod, & |
---|
499 | ONLY: wtm_parin, & |
---|
500 | wtm_check_parameters, & |
---|
501 | wtm_init_arrays, & |
---|
502 | wtm_init, & |
---|
503 | wtm_actions, & |
---|
504 | wtm_rrd_global, & |
---|
505 | wtm_wrd_global |
---|
506 | |
---|
507 | USE user, & |
---|
508 | ONLY: user_module_enabled, & |
---|
509 | user_parin, & |
---|
510 | user_check_parameters, & |
---|
511 | user_check_data_output_ts, & |
---|
512 | user_check_data_output_pr, & |
---|
513 | user_check_data_output, & |
---|
514 | user_init, & |
---|
515 | user_init_arrays, & |
---|
516 | user_header, & |
---|
517 | user_actions, & |
---|
518 | user_3d_data_averaging, & |
---|
519 | user_data_output_2d, & |
---|
520 | user_data_output_3d, & |
---|
521 | user_statistics, & |
---|
522 | user_rrd_global, & |
---|
523 | user_rrd_local, & |
---|
524 | user_wrd_global, & |
---|
525 | user_wrd_local, & |
---|
526 | user_last_actions |
---|
527 | |
---|
528 | IMPLICIT NONE |
---|
529 | |
---|
530 | PRIVATE |
---|
531 | |
---|
532 | ! |
---|
533 | !-- Public functions |
---|
534 | PUBLIC & |
---|
535 | module_interface_parin, & |
---|
536 | module_interface_check_parameters, & |
---|
537 | module_interface_check_data_output_ts, & |
---|
538 | module_interface_check_data_output_pr, & |
---|
539 | module_interface_check_data_output, & |
---|
540 | module_interface_init_masks, & |
---|
541 | module_interface_define_netcdf_grid, & |
---|
542 | module_interface_init_arrays, & |
---|
543 | module_interface_init, & |
---|
544 | module_interface_init_checks, & |
---|
545 | module_interface_header, & |
---|
546 | module_interface_actions, & |
---|
547 | module_interface_non_advective_processes, & |
---|
548 | module_interface_exchange_horiz, & |
---|
549 | module_interface_prognostic_equations, & |
---|
550 | module_interface_boundary_conditions, & |
---|
551 | module_interface_swap_timelevel, & |
---|
552 | module_interface_3d_data_averaging, & |
---|
553 | module_interface_data_output_2d, & |
---|
554 | module_interface_data_output_3d, & |
---|
555 | module_interface_statistics, & |
---|
556 | module_interface_rrd_global, & |
---|
557 | module_interface_wrd_global, & |
---|
558 | module_interface_rrd_local, & |
---|
559 | module_interface_wrd_local, & |
---|
560 | module_interface_last_actions |
---|
561 | |
---|
562 | |
---|
563 | INTERFACE module_interface_parin |
---|
564 | MODULE PROCEDURE module_interface_parin |
---|
565 | END INTERFACE module_interface_parin |
---|
566 | |
---|
567 | INTERFACE module_interface_check_parameters |
---|
568 | MODULE PROCEDURE module_interface_check_parameters |
---|
569 | END INTERFACE module_interface_check_parameters |
---|
570 | |
---|
571 | INTERFACE module_interface_check_data_output_ts |
---|
572 | MODULE PROCEDURE module_interface_check_data_output_ts |
---|
573 | END INTERFACE module_interface_check_data_output_ts |
---|
574 | |
---|
575 | INTERFACE module_interface_check_data_output_pr |
---|
576 | MODULE PROCEDURE module_interface_check_data_output_pr |
---|
577 | END INTERFACE module_interface_check_data_output_pr |
---|
578 | |
---|
579 | INTERFACE module_interface_check_data_output |
---|
580 | MODULE PROCEDURE module_interface_check_data_output |
---|
581 | END INTERFACE module_interface_check_data_output |
---|
582 | |
---|
583 | INTERFACE module_interface_init_masks |
---|
584 | MODULE PROCEDURE module_interface_init_masks |
---|
585 | END INTERFACE module_interface_init_masks |
---|
586 | |
---|
587 | INTERFACE module_interface_define_netcdf_grid |
---|
588 | MODULE PROCEDURE module_interface_define_netcdf_grid |
---|
589 | END INTERFACE module_interface_define_netcdf_grid |
---|
590 | |
---|
591 | INTERFACE module_interface_init_arrays |
---|
592 | MODULE PROCEDURE module_interface_init_arrays |
---|
593 | END INTERFACE module_interface_init_arrays |
---|
594 | |
---|
595 | INTERFACE module_interface_init |
---|
596 | MODULE PROCEDURE module_interface_init |
---|
597 | END INTERFACE module_interface_init |
---|
598 | |
---|
599 | INTERFACE module_interface_init_checks |
---|
600 | MODULE PROCEDURE module_interface_init_checks |
---|
601 | END INTERFACE module_interface_init_checks |
---|
602 | |
---|
603 | INTERFACE module_interface_header |
---|
604 | MODULE PROCEDURE module_interface_header |
---|
605 | END INTERFACE module_interface_header |
---|
606 | |
---|
607 | INTERFACE module_interface_actions |
---|
608 | MODULE PROCEDURE module_interface_actions |
---|
609 | MODULE PROCEDURE module_interface_actions_ij |
---|
610 | END INTERFACE module_interface_actions |
---|
611 | |
---|
612 | INTERFACE module_interface_non_advective_processes |
---|
613 | MODULE PROCEDURE module_interface_non_advective_processes |
---|
614 | MODULE PROCEDURE module_interface_non_advective_processes_ij |
---|
615 | END INTERFACE module_interface_non_advective_processes |
---|
616 | |
---|
617 | INTERFACE module_interface_exchange_horiz |
---|
618 | MODULE PROCEDURE module_interface_exchange_horiz |
---|
619 | END INTERFACE module_interface_exchange_horiz |
---|
620 | |
---|
621 | INTERFACE module_interface_prognostic_equations |
---|
622 | MODULE PROCEDURE module_interface_prognostic_equations |
---|
623 | MODULE PROCEDURE module_interface_prognostic_equations_ij |
---|
624 | END INTERFACE module_interface_prognostic_equations |
---|
625 | |
---|
626 | INTERFACE module_interface_swap_timelevel |
---|
627 | MODULE PROCEDURE module_interface_swap_timelevel |
---|
628 | END INTERFACE module_interface_swap_timelevel |
---|
629 | |
---|
630 | INTERFACE module_interface_boundary_conditions |
---|
631 | MODULE PROCEDURE module_interface_boundary_conditions |
---|
632 | END INTERFACE module_interface_boundary_conditions |
---|
633 | |
---|
634 | INTERFACE module_interface_3d_data_averaging |
---|
635 | MODULE PROCEDURE module_interface_3d_data_averaging |
---|
636 | END INTERFACE module_interface_3d_data_averaging |
---|
637 | |
---|
638 | INTERFACE module_interface_data_output_2d |
---|
639 | MODULE PROCEDURE module_interface_data_output_2d |
---|
640 | END INTERFACE module_interface_data_output_2d |
---|
641 | |
---|
642 | INTERFACE module_interface_data_output_3d |
---|
643 | MODULE PROCEDURE module_interface_data_output_3d |
---|
644 | END INTERFACE module_interface_data_output_3d |
---|
645 | |
---|
646 | INTERFACE module_interface_statistics |
---|
647 | MODULE PROCEDURE module_interface_statistics |
---|
648 | END INTERFACE module_interface_statistics |
---|
649 | |
---|
650 | INTERFACE module_interface_rrd_global |
---|
651 | MODULE PROCEDURE module_interface_rrd_global |
---|
652 | END INTERFACE module_interface_rrd_global |
---|
653 | |
---|
654 | INTERFACE module_interface_wrd_global |
---|
655 | MODULE PROCEDURE module_interface_wrd_global |
---|
656 | END INTERFACE module_interface_wrd_global |
---|
657 | |
---|
658 | INTERFACE module_interface_rrd_local |
---|
659 | MODULE PROCEDURE module_interface_rrd_local |
---|
660 | END INTERFACE module_interface_rrd_local |
---|
661 | |
---|
662 | INTERFACE module_interface_wrd_local |
---|
663 | MODULE PROCEDURE module_interface_wrd_local |
---|
664 | END INTERFACE module_interface_wrd_local |
---|
665 | |
---|
666 | INTERFACE module_interface_last_actions |
---|
667 | MODULE PROCEDURE module_interface_last_actions |
---|
668 | END INTERFACE module_interface_last_actions |
---|
669 | |
---|
670 | |
---|
671 | CONTAINS |
---|
672 | |
---|
673 | |
---|
674 | !------------------------------------------------------------------------------! |
---|
675 | ! Description: |
---|
676 | ! ------------ |
---|
677 | !> Read module-specific parameter namelists |
---|
678 | !------------------------------------------------------------------------------! |
---|
679 | SUBROUTINE module_interface_parin |
---|
680 | |
---|
681 | |
---|
682 | IF ( debug_output ) CALL debug_message( 'reading module-specific parameters', 'start' ) |
---|
683 | |
---|
684 | CALL dynamics_parin |
---|
685 | |
---|
686 | CALL bio_parin |
---|
687 | CALL bcm_parin |
---|
688 | CALL chem_parin |
---|
689 | CALL flight_parin ! ToDo: rename module to match filename |
---|
690 | CALL gust_parin |
---|
691 | CALL im_parin |
---|
692 | CALL lpm_parin |
---|
693 | CALL lsm_parin |
---|
694 | ! ToDo: create parin routine for large_scale_forcing and nudging (should be seperate modules or new module switch) |
---|
695 | CALL mas_parin |
---|
696 | CALL nesting_offl_parin |
---|
697 | CALL ocean_parin |
---|
698 | CALL pcm_parin |
---|
699 | CALL radiation_parin |
---|
700 | CALL salsa_parin |
---|
701 | CALL spectra_parin |
---|
702 | CALL surface_data_output_parin |
---|
703 | CALL stg_parin |
---|
704 | CALL usm_parin |
---|
705 | CALL vm_parin |
---|
706 | CALL wtm_parin |
---|
707 | |
---|
708 | CALL user_parin |
---|
709 | |
---|
710 | IF ( debug_output ) CALL debug_message( 'reading module-specific parameters', 'end' ) |
---|
711 | |
---|
712 | |
---|
713 | END SUBROUTINE module_interface_parin |
---|
714 | |
---|
715 | |
---|
716 | !------------------------------------------------------------------------------! |
---|
717 | ! Description: |
---|
718 | ! ------------ |
---|
719 | !> Perform module-specific initialization checks |
---|
720 | !------------------------------------------------------------------------------! |
---|
721 | SUBROUTINE module_interface_check_parameters |
---|
722 | |
---|
723 | |
---|
724 | IF ( debug_output ) CALL debug_message( 'checking module-specific parameters', 'start' ) |
---|
725 | |
---|
726 | CALL dynamics_check_parameters |
---|
727 | CALL tcm_check_parameters |
---|
728 | |
---|
729 | IF ( bulk_cloud_model ) CALL bcm_check_parameters |
---|
730 | IF ( air_chemistry ) CALL chem_check_parameters |
---|
731 | IF ( gust_module_enabled ) CALL gust_check_parameters |
---|
732 | IF ( indoor_model ) CALL im_check_parameters |
---|
733 | IF ( particle_advection ) CALL lpm_check_parameters |
---|
734 | IF ( land_surface ) CALL lsm_check_parameters |
---|
735 | IF ( large_scale_forcing .OR. nudging ) CALL lsf_nudging_check_parameters ! ToDo: create single module switch |
---|
736 | IF ( nesting_offline ) CALL nesting_offl_check_parameters |
---|
737 | IF ( ocean_mode ) CALL ocean_check_parameters |
---|
738 | IF ( plant_canopy ) CALL pcm_check_parameters |
---|
739 | IF ( radiation ) CALL radiation_check_parameters |
---|
740 | IF ( salsa ) CALL salsa_check_parameters |
---|
741 | IF ( calculate_spectra ) CALL spectra_check_parameters |
---|
742 | IF ( surface_output ) CALL surface_data_output_check_parameters |
---|
743 | IF ( syn_turb_gen ) CALL stg_check_parameters |
---|
744 | IF ( urban_surface ) CALL usm_check_parameters |
---|
745 | IF ( virtual_measurement ) CALL vm_check_parameters |
---|
746 | IF ( wind_turbine ) CALL wtm_check_parameters |
---|
747 | |
---|
748 | IF ( user_module_enabled ) CALL user_check_parameters |
---|
749 | |
---|
750 | IF ( debug_output ) CALL debug_message( 'checking module-specific parameters', 'end' ) |
---|
751 | |
---|
752 | |
---|
753 | END SUBROUTINE module_interface_check_parameters |
---|
754 | |
---|
755 | |
---|
756 | !------------------------------------------------------------------------------! |
---|
757 | ! Description: |
---|
758 | ! ------------ |
---|
759 | !> Check module-specific data output of timeseries |
---|
760 | !------------------------------------------------------------------------------! |
---|
761 | SUBROUTINE module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
762 | |
---|
763 | |
---|
764 | INTEGER(iwp), INTENT(IN) :: dots_max !< variable output array index |
---|
765 | INTEGER(iwp), INTENT(INOUT) :: dots_num !< variable output array index |
---|
766 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label |
---|
767 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit |
---|
768 | |
---|
769 | |
---|
770 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output ts', 'start' ) |
---|
771 | |
---|
772 | CALL dynamics_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
773 | |
---|
774 | IF ( radiation ) THEN |
---|
775 | CALL radiation_check_data_output_ts( dots_max, dots_num ) |
---|
776 | ENDIF |
---|
777 | |
---|
778 | IF ( user_module_enabled ) THEN |
---|
779 | CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
780 | ENDIF |
---|
781 | |
---|
782 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output ts', 'end' ) |
---|
783 | |
---|
784 | |
---|
785 | END SUBROUTINE module_interface_check_data_output_ts |
---|
786 | |
---|
787 | |
---|
788 | !------------------------------------------------------------------------------! |
---|
789 | ! Description: |
---|
790 | ! ------------ |
---|
791 | !> Check module-specific data output of profiles |
---|
792 | !------------------------------------------------------------------------------! |
---|
793 | SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit, & |
---|
794 | dopr_unit ) |
---|
795 | |
---|
796 | |
---|
797 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
798 | INTEGER(iwp), INTENT(IN) :: var_count !< variable output array index |
---|
799 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
800 | CHARACTER (LEN=*), INTENT(OUT) :: dopr_unit !< local value of dopr_unit |
---|
801 | |
---|
802 | |
---|
803 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output pr', 'start' ) |
---|
804 | |
---|
805 | CALL dynamics_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
806 | |
---|
807 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
808 | CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
809 | ENDIF |
---|
810 | |
---|
811 | IF ( unit == 'illegal' .AND. air_chemistry ) THEN |
---|
812 | CALL chem_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
813 | ENDIF |
---|
814 | |
---|
815 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
816 | CALL gust_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
817 | ENDIF |
---|
818 | |
---|
819 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
820 | CALL lsm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
821 | ENDIF |
---|
822 | |
---|
823 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
824 | CALL lsf_nudging_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
825 | ENDIF |
---|
826 | |
---|
827 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
828 | CALL ocean_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
829 | ENDIF |
---|
830 | |
---|
831 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
832 | CALL radiation_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
833 | ENDIF |
---|
834 | |
---|
835 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
836 | CALL salsa_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
837 | ENDIF |
---|
838 | |
---|
839 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
840 | unit = '' ! ToDo: Seems like a hack. Find a general soultion! |
---|
841 | CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
842 | ENDIF |
---|
843 | |
---|
844 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output pr', 'end' ) |
---|
845 | |
---|
846 | |
---|
847 | END SUBROUTINE module_interface_check_data_output_pr |
---|
848 | |
---|
849 | !------------------------------------------------------------------------------! |
---|
850 | ! Description: |
---|
851 | ! ------------ |
---|
852 | !> Check module-specific 2D and 3D data output |
---|
853 | !------------------------------------------------------------------------------! |
---|
854 | SUBROUTINE module_interface_check_data_output( variable, unit, i, j, ilen, k ) |
---|
855 | |
---|
856 | |
---|
857 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
858 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
859 | |
---|
860 | INTEGER(iwp), INTENT(IN) :: i !< ToDo: remove dummy argument, instead pass string from data_output |
---|
861 | INTEGER(iwp), INTENT(IN) :: j !< average quantity? 0 = no, 1 = yes |
---|
862 | INTEGER(iwp), INTENT(IN) :: ilen !< ToDo: remove dummy argument, instead pass string from data_output |
---|
863 | INTEGER(iwp), INTENT(IN) :: k !< ToDo: remove dummy argument, instead pass string from data_output |
---|
864 | |
---|
865 | |
---|
866 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output 2d/3d', 'start' ) |
---|
867 | |
---|
868 | CALL dynamics_check_data_output( variable, unit ) |
---|
869 | |
---|
870 | CALL tcm_check_data_output( variable, unit ) |
---|
871 | |
---|
872 | IF ( unit == 'illegal' .AND. biometeorology ) THEN |
---|
873 | CALL bio_check_data_output( variable, unit, i, j, ilen, k ) |
---|
874 | ENDIF |
---|
875 | |
---|
876 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
877 | CALL bcm_check_data_output( variable, unit ) |
---|
878 | ENDIF |
---|
879 | |
---|
880 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
881 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
882 | CALL chem_check_data_output( variable, unit, i, ilen, k ) |
---|
883 | ENDIF |
---|
884 | |
---|
885 | IF ( unit == 'illegal' ) THEN |
---|
886 | CALL doq_check_data_output( variable, unit, i, ilen, k ) |
---|
887 | ENDIF |
---|
888 | |
---|
889 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
890 | CALL gust_check_data_output( variable, unit ) |
---|
891 | ENDIF |
---|
892 | |
---|
893 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
894 | CALL lsm_check_data_output( variable, unit, i, ilen, k ) |
---|
895 | ENDIF |
---|
896 | |
---|
897 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
898 | CALL ocean_check_data_output( variable, unit ) |
---|
899 | ENDIF |
---|
900 | |
---|
901 | IF ( unit == 'illegal' .AND. plant_canopy & |
---|
902 | .AND. variable(1:4) == 'pcm_' ) THEN ! ToDo: remove aditional conditions |
---|
903 | CALL pcm_check_data_output( variable, unit ) |
---|
904 | ENDIF |
---|
905 | |
---|
906 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
907 | CALL radiation_check_data_output( variable, unit, i, ilen, k ) |
---|
908 | ENDIF |
---|
909 | |
---|
910 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
911 | CALL salsa_check_data_output( variable, unit ) |
---|
912 | ENDIF |
---|
913 | |
---|
914 | IF ( unit == 'illegal' .AND. indoor_model ) THEN |
---|
915 | CALL im_check_data_output( variable, unit ) |
---|
916 | ENDIF |
---|
917 | |
---|
918 | IF ( unit == 'illegal' .AND. urban_surface & |
---|
919 | .AND. variable(1:4) == 'usm_' ) THEN ! ToDo: remove aditional conditions |
---|
920 | CALL usm_check_data_output( variable, unit ) |
---|
921 | ENDIF |
---|
922 | |
---|
923 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
924 | unit = '' |
---|
925 | CALL user_check_data_output( variable, unit ) |
---|
926 | ENDIF |
---|
927 | |
---|
928 | IF ( debug_output ) CALL debug_message( 'checking module-specific data output 2d/3d', 'end' ) |
---|
929 | |
---|
930 | |
---|
931 | END SUBROUTINE module_interface_check_data_output |
---|
932 | |
---|
933 | |
---|
934 | !------------------------------------------------------------------------------! |
---|
935 | ! |
---|
936 | ! Description: |
---|
937 | ! ------------ |
---|
938 | !> Interface for init_masks. ToDo: get rid of these redundant calls! |
---|
939 | !------------------------------------------------------------------------------! |
---|
940 | SUBROUTINE module_interface_init_masks( variable, unit ) |
---|
941 | |
---|
942 | |
---|
943 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
944 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
945 | |
---|
946 | |
---|
947 | IF ( debug_output ) CALL debug_message( 'initializing module-specific masks', 'start' ) |
---|
948 | |
---|
949 | CALL dynamics_init_masks( variable, unit ) |
---|
950 | |
---|
951 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
952 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
953 | CALL chem_check_data_output( variable, unit, 0, 0, 0 ) |
---|
954 | ENDIF |
---|
955 | |
---|
956 | IF ( unit == 'illegal' ) THEN |
---|
957 | CALL doq_check_data_output( variable, unit ) |
---|
958 | ENDIF |
---|
959 | |
---|
960 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
961 | CALL radiation_check_data_output( variable, unit, 0, 0, 0 ) |
---|
962 | ENDIF |
---|
963 | |
---|
964 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
965 | CALL salsa_check_data_output( variable, unit ) |
---|
966 | ENDIF |
---|
967 | |
---|
968 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
969 | unit = '' |
---|
970 | CALL user_check_data_output( variable, unit ) |
---|
971 | ENDIF |
---|
972 | |
---|
973 | IF ( debug_output ) CALL debug_message( 'initializing module-specific masks', 'end' ) |
---|
974 | |
---|
975 | |
---|
976 | END SUBROUTINE module_interface_init_masks |
---|
977 | |
---|
978 | |
---|
979 | !------------------------------------------------------------------------------! |
---|
980 | ! |
---|
981 | ! Description: |
---|
982 | ! ------------ |
---|
983 | !> Define appropriate grid for module-specific netcdf output variables. |
---|
984 | !------------------------------------------------------------------------------! |
---|
985 | SUBROUTINE module_interface_define_netcdf_grid( var, found, & |
---|
986 | grid_x, grid_y, grid_z ) |
---|
987 | |
---|
988 | |
---|
989 | CHARACTER (LEN=*), INTENT(IN) :: var !< variable name |
---|
990 | LOGICAL, INTENT(OUT) :: found !< indicates if variable was found |
---|
991 | CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< netcdf dimension in x-direction |
---|
992 | CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< netcdf dimension in y-direction |
---|
993 | CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< netcdf dimension in z-direction |
---|
994 | |
---|
995 | |
---|
996 | IF ( debug_output ) CALL debug_message( 'defining module-specific netcdf grids', 'start' ) |
---|
997 | ! |
---|
998 | !-- As long as no action is done in this subroutine, initialize strings with |
---|
999 | !-- intent(out) attribute, in order to avoid compiler warnings. |
---|
1000 | found = .FALSE. |
---|
1001 | grid_x = 'none' |
---|
1002 | grid_y = 'none' |
---|
1003 | grid_z = 'none' |
---|
1004 | ! |
---|
1005 | !-- Use var to avoid compiler warning about unused variable |
---|
1006 | IF ( var == ' ' ) RETURN |
---|
1007 | |
---|
1008 | IF ( debug_output ) CALL debug_message( 'defining module-specific netcdf grids', 'end' ) |
---|
1009 | |
---|
1010 | |
---|
1011 | END SUBROUTINE module_interface_define_netcdf_grid |
---|
1012 | |
---|
1013 | |
---|
1014 | !------------------------------------------------------------------------------! |
---|
1015 | ! Description: |
---|
1016 | ! ------------ |
---|
1017 | !> Allocate module-specific arrays and pointers |
---|
1018 | !------------------------------------------------------------------------------! |
---|
1019 | SUBROUTINE module_interface_init_arrays |
---|
1020 | |
---|
1021 | |
---|
1022 | IF ( debug_output ) CALL debug_message( 'initializing module-specific arrays', 'start' ) |
---|
1023 | |
---|
1024 | CALL dynamics_init_arrays |
---|
1025 | CALL tcm_init_arrays |
---|
1026 | |
---|
1027 | IF ( bulk_cloud_model ) CALL bcm_init_arrays |
---|
1028 | IF ( air_chemistry ) CALL chem_init_arrays |
---|
1029 | IF ( gust_module_enabled ) CALL gust_init_arrays |
---|
1030 | IF ( particle_advection ) CALL lpm_init_arrays |
---|
1031 | IF ( land_surface ) CALL lsm_init_arrays |
---|
1032 | IF ( ocean_mode ) CALL ocean_init_arrays |
---|
1033 | IF ( salsa ) CALL salsa_init_arrays |
---|
1034 | IF ( urban_surface ) CALL usm_init_arrays |
---|
1035 | IF ( surface_output ) CALL surface_data_output_init_arrays |
---|
1036 | IF ( wind_turbine ) CALL wtm_init_arrays |
---|
1037 | |
---|
1038 | IF ( user_module_enabled ) CALL user_init_arrays |
---|
1039 | |
---|
1040 | IF ( debug_output ) CALL debug_message( 'initializing module-specific arrays', 'end' ) |
---|
1041 | |
---|
1042 | |
---|
1043 | END SUBROUTINE module_interface_init_arrays |
---|
1044 | |
---|
1045 | |
---|
1046 | !------------------------------------------------------------------------------! |
---|
1047 | ! Description: |
---|
1048 | ! ------------ |
---|
1049 | !> Perform module-specific initialization |
---|
1050 | !------------------------------------------------------------------------------! |
---|
1051 | SUBROUTINE module_interface_init |
---|
1052 | |
---|
1053 | |
---|
1054 | IF ( debug_output ) CALL debug_message( 'module-specific initialization', 'start' ) |
---|
1055 | |
---|
1056 | CALL dynamics_init |
---|
1057 | CALL tcm_init |
---|
1058 | |
---|
1059 | IF ( biometeorology ) CALL bio_init |
---|
1060 | IF ( bulk_cloud_model ) CALL bcm_init |
---|
1061 | IF ( air_chemistry ) CALL chem_init |
---|
1062 | IF ( virtual_flight ) CALL flight_init |
---|
1063 | IF ( gust_module_enabled ) CALL gust_init |
---|
1064 | IF ( indoor_model ) CALL im_init |
---|
1065 | IF ( particle_advection ) CALL lpm_init |
---|
1066 | IF ( large_scale_forcing ) CALL lsf_init |
---|
1067 | IF ( land_surface ) CALL lsm_init |
---|
1068 | IF ( nudging ) CALL nudge_init |
---|
1069 | IF ( ocean_mode ) CALL ocean_init |
---|
1070 | IF ( plant_canopy ) CALL pcm_init |
---|
1071 | IF ( salsa ) CALL salsa_init |
---|
1072 | IF ( urban_surface ) CALL usm_init |
---|
1073 | IF ( virtual_measurement ) CALL vm_init |
---|
1074 | IF ( wind_turbine ) CALL wtm_init |
---|
1075 | IF ( radiation ) CALL radiation_init |
---|
1076 | |
---|
1077 | CALL doq_init |
---|
1078 | |
---|
1079 | IF ( user_module_enabled ) CALL user_init |
---|
1080 | |
---|
1081 | IF ( debug_output ) CALL debug_message( 'module-specific initialization', 'end' ) |
---|
1082 | |
---|
1083 | |
---|
1084 | END SUBROUTINE module_interface_init |
---|
1085 | |
---|
1086 | |
---|
1087 | !------------------------------------------------------------------------------! |
---|
1088 | ! Description: |
---|
1089 | ! ------------ |
---|
1090 | !> Perform module-specific post-initialization checks |
---|
1091 | !------------------------------------------------------------------------------! |
---|
1092 | SUBROUTINE module_interface_init_checks |
---|
1093 | |
---|
1094 | |
---|
1095 | IF ( debug_output ) CALL debug_message( 'module-specific post-initialization checks', 'start' ) |
---|
1096 | |
---|
1097 | CALL dynamics_init_checks |
---|
1098 | |
---|
1099 | IF ( biometeorology ) CALL bio_init_checks |
---|
1100 | |
---|
1101 | IF ( debug_output ) CALL debug_message( 'module-specific post-initialization checks', 'end' ) |
---|
1102 | |
---|
1103 | |
---|
1104 | END SUBROUTINE module_interface_init_checks |
---|
1105 | |
---|
1106 | |
---|
1107 | !------------------------------------------------------------------------------! |
---|
1108 | ! Description: |
---|
1109 | ! ------------ |
---|
1110 | !> Gather module-specific header output |
---|
1111 | !------------------------------------------------------------------------------! |
---|
1112 | SUBROUTINE module_interface_header( io ) |
---|
1113 | |
---|
1114 | |
---|
1115 | INTEGER(iwp), INTENT(IN) :: io !< unit of the output file |
---|
1116 | |
---|
1117 | |
---|
1118 | IF ( debug_output ) CALL debug_message( 'module-specific header output', 'start' ) |
---|
1119 | |
---|
1120 | CALL dynamics_header( io ) |
---|
1121 | |
---|
1122 | IF ( biometeorology ) CALL bio_header ( io ) |
---|
1123 | IF ( bulk_cloud_model ) CALL bcm_header( io ) |
---|
1124 | IF ( air_chemistry ) CALL chem_header ( io ) |
---|
1125 | IF ( virtual_flight ) CALL flight_header( io ) |
---|
1126 | IF ( gust_module_enabled ) CALL gust_header( io ) |
---|
1127 | IF ( particle_advection ) CALL lpm_header( io ) |
---|
1128 | IF ( land_surface ) CALL lsm_header( io ) |
---|
1129 | IF ( large_scale_forcing ) CALL lsf_nudging_header( io ) |
---|
1130 | IF ( nesting_offline ) CALL nesting_offl_header( io ) |
---|
1131 | IF ( ocean_mode ) CALL ocean_header( io ) |
---|
1132 | IF ( plant_canopy ) CALL pcm_header( io ) |
---|
1133 | IF ( radiation ) CALL radiation_header( io ) |
---|
1134 | IF ( salsa ) CALL salsa_header( io ) |
---|
1135 | IF ( calculate_spectra ) CALL spectra_header( io ) |
---|
1136 | IF ( syn_turb_gen ) CALL stg_header( io ) |
---|
1137 | |
---|
1138 | IF ( user_module_enabled ) CALL user_header( io ) |
---|
1139 | |
---|
1140 | IF ( debug_output ) CALL debug_message( 'module-specific header output', 'end' ) |
---|
1141 | |
---|
1142 | |
---|
1143 | END SUBROUTINE module_interface_header |
---|
1144 | |
---|
1145 | |
---|
1146 | !------------------------------------------------------------------------------! |
---|
1147 | ! Description: |
---|
1148 | ! ------------ |
---|
1149 | !> Perform module-specific actions while in time-integration (vector-optimized) |
---|
1150 | !------------------------------------------------------------------------------! |
---|
1151 | SUBROUTINE module_interface_actions( location ) |
---|
1152 | |
---|
1153 | |
---|
1154 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
1155 | |
---|
1156 | CALL dynamics_actions( location ) |
---|
1157 | CALL tcm_actions( location ) |
---|
1158 | |
---|
1159 | IF ( bulk_cloud_model ) CALL bcm_actions( location ) |
---|
1160 | IF ( air_chemistry ) CALL chem_actions( location ) |
---|
1161 | IF ( gust_module_enabled ) CALL gust_actions( location ) |
---|
1162 | IF ( particle_advection ) CALL lpm_actions( location ) |
---|
1163 | IF ( ocean_mode ) CALL ocean_actions( location ) |
---|
1164 | IF ( salsa ) CALL salsa_actions( location ) |
---|
1165 | IF ( wind_turbine ) CALL wtm_actions( location ) |
---|
1166 | |
---|
1167 | IF ( user_module_enabled ) CALL user_actions( location ) |
---|
1168 | IF ( vdi_checks ) CALL vdi_actions( location ) |
---|
1169 | |
---|
1170 | |
---|
1171 | END SUBROUTINE module_interface_actions |
---|
1172 | |
---|
1173 | |
---|
1174 | !------------------------------------------------------------------------------! |
---|
1175 | ! Description: |
---|
1176 | ! ------------ |
---|
1177 | !> Perform module-specific actions while in time-integration (cache-optimized) |
---|
1178 | !------------------------------------------------------------------------------! |
---|
1179 | SUBROUTINE module_interface_actions_ij( i, j, location ) |
---|
1180 | |
---|
1181 | |
---|
1182 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
1183 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
1184 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
1185 | |
---|
1186 | CALL dynamics_actions( i, j, location ) |
---|
1187 | CALL tcm_actions( i, j, location ) |
---|
1188 | |
---|
1189 | IF ( bulk_cloud_model ) CALL bcm_actions( i, j, location ) |
---|
1190 | IF ( air_chemistry ) CALL chem_actions( i, j, location ) |
---|
1191 | IF ( gust_module_enabled ) CALL gust_actions( i, j, location ) |
---|
1192 | IF ( ocean_mode ) CALL ocean_actions( i, j, location ) |
---|
1193 | IF ( salsa ) CALL salsa_actions( i, j, location ) |
---|
1194 | IF ( wind_turbine ) CALL wtm_actions( i, j, location ) |
---|
1195 | |
---|
1196 | IF ( user_module_enabled ) CALL user_actions( i, j, location ) |
---|
1197 | |
---|
1198 | |
---|
1199 | END SUBROUTINE module_interface_actions_ij |
---|
1200 | |
---|
1201 | |
---|
1202 | !------------------------------------------------------------------------------! |
---|
1203 | ! Description: |
---|
1204 | ! ------------ |
---|
1205 | !> Compute module-specific non_advective_processes (vector-optimized) |
---|
1206 | !------------------------------------------------------------------------------! |
---|
1207 | SUBROUTINE module_interface_non_advective_processes |
---|
1208 | |
---|
1209 | |
---|
1210 | CALL dynamics_non_advective_processes |
---|
1211 | |
---|
1212 | IF ( bulk_cloud_model ) CALL bcm_non_advective_processes |
---|
1213 | IF ( air_chemistry ) CALL chem_non_advective_processes |
---|
1214 | IF ( salsa ) CALL salsa_non_advective_processes |
---|
1215 | |
---|
1216 | |
---|
1217 | END SUBROUTINE module_interface_non_advective_processes |
---|
1218 | |
---|
1219 | |
---|
1220 | !------------------------------------------------------------------------------! |
---|
1221 | ! Description: |
---|
1222 | ! ------------ |
---|
1223 | !> Compute module-specific non_advective_processes (cache-optimized) |
---|
1224 | !------------------------------------------------------------------------------! |
---|
1225 | SUBROUTINE module_interface_non_advective_processes_ij( i, j ) |
---|
1226 | |
---|
1227 | |
---|
1228 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
1229 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
1230 | |
---|
1231 | CALL dynamics_non_advective_processes( i, j ) |
---|
1232 | |
---|
1233 | IF ( bulk_cloud_model ) CALL bcm_non_advective_processes( i, j ) |
---|
1234 | IF ( air_chemistry ) CALL chem_non_advective_processes( i, j ) |
---|
1235 | IF ( salsa ) CALL salsa_non_advective_processes( i, j ) |
---|
1236 | |
---|
1237 | |
---|
1238 | END SUBROUTINE module_interface_non_advective_processes_ij |
---|
1239 | |
---|
1240 | !------------------------------------------------------------------------------! |
---|
1241 | ! Description: |
---|
1242 | ! ------------ |
---|
1243 | !> Exchange horiz for module-specific quantities |
---|
1244 | !------------------------------------------------------------------------------! |
---|
1245 | SUBROUTINE module_interface_exchange_horiz |
---|
1246 | |
---|
1247 | |
---|
1248 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific exchange_horiz', 'start' ) |
---|
1249 | |
---|
1250 | CALL dynamics_exchange_horiz |
---|
1251 | |
---|
1252 | IF ( bulk_cloud_model ) CALL bcm_exchange_horiz |
---|
1253 | IF ( air_chemistry ) CALL chem_exchange_horiz_bounds |
---|
1254 | IF ( salsa ) CALL salsa_exchange_horiz_bounds |
---|
1255 | |
---|
1256 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific exchange_horiz', 'end' ) |
---|
1257 | |
---|
1258 | |
---|
1259 | END SUBROUTINE module_interface_exchange_horiz |
---|
1260 | |
---|
1261 | |
---|
1262 | !------------------------------------------------------------------------------! |
---|
1263 | ! Description: |
---|
1264 | ! ------------ |
---|
1265 | !> Compute module-specific prognostic_equations (vector-optimized) |
---|
1266 | !------------------------------------------------------------------------------! |
---|
1267 | SUBROUTINE module_interface_prognostic_equations |
---|
1268 | |
---|
1269 | |
---|
1270 | CALL dynamics_prognostic_equations |
---|
1271 | CALL tcm_prognostic_equations |
---|
1272 | |
---|
1273 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations |
---|
1274 | IF ( air_chemistry ) CALL chem_prognostic_equations |
---|
1275 | IF ( gust_module_enabled ) CALL gust_prognostic_equations |
---|
1276 | IF ( ocean_mode ) CALL ocean_prognostic_equations |
---|
1277 | IF ( salsa ) CALL salsa_prognostic_equations |
---|
1278 | |
---|
1279 | |
---|
1280 | END SUBROUTINE module_interface_prognostic_equations |
---|
1281 | |
---|
1282 | |
---|
1283 | !------------------------------------------------------------------------------! |
---|
1284 | ! Description: |
---|
1285 | ! ------------ |
---|
1286 | !> Compute module-specific prognostic_equations (cache-optimized) |
---|
1287 | !------------------------------------------------------------------------------! |
---|
1288 | SUBROUTINE module_interface_prognostic_equations_ij( i, j, i_omp_start, tn ) |
---|
1289 | |
---|
1290 | |
---|
1291 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
1292 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
1293 | INTEGER(iwp), INTENT(IN) :: i_omp_start !< first loop index of i-loop in prognostic_equations |
---|
1294 | INTEGER(iwp), INTENT(IN) :: tn !< task number of openmp task |
---|
1295 | |
---|
1296 | CALL dynamics_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1297 | CALL tcm_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1298 | |
---|
1299 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1300 | IF ( air_chemistry ) CALL chem_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1301 | IF ( gust_module_enabled ) CALL gust_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1302 | IF ( ocean_mode ) CALL ocean_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1303 | IF ( salsa ) CALL salsa_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1304 | |
---|
1305 | |
---|
1306 | END SUBROUTINE module_interface_prognostic_equations_ij |
---|
1307 | |
---|
1308 | !------------------------------------------------------------------------------! |
---|
1309 | ! Description: |
---|
1310 | ! ------------ |
---|
1311 | !> Compute module-specific boundary conditions |
---|
1312 | !------------------------------------------------------------------------------! |
---|
1313 | SUBROUTINE module_interface_boundary_conditions |
---|
1314 | |
---|
1315 | |
---|
1316 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific boundary_conditions', 'start' ) |
---|
1317 | |
---|
1318 | CALL dynamics_boundary_conditions |
---|
1319 | CALL tcm_boundary_conds |
---|
1320 | |
---|
1321 | IF ( bulk_cloud_model ) CALL bcm_boundary_conditions |
---|
1322 | IF ( air_chemistry ) CALL chem_boundary_conditions |
---|
1323 | IF ( ocean_mode ) CALL ocean_boundary_conditions |
---|
1324 | IF ( salsa ) CALL salsa_boundary_conditions |
---|
1325 | |
---|
1326 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific boundary_conditions', 'end' ) |
---|
1327 | |
---|
1328 | |
---|
1329 | END SUBROUTINE module_interface_boundary_conditions |
---|
1330 | |
---|
1331 | !------------------------------------------------------------------------------! |
---|
1332 | ! Description: |
---|
1333 | ! ------------ |
---|
1334 | !> Swap the timelevel pointers for module-specific arrays |
---|
1335 | !------------------------------------------------------------------------------! |
---|
1336 | SUBROUTINE module_interface_swap_timelevel ( swap_mode ) |
---|
1337 | |
---|
1338 | |
---|
1339 | INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap |
---|
1340 | |
---|
1341 | |
---|
1342 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific swap timelevel', 'start' ) |
---|
1343 | |
---|
1344 | CALL dynamics_swap_timelevel( swap_mode ) |
---|
1345 | CALL tcm_swap_timelevel( swap_mode ) |
---|
1346 | |
---|
1347 | IF ( bulk_cloud_model ) CALL bcm_swap_timelevel( swap_mode ) |
---|
1348 | IF ( air_chemistry ) CALL chem_swap_timelevel( swap_mode ) |
---|
1349 | IF ( gust_module_enabled ) CALL gust_swap_timelevel( swap_mode ) |
---|
1350 | IF ( land_surface ) CALL lsm_swap_timelevel( swap_mode ) |
---|
1351 | IF ( ocean_mode ) CALL ocean_swap_timelevel( swap_mode ) |
---|
1352 | IF ( salsa ) CALL salsa_swap_timelevel( swap_mode ) |
---|
1353 | IF ( urban_surface ) CALL usm_swap_timelevel( swap_mode ) |
---|
1354 | |
---|
1355 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific swap timelevel', 'end' ) |
---|
1356 | |
---|
1357 | |
---|
1358 | END SUBROUTINE module_interface_swap_timelevel |
---|
1359 | |
---|
1360 | |
---|
1361 | !------------------------------------------------------------------------------! |
---|
1362 | ! |
---|
1363 | ! Description: |
---|
1364 | ! ------------ |
---|
1365 | !> Perform module-specific averaging of 3D data |
---|
1366 | !------------------------------------------------------------------------------! |
---|
1367 | SUBROUTINE module_interface_3d_data_averaging( mode, variable ) |
---|
1368 | |
---|
1369 | |
---|
1370 | CHARACTER (LEN=*), INTENT(IN) :: mode !< averaging interface mode |
---|
1371 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1372 | |
---|
1373 | |
---|
1374 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data averaging', 'start' ) |
---|
1375 | |
---|
1376 | CALL dynamics_3d_data_averaging( mode, variable ) |
---|
1377 | CALL tcm_3d_data_averaging( mode, variable ) |
---|
1378 | |
---|
1379 | IF ( biometeorology ) CALL bio_3d_data_averaging( mode, variable ) |
---|
1380 | IF ( bulk_cloud_model ) CALL bcm_3d_data_averaging( mode, variable ) |
---|
1381 | IF ( air_chemistry ) CALL chem_3d_data_averaging( mode, variable ) |
---|
1382 | CALL doq_3d_data_averaging( mode, variable ) ! ToDo: this seems to be not according to the design |
---|
1383 | IF ( gust_module_enabled ) CALL gust_3d_data_averaging( mode, variable ) |
---|
1384 | IF ( land_surface ) CALL lsm_3d_data_averaging( mode, variable ) |
---|
1385 | IF ( ocean_mode ) CALL ocean_3d_data_averaging( mode, variable ) |
---|
1386 | IF ( plant_canopy ) CALL pcm_3d_data_averaging( mode, variable ) |
---|
1387 | IF ( radiation ) CALL radiation_3d_data_averaging( mode, variable ) |
---|
1388 | IF ( salsa ) CALL salsa_3d_data_averaging( mode, variable ) |
---|
1389 | IF ( urban_surface ) CALL usm_3d_data_averaging( mode, variable ) |
---|
1390 | |
---|
1391 | IF ( user_module_enabled ) CALL user_3d_data_averaging( mode, variable ) |
---|
1392 | |
---|
1393 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data averaging', 'end' ) |
---|
1394 | |
---|
1395 | |
---|
1396 | END SUBROUTINE module_interface_3d_data_averaging |
---|
1397 | |
---|
1398 | !------------------------------------------------------------------------------! |
---|
1399 | ! |
---|
1400 | ! Description: |
---|
1401 | ! ------------ |
---|
1402 | !> Define module-specific 2D output variables |
---|
1403 | !------------------------------------------------------------------------------! |
---|
1404 | SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode, & |
---|
1405 | local_pf, two_d, nzb_do, nzt_do, & |
---|
1406 | fill_value ) |
---|
1407 | |
---|
1408 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
1409 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1410 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
1411 | CHARACTER (LEN=*), INTENT(INOUT) :: grid !< name of vertical grid |
---|
1412 | CHARACTER (LEN=*), INTENT(IN) :: mode !< either 'xy', 'xz' or 'yz' |
---|
1413 | LOGICAL, INTENT(OUT) :: two_d !< flag for 2D variables |
---|
1414 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
1415 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
1416 | REAL(wp), INTENT(IN) :: fill_value !< to be removed |
---|
1417 | |
---|
1418 | REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) :: local_pf !< ToDo: can also be kind=sp |
---|
1419 | |
---|
1420 | |
---|
1421 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 2d data output', 'start' ) |
---|
1422 | |
---|
1423 | CALL dynamics_data_output_2d( & |
---|
1424 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
1425 | ) |
---|
1426 | |
---|
1427 | IF ( .NOT. found ) THEN |
---|
1428 | CALL tcm_data_output_2d( & |
---|
1429 | av, variable, found, grid, mode, local_pf, nzb_do, nzt_do & |
---|
1430 | ) |
---|
1431 | ENDIF |
---|
1432 | |
---|
1433 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
1434 | CALL bio_data_output_2d( & |
---|
1435 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
1436 | ) |
---|
1437 | ENDIF |
---|
1438 | |
---|
1439 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
1440 | CALL bcm_data_output_2d( & |
---|
1441 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1442 | ) |
---|
1443 | ENDIF |
---|
1444 | |
---|
1445 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
1446 | CALL chem_data_output_2d( & |
---|
1447 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
1448 | ) |
---|
1449 | ENDIF |
---|
1450 | |
---|
1451 | IF ( .NOT. found ) THEN |
---|
1452 | CALL doq_output_2d( & |
---|
1453 | av, variable, found, grid, mode, local_pf, two_d, & |
---|
1454 | nzb_do, nzt_do, fill_value ) |
---|
1455 | ENDIF |
---|
1456 | |
---|
1457 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
1458 | CALL gust_data_output_2d( & |
---|
1459 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
1460 | ) |
---|
1461 | ENDIF |
---|
1462 | |
---|
1463 | IF ( .NOT. found .AND. land_surface ) THEN |
---|
1464 | CALL lsm_data_output_2d( & |
---|
1465 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1466 | ) |
---|
1467 | ENDIF |
---|
1468 | |
---|
1469 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
1470 | CALL ocean_data_output_2d( & |
---|
1471 | av, variable, found, grid, mode, local_pf, nzb_do, nzt_do & |
---|
1472 | ) |
---|
1473 | ENDIF |
---|
1474 | |
---|
1475 | IF ( .NOT. found .AND. radiation ) THEN |
---|
1476 | CALL radiation_data_output_2d( & |
---|
1477 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1478 | ) |
---|
1479 | ENDIF |
---|
1480 | |
---|
1481 | IF ( .NOT. found .AND. salsa ) THEN |
---|
1482 | CALL salsa_data_output_2d( & |
---|
1483 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1484 | ) |
---|
1485 | ENDIF |
---|
1486 | |
---|
1487 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
1488 | CALL user_data_output_2d( & |
---|
1489 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
1490 | ) |
---|
1491 | ENDIF |
---|
1492 | |
---|
1493 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 2d data output', 'end' ) |
---|
1494 | |
---|
1495 | |
---|
1496 | END SUBROUTINE module_interface_data_output_2d |
---|
1497 | |
---|
1498 | |
---|
1499 | !------------------------------------------------------------------------------! |
---|
1500 | ! |
---|
1501 | ! Description: |
---|
1502 | ! ------------ |
---|
1503 | !> Define module-specific 3D output variables |
---|
1504 | !------------------------------------------------------------------------------! |
---|
1505 | SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf, & |
---|
1506 | fill_value, resorted, nzb_do, nzt_do ) |
---|
1507 | |
---|
1508 | |
---|
1509 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
1510 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1511 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
1512 | REAL(wp), INTENT(IN) :: fill_value !< ToDo: refactor |
---|
1513 | LOGICAL, INTENT(OUT) :: resorted !< flag if output has been resorted |
---|
1514 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
1515 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
1516 | |
---|
1517 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) :: local_pf |
---|
1518 | |
---|
1519 | |
---|
1520 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data output', 'start' ) |
---|
1521 | |
---|
1522 | CALL dynamics_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1523 | resorted = .FALSE. |
---|
1524 | |
---|
1525 | IF ( .NOT. found ) THEN |
---|
1526 | CALL tcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1527 | resorted = .TRUE. |
---|
1528 | ENDIF |
---|
1529 | |
---|
1530 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
1531 | CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1532 | resorted = .FALSE. |
---|
1533 | ENDIF |
---|
1534 | |
---|
1535 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
1536 | CALL bcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1537 | resorted = .TRUE. |
---|
1538 | ENDIF |
---|
1539 | |
---|
1540 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
1541 | CALL chem_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1542 | resorted = .TRUE. |
---|
1543 | ENDIF |
---|
1544 | |
---|
1545 | IF ( .NOT. found ) THEN |
---|
1546 | CALL doq_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1547 | resorted = .TRUE. |
---|
1548 | ENDIF |
---|
1549 | |
---|
1550 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
1551 | CALL gust_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1552 | resorted = .TRUE. |
---|
1553 | ENDIF |
---|
1554 | |
---|
1555 | IF ( .NOT. found .AND. indoor_model ) THEN |
---|
1556 | CALL im_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1557 | resorted = .TRUE. |
---|
1558 | ENDIF |
---|
1559 | |
---|
1560 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
1561 | CALL ocean_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1562 | resorted = .TRUE. |
---|
1563 | ENDIF |
---|
1564 | |
---|
1565 | IF ( .NOT. found .AND. plant_canopy ) THEN |
---|
1566 | CALL pcm_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1567 | resorted = .TRUE. |
---|
1568 | ENDIF |
---|
1569 | |
---|
1570 | IF ( .NOT. found .AND. radiation ) THEN |
---|
1571 | CALL radiation_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1572 | resorted = .TRUE. |
---|
1573 | ENDIF |
---|
1574 | |
---|
1575 | IF ( .NOT. found .AND. salsa ) THEN |
---|
1576 | CALL salsa_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1577 | resorted = .TRUE. |
---|
1578 | ENDIF |
---|
1579 | |
---|
1580 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
1581 | CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1582 | resorted = .TRUE. |
---|
1583 | ENDIF |
---|
1584 | |
---|
1585 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data output', 'end' ) |
---|
1586 | |
---|
1587 | |
---|
1588 | END SUBROUTINE module_interface_data_output_3d |
---|
1589 | |
---|
1590 | |
---|
1591 | !------------------------------------------------------------------------------! |
---|
1592 | ! Description: |
---|
1593 | ! ------------ |
---|
1594 | !> Compute module-specific profile and timeseries data |
---|
1595 | !------------------------------------------------------------------------------! |
---|
1596 | SUBROUTINE module_interface_statistics( mode, sr, tn, dots_max ) |
---|
1597 | |
---|
1598 | |
---|
1599 | CHARACTER (LEN=*), INTENT(IN) :: mode !< statistical analysis mode |
---|
1600 | INTEGER(iwp), INTENT(IN) :: sr !< |
---|
1601 | INTEGER(iwp), INTENT(IN) :: tn !< |
---|
1602 | INTEGER(iwp), INTENT(IN) :: dots_max !< maximum number of timeseries |
---|
1603 | |
---|
1604 | |
---|
1605 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific statistics', 'start' ) |
---|
1606 | |
---|
1607 | CALL dynamics_statistics( mode, sr, tn ) |
---|
1608 | |
---|
1609 | IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) |
---|
1610 | IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) |
---|
1611 | IF ( salsa ) CALL salsa_statistics( mode, sr, tn ) |
---|
1612 | |
---|
1613 | IF ( user_module_enabled ) CALL user_statistics( mode, sr, tn ) |
---|
1614 | |
---|
1615 | IF ( debug_output_timestep ) CALL debug_message( 'module-specific statistics', 'end' ) |
---|
1616 | |
---|
1617 | |
---|
1618 | END SUBROUTINE module_interface_statistics |
---|
1619 | |
---|
1620 | |
---|
1621 | !------------------------------------------------------------------------------! |
---|
1622 | ! Description: |
---|
1623 | ! ------------ |
---|
1624 | !> Read module-specific restart data globaly shared by all MPI ranks |
---|
1625 | !------------------------------------------------------------------------------! |
---|
1626 | SUBROUTINE module_interface_rrd_global( found ) |
---|
1627 | |
---|
1628 | |
---|
1629 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
1630 | |
---|
1631 | |
---|
1632 | IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'start' ) |
---|
1633 | |
---|
1634 | CALL dynamics_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1635 | |
---|
1636 | IF ( .NOT. found ) CALL bio_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1637 | IF ( .NOT. found ) CALL bcm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1638 | IF ( .NOT. found ) CALL flight_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1639 | IF ( .NOT. found ) CALL gust_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1640 | IF ( .NOT. found ) CALL lpm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1641 | IF ( .NOT. found ) CALL ocean_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1642 | IF ( .NOT. found ) CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable |
---|
1643 | IF ( .NOT. found ) CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1644 | IF ( .NOT. found ) CALL surface_data_output_rrd_global( found ) |
---|
1645 | |
---|
1646 | IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1647 | |
---|
1648 | IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'end' ) |
---|
1649 | |
---|
1650 | |
---|
1651 | END SUBROUTINE module_interface_rrd_global |
---|
1652 | |
---|
1653 | |
---|
1654 | !------------------------------------------------------------------------------! |
---|
1655 | ! Description: |
---|
1656 | ! ------------ |
---|
1657 | !> Write module-specific restart data globaly shared by all MPI ranks |
---|
1658 | !------------------------------------------------------------------------------! |
---|
1659 | SUBROUTINE module_interface_wrd_global |
---|
1660 | |
---|
1661 | |
---|
1662 | IF ( debug_output ) CALL debug_message( 'module-specific write global restart data', 'start' ) |
---|
1663 | |
---|
1664 | CALL dynamics_wrd_global |
---|
1665 | |
---|
1666 | IF ( biometeorology ) CALL bio_wrd_global |
---|
1667 | IF ( bulk_cloud_model ) CALL bcm_wrd_global |
---|
1668 | IF ( virtual_flight ) CALL flight_wrd_global |
---|
1669 | IF ( gust_module_enabled ) CALL gust_wrd_global |
---|
1670 | IF ( ocean_mode ) CALL ocean_wrd_global |
---|
1671 | IF ( syn_turb_gen ) CALL stg_wrd_global |
---|
1672 | IF ( wind_turbine ) CALL wtm_wrd_global |
---|
1673 | IF ( surface_output ) CALL surface_data_output_wrd_global |
---|
1674 | |
---|
1675 | IF ( user_module_enabled ) CALL user_wrd_global |
---|
1676 | |
---|
1677 | IF ( debug_output ) CALL debug_message( 'module-specific write global restart data', 'end' ) |
---|
1678 | |
---|
1679 | |
---|
1680 | END SUBROUTINE module_interface_wrd_global |
---|
1681 | |
---|
1682 | |
---|
1683 | !------------------------------------------------------------------------------! |
---|
1684 | ! Description: |
---|
1685 | ! ------------ |
---|
1686 | !> Read module-specific restart data specific to local MPI ranks |
---|
1687 | !------------------------------------------------------------------------------! |
---|
1688 | SUBROUTINE module_interface_rrd_local( map_index, & |
---|
1689 | nxlf, nxlc, nxl_on_file, & |
---|
1690 | nxrf, nxrc, nxr_on_file, & |
---|
1691 | nynf, nync, nyn_on_file, & |
---|
1692 | nysf, nysc, nys_on_file, & |
---|
1693 | tmp_2d, tmp_3d, found ) |
---|
1694 | |
---|
1695 | |
---|
1696 | INTEGER(iwp), INTENT(IN) :: map_index !< |
---|
1697 | INTEGER(iwp), INTENT(IN) :: nxlc !< |
---|
1698 | INTEGER(iwp), INTENT(IN) :: nxlf !< |
---|
1699 | INTEGER(iwp), INTENT(IN) :: nxl_on_file !< |
---|
1700 | INTEGER(iwp), INTENT(IN) :: nxrc !< |
---|
1701 | INTEGER(iwp), INTENT(IN) :: nxrf !< |
---|
1702 | INTEGER(iwp), INTENT(IN) :: nxr_on_file !< |
---|
1703 | INTEGER(iwp), INTENT(IN) :: nync !< |
---|
1704 | INTEGER(iwp), INTENT(IN) :: nynf !< |
---|
1705 | INTEGER(iwp), INTENT(IN) :: nyn_on_file !< |
---|
1706 | INTEGER(iwp), INTENT(IN) :: nysc !< |
---|
1707 | INTEGER(iwp), INTENT(IN) :: nysf !< |
---|
1708 | INTEGER(iwp), INTENT(IN) :: nys_on_file !< |
---|
1709 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
1710 | |
---|
1711 | REAL(wp), & |
---|
1712 | DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), & |
---|
1713 | INTENT(OUT) :: tmp_2d !< |
---|
1714 | REAL(wp), & |
---|
1715 | DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), & |
---|
1716 | INTENT(OUT) :: tmp_3d !< |
---|
1717 | |
---|
1718 | |
---|
1719 | IF ( debug_output ) CALL debug_message( 'module-specific read local restart data', 'start' ) |
---|
1720 | |
---|
1721 | CALL dynamics_rrd_local( & |
---|
1722 | map_index, & |
---|
1723 | nxlf, nxlc, nxl_on_file, & |
---|
1724 | nxrf, nxrc, nxr_on_file, & |
---|
1725 | nynf, nync, nyn_on_file, & |
---|
1726 | nysf, nysc, nys_on_file, & |
---|
1727 | tmp_2d, tmp_3d, found & |
---|
1728 | ) ! ToDo: change interface to pass variable |
---|
1729 | |
---|
1730 | IF ( .NOT. found ) CALL bio_rrd_local( & |
---|
1731 | found & |
---|
1732 | ) |
---|
1733 | |
---|
1734 | IF ( .NOT. found ) CALL bcm_rrd_local( & |
---|
1735 | map_index, & |
---|
1736 | nxlf, nxlc, nxl_on_file, & |
---|
1737 | nxrf, nxrc, nxr_on_file, & |
---|
1738 | nynf, nync, nyn_on_file, & |
---|
1739 | nysf, nysc, nys_on_file, & |
---|
1740 | tmp_2d, tmp_3d, found & |
---|
1741 | ) ! ToDo: change interface to pass variable |
---|
1742 | |
---|
1743 | IF ( .NOT. found ) CALL chem_rrd_local( & |
---|
1744 | map_index, & |
---|
1745 | nxlf, nxlc, nxl_on_file, & |
---|
1746 | nxrf, nxrc, nxr_on_file, & |
---|
1747 | nynf, nync, nyn_on_file, & |
---|
1748 | nysf, nysc, nys_on_file, & |
---|
1749 | tmp_3d, found & |
---|
1750 | ) ! ToDo: change interface to pass variable |
---|
1751 | |
---|
1752 | ! IF ( .NOT. found ) CALL doq_rrd_local( & |
---|
1753 | ! map_index, & |
---|
1754 | ! nxlf, nxlc, nxl_on_file, & |
---|
1755 | ! nxrf, nxrc, nxr_on_file, & |
---|
1756 | ! nynf, nync, nyn_on_file, & |
---|
1757 | ! nysf, nysc, nys_on_file, & |
---|
1758 | ! tmp_3d_non_standard, found & |
---|
1759 | ! ) ! ToDo: change interface to pass variable CALL doq_wrd_local |
---|
1760 | |
---|
1761 | IF ( .NOT. found ) CALL gust_rrd_local( & |
---|
1762 | map_index, & |
---|
1763 | nxlf, nxlc, nxl_on_file, & |
---|
1764 | nxrf, nxrc, nxr_on_file, & |
---|
1765 | nynf, nync, nyn_on_file, & |
---|
1766 | nysf, nysc, nys_on_file, & |
---|
1767 | tmp_2d, tmp_3d, found & |
---|
1768 | ) ! ToDo: change interface to pass variable |
---|
1769 | |
---|
1770 | IF ( .NOT. found ) CALL lpm_rrd_local( & |
---|
1771 | map_index, & |
---|
1772 | nxlf, nxlc, nxl_on_file, & |
---|
1773 | nxrf, nxrc, nxr_on_file, & |
---|
1774 | nynf, nync, nyn_on_file, & |
---|
1775 | nysf, nysc, nys_on_file, & |
---|
1776 | tmp_3d, found & |
---|
1777 | ) ! ToDo: change interface to pass variable |
---|
1778 | |
---|
1779 | IF ( .NOT. found ) CALL lsm_rrd_local( & |
---|
1780 | map_index, & |
---|
1781 | nxlf, nxlc, nxl_on_file, & |
---|
1782 | nxrf, nxrc, nxr_on_file, & |
---|
1783 | nynf, nync, nyn_on_file, & |
---|
1784 | nysf, nysc, nys_on_file, & |
---|
1785 | tmp_2d, found & |
---|
1786 | ) ! ToDo: change interface to pass variable |
---|
1787 | |
---|
1788 | IF ( .NOT. found ) CALL pcm_rrd_local( & |
---|
1789 | map_index, & |
---|
1790 | nxlf, nxlc, nxl_on_file, & |
---|
1791 | nxrf, nxrc, nxr_on_file, & |
---|
1792 | nynf, nync, nyn_on_file, & |
---|
1793 | nysf, nysc, nys_on_file, & |
---|
1794 | found & |
---|
1795 | ) |
---|
1796 | |
---|
1797 | IF ( .NOT. found ) CALL ocean_rrd_local( & |
---|
1798 | map_index, & |
---|
1799 | nxlf, nxlc, nxl_on_file, & |
---|
1800 | nxrf, nxrc, nxr_on_file, & |
---|
1801 | nynf, nync, nyn_on_file, & |
---|
1802 | nysf, nysc, nys_on_file, & |
---|
1803 | tmp_3d, found & |
---|
1804 | ) ! ToDo: change interface to pass variable |
---|
1805 | |
---|
1806 | IF ( .NOT. found ) CALL radiation_rrd_local( & |
---|
1807 | map_index, & |
---|
1808 | nxlf, nxlc, nxl_on_file, & |
---|
1809 | nxrf, nxrc, nxr_on_file, & |
---|
1810 | nynf, nync, nyn_on_file, & |
---|
1811 | nysf, nysc, nys_on_file, & |
---|
1812 | tmp_2d, tmp_3d, found & |
---|
1813 | ) ! ToDo: change interface to pass variable |
---|
1814 | |
---|
1815 | IF ( .NOT. found ) CALL salsa_rrd_local( & |
---|
1816 | map_index, & |
---|
1817 | nxlf, nxlc, nxl_on_file, & |
---|
1818 | nxrf, nxrc, nxr_on_file, & |
---|
1819 | nynf, nync, nyn_on_file, & |
---|
1820 | nysf, nysc, nys_on_file, & |
---|
1821 | tmp_3d, found & |
---|
1822 | ) ! ToDo: change interface to pass variable |
---|
1823 | |
---|
1824 | IF ( .NOT. found ) CALL usm_rrd_local( & |
---|
1825 | map_index, & |
---|
1826 | nxlf, nxlc, nxl_on_file, & |
---|
1827 | nxrf, nxr_on_file, & |
---|
1828 | nynf, nyn_on_file, & |
---|
1829 | nysf, nysc, nys_on_file, & |
---|
1830 | found & |
---|
1831 | ) ! ToDo: change interface to pass variable |
---|
1832 | ! |
---|
1833 | !-- Surface data do not need overlap data, so do not pass these information. |
---|
1834 | IF ( .NOT. found ) CALL surface_data_output_rrd_local( found ) |
---|
1835 | |
---|
1836 | IF ( .NOT. found ) CALL user_rrd_local( & |
---|
1837 | map_index, & |
---|
1838 | nxlf, nxlc, nxl_on_file, & |
---|
1839 | nxrf, nxrc, nxr_on_file, & |
---|
1840 | nynf, nync, nyn_on_file, & |
---|
1841 | nysf, nysc, nys_on_file, & |
---|
1842 | tmp_3d, found & |
---|
1843 | ) ! ToDo: change interface to pass variable |
---|
1844 | |
---|
1845 | IF ( debug_output ) CALL debug_message( 'module-specific read local restart data', 'end' ) |
---|
1846 | |
---|
1847 | |
---|
1848 | END SUBROUTINE module_interface_rrd_local |
---|
1849 | |
---|
1850 | |
---|
1851 | !------------------------------------------------------------------------------! |
---|
1852 | ! Description: |
---|
1853 | ! ------------ |
---|
1854 | !> Write module-specific restart data specific to local MPI ranks |
---|
1855 | !------------------------------------------------------------------------------! |
---|
1856 | SUBROUTINE module_interface_wrd_local |
---|
1857 | |
---|
1858 | |
---|
1859 | IF ( debug_output ) CALL debug_message( 'module-specific write local restart data', 'start' ) |
---|
1860 | |
---|
1861 | CALL dynamics_wrd_local |
---|
1862 | |
---|
1863 | IF ( biometeorology ) CALL bio_wrd_local |
---|
1864 | IF ( bulk_cloud_model ) CALL bcm_wrd_local |
---|
1865 | IF ( air_chemistry ) CALL chem_wrd_local |
---|
1866 | CALL doq_wrd_local |
---|
1867 | IF ( gust_module_enabled ) CALL gust_wrd_local |
---|
1868 | IF ( particle_advection ) CALL lpm_wrd_local |
---|
1869 | IF ( land_surface ) CALL lsm_wrd_local |
---|
1870 | IF ( plant_canopy ) CALL pcm_wrd_local |
---|
1871 | IF ( ocean_mode ) CALL ocean_wrd_local |
---|
1872 | IF ( radiation ) CALL radiation_wrd_local |
---|
1873 | IF ( salsa ) CALL salsa_wrd_local |
---|
1874 | IF ( urban_surface ) CALL usm_wrd_local |
---|
1875 | IF ( surface_output ) CALL surface_data_output_wrd_local |
---|
1876 | |
---|
1877 | IF ( user_module_enabled ) CALL user_wrd_local |
---|
1878 | |
---|
1879 | IF ( debug_output ) CALL debug_message( 'module-specific write local restart data', 'end' ) |
---|
1880 | |
---|
1881 | |
---|
1882 | END SUBROUTINE module_interface_wrd_local |
---|
1883 | |
---|
1884 | |
---|
1885 | !------------------------------------------------------------------------------! |
---|
1886 | ! Description: |
---|
1887 | ! ------------ |
---|
1888 | !> Perform module-specific last actions before the program terminates |
---|
1889 | !------------------------------------------------------------------------------! |
---|
1890 | SUBROUTINE module_interface_last_actions |
---|
1891 | |
---|
1892 | |
---|
1893 | IF ( debug_output ) CALL debug_message( 'module-specific last actions', 'start' ) |
---|
1894 | |
---|
1895 | CALL dynamics_last_actions |
---|
1896 | |
---|
1897 | IF ( virtual_measurement ) CALL vm_last_actions |
---|
1898 | |
---|
1899 | IF ( user_module_enabled ) CALL user_last_actions |
---|
1900 | |
---|
1901 | IF ( debug_output ) CALL debug_message( 'module-specific last actions', 'end' ) |
---|
1902 | |
---|
1903 | |
---|
1904 | END SUBROUTINE module_interface_last_actions |
---|
1905 | |
---|
1906 | |
---|
1907 | END MODULE module_interface |
---|