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-2019 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: module_interface.f90 3931 2019-04-24 16:34:28Z forkel $ |
---|
27 | ! Changed non_transport_physics to non_advective_processes |
---|
28 | ! |
---|
29 | ! 3930 2019-04-24 14:57:18Z forkel |
---|
30 | ! Correct/complete module_interface introduction for chemistry model |
---|
31 | ! |
---|
32 | ! 3887 2019 -04-12 08:47:41Z schwenkel |
---|
33 | ! Changes related to global restructuring of location messages and introduction |
---|
34 | ! of additional debug messages |
---|
35 | ! |
---|
36 | ! 3880 2019 -04-08 21:43:02Z knoop |
---|
37 | ! Add a call for salsa_prognostic_equations |
---|
38 | ! |
---|
39 | ! 3840 2019-03-29 10:35:52Z knoop |
---|
40 | ! bugfix: intent of dummy arguments changed to inout |
---|
41 | ! |
---|
42 | ! 3770 2019-02-28 11:22:32Z moh.hefny |
---|
43 | ! removed unused variables in module_interface_check_data_output_ts |
---|
44 | ! |
---|
45 | ! 3767 08:18:02Z raasch |
---|
46 | ! unused variable file_index removed from subroutine parameter list |
---|
47 | ! |
---|
48 | ! 3766 2019-02-26 16:23:41Z raasch |
---|
49 | ! first argument removed from module_interface_rrd_*, statement added to avoid |
---|
50 | ! compiler warning about unused variable, file reformatted with respect to coding |
---|
51 | ! standards |
---|
52 | ! |
---|
53 | ! 3762 2019-02-25 16:54:16Z suehring |
---|
54 | ! only pass required arguments to surface_data_output_rrd_local |
---|
55 | ! |
---|
56 | ! 3747 2019-02-16 15:15:23Z gronemeier |
---|
57 | ! Call user_init_arrays |
---|
58 | ! |
---|
59 | ! 3745 2019-02-15 18:57:56Z suehring |
---|
60 | ! Add indoor model |
---|
61 | ! |
---|
62 | ! 3744 2019-02-15 18:38:58Z suehring |
---|
63 | ! Removed bio_check_parameters as the method is empty. |
---|
64 | ! |
---|
65 | ! 3735 2019-02-12 09:52:40Z dom_dwd_user |
---|
66 | ! Accepting variable j from check_parameters and passing it to |
---|
67 | ! bio_check_data_output |
---|
68 | ! Add required restart data for surface output module |
---|
69 | ! |
---|
70 | ! 3731 2019-02-11 13:06:27Z suehring |
---|
71 | ! Add check_parameters routine for virtual measurements |
---|
72 | ! |
---|
73 | ! 3711 2019-01-31 13:44:26Z knoop |
---|
74 | ! Introduced module_interface_init_checks for post-init checks |
---|
75 | ! |
---|
76 | ! 3705 2019-01-29 19:56:39Z suehring |
---|
77 | ! Add last_actions for virtual measurements |
---|
78 | ! |
---|
79 | ! 3704 2019-01-29 19:51:41Z suehring |
---|
80 | ! Some interface calls moved to module_interface + cleanup |
---|
81 | ! |
---|
82 | ! 3684 2019-01-20 20:20:58Z knoop |
---|
83 | ! Bugfix: made unit intend INOUT |
---|
84 | ! |
---|
85 | ! 3650 2019-01-04 13:01:33Z kanani |
---|
86 | ! Add restart routines for biometeorology |
---|
87 | ! |
---|
88 | ! 3649 2019-01-02 16:52:21Z suehring |
---|
89 | ! Initialize strings, in order to avoid compiler warnings for non-initialized |
---|
90 | ! characters with intent(out) attribute |
---|
91 | ! |
---|
92 | ! 3648 2019-01-02 16:35:46Z suehring |
---|
93 | ! Rename subroutines for surface-data output |
---|
94 | ! |
---|
95 | ! 3641 2018-12-23 22:10:01Z knoop |
---|
96 | ! Initial implementation of the PALM module interface |
---|
97 | ! |
---|
98 | ! |
---|
99 | ! Description: |
---|
100 | ! ------------ |
---|
101 | !> This is the interface between the PALM model core and all its modules. |
---|
102 | !> |
---|
103 | !> @todo Re-format module to be consistent with coding standard |
---|
104 | !------------------------------------------------------------------------------! |
---|
105 | MODULE module_interface |
---|
106 | |
---|
107 | USE indices, & |
---|
108 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt |
---|
109 | |
---|
110 | USE kinds |
---|
111 | |
---|
112 | ! |
---|
113 | !-- load module-specific control parameters. |
---|
114 | !-- ToDo: move all of them to respective module or a dedicated central module |
---|
115 | USE control_parameters, & |
---|
116 | ONLY: biometeorology, & |
---|
117 | air_chemistry, & |
---|
118 | indoor_model, & |
---|
119 | land_surface, & |
---|
120 | large_scale_forcing, & |
---|
121 | nesting_offline, & |
---|
122 | nudging, & |
---|
123 | ocean_mode, & |
---|
124 | plant_canopy, & |
---|
125 | salsa, & |
---|
126 | surface_output, & |
---|
127 | syn_turb_gen, & |
---|
128 | urban_surface, & |
---|
129 | virtual_flight, & |
---|
130 | virtual_measurement, & |
---|
131 | wind_turbine |
---|
132 | |
---|
133 | ! |
---|
134 | !-- load interface routines of all PALM modules |
---|
135 | USE biometeorology_mod, & |
---|
136 | ONLY: bio_parin, & |
---|
137 | bio_check_data_output, & |
---|
138 | bio_init, & |
---|
139 | bio_init_checks, & |
---|
140 | bio_header, & |
---|
141 | bio_3d_data_averaging, & |
---|
142 | bio_data_output_2d, & |
---|
143 | bio_data_output_3d, & |
---|
144 | bio_rrd_global, & |
---|
145 | bio_rrd_local, & |
---|
146 | bio_wrd_global, & |
---|
147 | bio_wrd_local |
---|
148 | |
---|
149 | USE bulk_cloud_model_mod, & |
---|
150 | ONLY: bulk_cloud_model, & |
---|
151 | bcm_parin, & |
---|
152 | bcm_check_parameters, & |
---|
153 | bcm_check_data_output_pr, & |
---|
154 | bcm_check_data_output, & |
---|
155 | bcm_init_arrays, & |
---|
156 | bcm_init, & |
---|
157 | bcm_header, & |
---|
158 | bcm_actions, & |
---|
159 | bcm_non_advective_processes, & |
---|
160 | bcm_exchange_horiz, & |
---|
161 | bcm_prognostic_equations, & |
---|
162 | bcm_swap_timelevel, & |
---|
163 | bcm_3d_data_averaging, & |
---|
164 | bcm_data_output_2d, & |
---|
165 | bcm_data_output_3d, & |
---|
166 | bcm_rrd_global, & |
---|
167 | bcm_wrd_global, & |
---|
168 | bcm_rrd_local, & |
---|
169 | bcm_wrd_local |
---|
170 | |
---|
171 | USE chemistry_model_mod, & |
---|
172 | ONLY: chem_parin, & |
---|
173 | chem_check_parameters, & |
---|
174 | chem_check_data_output_pr, & |
---|
175 | chem_check_data_output, & |
---|
176 | chem_exchange_horiz_bounds, & |
---|
177 | chem_init_arrays, & |
---|
178 | chem_init, & |
---|
179 | chem_header, & |
---|
180 | chem_actions, & |
---|
181 | chem_non_advective_processes, & |
---|
182 | chem_prognostic_equations, & |
---|
183 | chem_swap_timelevel, & |
---|
184 | chem_3d_data_averaging, & |
---|
185 | chem_data_output_2d, & |
---|
186 | chem_data_output_3d, & |
---|
187 | chem_statistics, & |
---|
188 | chem_rrd_local, & |
---|
189 | chem_wrd_local |
---|
190 | |
---|
191 | USE flight_mod, & |
---|
192 | ONLY: flight_parin, & |
---|
193 | flight_header, & |
---|
194 | flight_init, & |
---|
195 | flight_rrd_global, & |
---|
196 | flight_wrd_global |
---|
197 | |
---|
198 | USE gust_mod, & |
---|
199 | ONLY: gust_module_enabled, & |
---|
200 | gust_parin, & |
---|
201 | gust_check_parameters, & |
---|
202 | gust_check_data_output_pr, & |
---|
203 | gust_check_data_output, & |
---|
204 | gust_init_arrays, & |
---|
205 | gust_init, & |
---|
206 | gust_header, & |
---|
207 | gust_actions, & |
---|
208 | gust_prognostic_equations, & |
---|
209 | gust_swap_timelevel, & |
---|
210 | gust_3d_data_averaging, & |
---|
211 | gust_data_output_2d, & |
---|
212 | gust_data_output_3d, & |
---|
213 | gust_statistics, & |
---|
214 | gust_rrd_global, & |
---|
215 | gust_wrd_global, & |
---|
216 | gust_rrd_local, & |
---|
217 | gust_wrd_local |
---|
218 | |
---|
219 | USE indoor_model_mod, & |
---|
220 | ONLY: im_parin, & |
---|
221 | im_check_data_output, & |
---|
222 | im_check_parameters, & |
---|
223 | im_data_output_3d, & |
---|
224 | im_init |
---|
225 | |
---|
226 | USE land_surface_model_mod, & |
---|
227 | ONLY: lsm_parin, & |
---|
228 | lsm_check_parameters, & |
---|
229 | lsm_check_data_output_pr, & |
---|
230 | lsm_check_data_output, & |
---|
231 | lsm_init_arrays, & |
---|
232 | lsm_init, & |
---|
233 | lsm_header, & |
---|
234 | lsm_swap_timelevel, & |
---|
235 | lsm_3d_data_averaging, & |
---|
236 | lsm_data_output_2d, & |
---|
237 | lsm_rrd_local, & |
---|
238 | lsm_wrd_local |
---|
239 | |
---|
240 | USE lsf_nudging_mod, & |
---|
241 | ONLY: lsf_nudging_check_parameters, & |
---|
242 | lsf_nudging_check_data_output_pr, & |
---|
243 | lsf_init, & |
---|
244 | nudge_init, & |
---|
245 | lsf_nudging_header |
---|
246 | |
---|
247 | USE multi_agent_system_mod, & |
---|
248 | ONLY: mas_parin |
---|
249 | |
---|
250 | USE nesting_offl_mod, & |
---|
251 | ONLY: nesting_offl_parin, & |
---|
252 | nesting_offl_check_parameters, & |
---|
253 | nesting_offl_header |
---|
254 | |
---|
255 | USE ocean_mod, & |
---|
256 | ONLY: ocean_parin, & |
---|
257 | ocean_check_parameters, & |
---|
258 | ocean_check_data_output_pr, & |
---|
259 | ocean_check_data_output, & |
---|
260 | ocean_init_arrays, & |
---|
261 | ocean_init, & |
---|
262 | ocean_header, & |
---|
263 | ocean_actions, & |
---|
264 | ocean_prognostic_equations, & |
---|
265 | ocean_swap_timelevel, & |
---|
266 | ocean_3d_data_averaging, & |
---|
267 | ocean_data_output_2d, & |
---|
268 | ocean_data_output_3d, & |
---|
269 | ocean_rrd_global, & |
---|
270 | ocean_wrd_global, & |
---|
271 | ocean_rrd_local, & |
---|
272 | ocean_wrd_local |
---|
273 | |
---|
274 | USE plant_canopy_model_mod, & |
---|
275 | ONLY: pcm_parin, & |
---|
276 | pcm_check_parameters, & |
---|
277 | pcm_check_data_output, & |
---|
278 | pcm_init, & |
---|
279 | pcm_header, & |
---|
280 | pcm_data_output_3d |
---|
281 | |
---|
282 | USE radiation_model_mod, & |
---|
283 | ONLY: radiation, & |
---|
284 | radiation_parin, & |
---|
285 | radiation_check_parameters, & |
---|
286 | radiation_check_data_output_ts, & |
---|
287 | radiation_check_data_output_pr, & |
---|
288 | radiation_check_data_output, & |
---|
289 | radiation_init, & |
---|
290 | radiation_header, & |
---|
291 | radiation_3d_data_averaging, & |
---|
292 | radiation_data_output_2d, & |
---|
293 | radiation_data_output_3d, & |
---|
294 | radiation_rrd_local, & |
---|
295 | radiation_wrd_local |
---|
296 | |
---|
297 | USE salsa_mod, & |
---|
298 | ONLY: salsa_parin, & |
---|
299 | salsa_check_parameters, & |
---|
300 | salsa_check_data_output, & |
---|
301 | salsa_init_arrays, & |
---|
302 | salsa_init, & |
---|
303 | salsa_header, & |
---|
304 | salsa_actions, & |
---|
305 | salsa_prognostic_equations, & |
---|
306 | salsa_swap_timelevel, & |
---|
307 | salsa_3d_data_averaging, & |
---|
308 | salsa_data_output_2d, & |
---|
309 | salsa_data_output_3d, & |
---|
310 | salsa_rrd_local, & |
---|
311 | salsa_wrd_local |
---|
312 | |
---|
313 | USE spectra_mod, & |
---|
314 | ONLY: calculate_spectra, & |
---|
315 | spectra_parin, & |
---|
316 | spectra_check_parameters, & |
---|
317 | spectra_header |
---|
318 | |
---|
319 | USE surface_data_output_mod, & |
---|
320 | ONLY: surface_data_output_parin, & |
---|
321 | surface_data_output_check_parameters, & |
---|
322 | surface_data_output_init_arrays, & |
---|
323 | surface_data_output_rrd_local, & |
---|
324 | surface_data_output_rrd_global, & |
---|
325 | surface_data_output_wrd_local, & |
---|
326 | surface_data_output_wrd_global |
---|
327 | |
---|
328 | USE synthetic_turbulence_generator_mod, & |
---|
329 | ONLY: stg_parin, & |
---|
330 | stg_check_parameters, & |
---|
331 | stg_header, & |
---|
332 | stg_rrd_global, & |
---|
333 | stg_wrd_global |
---|
334 | |
---|
335 | USE urban_surface_mod, & |
---|
336 | ONLY: usm_parin, & |
---|
337 | usm_check_parameters, & |
---|
338 | usm_check_data_output, & |
---|
339 | usm_init_arrays, & |
---|
340 | usm_init, & |
---|
341 | usm_swap_timelevel, & |
---|
342 | usm_3d_data_averaging, & |
---|
343 | usm_rrd_local, & |
---|
344 | usm_wrd_local |
---|
345 | |
---|
346 | USE user, & |
---|
347 | ONLY: user_module_enabled, & |
---|
348 | user_parin, & |
---|
349 | user_check_parameters, & |
---|
350 | user_check_data_output_ts, & |
---|
351 | user_check_data_output_pr, & |
---|
352 | user_check_data_output, & |
---|
353 | user_init, & |
---|
354 | user_init_arrays, & |
---|
355 | user_header, & |
---|
356 | user_actions, & |
---|
357 | user_3d_data_averaging, & |
---|
358 | user_data_output_2d, & |
---|
359 | user_data_output_3d, & |
---|
360 | user_statistics, & |
---|
361 | user_rrd_global, & |
---|
362 | user_rrd_local, & |
---|
363 | user_wrd_global, & |
---|
364 | user_wrd_local, & |
---|
365 | user_last_actions |
---|
366 | |
---|
367 | USE virtual_measurement_mod, & |
---|
368 | ONLY: vm_check_parameters, & |
---|
369 | vm_init, & |
---|
370 | vm_last_actions, & |
---|
371 | vm_parin |
---|
372 | |
---|
373 | USE wind_turbine_model_mod, & |
---|
374 | ONLY: wtm_parin, & |
---|
375 | wtm_check_parameters, & |
---|
376 | wtm_init_arrays, & |
---|
377 | wtm_init, & |
---|
378 | wtm_actions, & |
---|
379 | wtm_rrd_global, & |
---|
380 | wtm_wrd_global |
---|
381 | |
---|
382 | IMPLICIT NONE |
---|
383 | |
---|
384 | PRIVATE |
---|
385 | |
---|
386 | ! |
---|
387 | !-- Public functions |
---|
388 | PUBLIC & |
---|
389 | module_interface_parin, & |
---|
390 | module_interface_check_parameters, & |
---|
391 | module_interface_check_data_output_ts, & |
---|
392 | module_interface_check_data_output_pr, & |
---|
393 | module_interface_check_data_output, & |
---|
394 | module_interface_init_masks, & |
---|
395 | module_interface_define_netcdf_grid, & |
---|
396 | module_interface_init_arrays, & |
---|
397 | module_interface_init, & |
---|
398 | module_interface_init_checks, & |
---|
399 | module_interface_header, & |
---|
400 | module_interface_actions, & |
---|
401 | module_interface_non_advective_processes, & |
---|
402 | module_interface_exchange_horiz, & |
---|
403 | module_interface_prognostic_equations, & |
---|
404 | module_interface_swap_timelevel, & |
---|
405 | module_interface_3d_data_averaging, & |
---|
406 | module_interface_data_output_2d, & |
---|
407 | module_interface_data_output_3d, & |
---|
408 | module_interface_statistics, & |
---|
409 | module_interface_rrd_global, & |
---|
410 | module_interface_wrd_global, & |
---|
411 | module_interface_rrd_local, & |
---|
412 | module_interface_wrd_local, & |
---|
413 | module_interface_last_actions |
---|
414 | |
---|
415 | |
---|
416 | INTERFACE module_interface_parin |
---|
417 | MODULE PROCEDURE module_interface_parin |
---|
418 | END INTERFACE module_interface_parin |
---|
419 | |
---|
420 | INTERFACE module_interface_check_parameters |
---|
421 | MODULE PROCEDURE module_interface_check_parameters |
---|
422 | END INTERFACE module_interface_check_parameters |
---|
423 | |
---|
424 | INTERFACE module_interface_check_data_output_ts |
---|
425 | MODULE PROCEDURE module_interface_check_data_output_ts |
---|
426 | END INTERFACE module_interface_check_data_output_ts |
---|
427 | |
---|
428 | INTERFACE module_interface_check_data_output_pr |
---|
429 | MODULE PROCEDURE module_interface_check_data_output_pr |
---|
430 | END INTERFACE module_interface_check_data_output_pr |
---|
431 | |
---|
432 | INTERFACE module_interface_check_data_output |
---|
433 | MODULE PROCEDURE module_interface_check_data_output |
---|
434 | END INTERFACE module_interface_check_data_output |
---|
435 | |
---|
436 | INTERFACE module_interface_init_masks |
---|
437 | MODULE PROCEDURE module_interface_init_masks |
---|
438 | END INTERFACE module_interface_init_masks |
---|
439 | |
---|
440 | INTERFACE module_interface_define_netcdf_grid |
---|
441 | MODULE PROCEDURE module_interface_define_netcdf_grid |
---|
442 | END INTERFACE module_interface_define_netcdf_grid |
---|
443 | |
---|
444 | INTERFACE module_interface_init_arrays |
---|
445 | MODULE PROCEDURE module_interface_init_arrays |
---|
446 | END INTERFACE module_interface_init_arrays |
---|
447 | |
---|
448 | INTERFACE module_interface_init |
---|
449 | MODULE PROCEDURE module_interface_init |
---|
450 | END INTERFACE module_interface_init |
---|
451 | |
---|
452 | INTERFACE module_interface_init_checks |
---|
453 | MODULE PROCEDURE module_interface_init_checks |
---|
454 | END INTERFACE module_interface_init_checks |
---|
455 | |
---|
456 | INTERFACE module_interface_header |
---|
457 | MODULE PROCEDURE module_interface_header |
---|
458 | END INTERFACE module_interface_header |
---|
459 | |
---|
460 | INTERFACE module_interface_actions |
---|
461 | MODULE PROCEDURE module_interface_actions |
---|
462 | MODULE PROCEDURE module_interface_actions_ij |
---|
463 | END INTERFACE module_interface_actions |
---|
464 | |
---|
465 | INTERFACE module_interface_non_advective_processes |
---|
466 | MODULE PROCEDURE module_interface_non_advective_processes |
---|
467 | MODULE PROCEDURE module_interface_non_advective_processes_ij |
---|
468 | END INTERFACE module_interface_non_advective_processes |
---|
469 | |
---|
470 | INTERFACE module_interface_exchange_horiz |
---|
471 | MODULE PROCEDURE module_interface_exchange_horiz |
---|
472 | END INTERFACE module_interface_exchange_horiz |
---|
473 | |
---|
474 | INTERFACE module_interface_prognostic_equations |
---|
475 | MODULE PROCEDURE module_interface_prognostic_equations |
---|
476 | MODULE PROCEDURE module_interface_prognostic_equations_ij |
---|
477 | END INTERFACE module_interface_prognostic_equations |
---|
478 | |
---|
479 | INTERFACE module_interface_swap_timelevel |
---|
480 | MODULE PROCEDURE module_interface_swap_timelevel |
---|
481 | END INTERFACE module_interface_swap_timelevel |
---|
482 | |
---|
483 | INTERFACE module_interface_3d_data_averaging |
---|
484 | MODULE PROCEDURE module_interface_3d_data_averaging |
---|
485 | END INTERFACE module_interface_3d_data_averaging |
---|
486 | |
---|
487 | INTERFACE module_interface_data_output_2d |
---|
488 | MODULE PROCEDURE module_interface_data_output_2d |
---|
489 | END INTERFACE module_interface_data_output_2d |
---|
490 | |
---|
491 | INTERFACE module_interface_data_output_3d |
---|
492 | MODULE PROCEDURE module_interface_data_output_3d |
---|
493 | END INTERFACE module_interface_data_output_3d |
---|
494 | |
---|
495 | INTERFACE module_interface_statistics |
---|
496 | MODULE PROCEDURE module_interface_statistics |
---|
497 | END INTERFACE module_interface_statistics |
---|
498 | |
---|
499 | INTERFACE module_interface_rrd_global |
---|
500 | MODULE PROCEDURE module_interface_rrd_global |
---|
501 | END INTERFACE module_interface_rrd_global |
---|
502 | |
---|
503 | INTERFACE module_interface_wrd_global |
---|
504 | MODULE PROCEDURE module_interface_wrd_global |
---|
505 | END INTERFACE module_interface_wrd_global |
---|
506 | |
---|
507 | INTERFACE module_interface_rrd_local |
---|
508 | MODULE PROCEDURE module_interface_rrd_local |
---|
509 | END INTERFACE module_interface_rrd_local |
---|
510 | |
---|
511 | INTERFACE module_interface_wrd_local |
---|
512 | MODULE PROCEDURE module_interface_wrd_local |
---|
513 | END INTERFACE module_interface_wrd_local |
---|
514 | |
---|
515 | INTERFACE module_interface_last_actions |
---|
516 | MODULE PROCEDURE module_interface_last_actions |
---|
517 | END INTERFACE module_interface_last_actions |
---|
518 | |
---|
519 | |
---|
520 | CONTAINS |
---|
521 | |
---|
522 | |
---|
523 | !------------------------------------------------------------------------------! |
---|
524 | ! Description: |
---|
525 | ! ------------ |
---|
526 | !> Read module-specific parameter namelists |
---|
527 | !------------------------------------------------------------------------------! |
---|
528 | SUBROUTINE module_interface_parin |
---|
529 | |
---|
530 | |
---|
531 | CALL bio_parin |
---|
532 | CALL bcm_parin |
---|
533 | CALL chem_parin |
---|
534 | CALL flight_parin ! ToDo: rename module to match filename |
---|
535 | CALL gust_parin |
---|
536 | CALL im_parin |
---|
537 | CALL lsm_parin |
---|
538 | ! ToDo: create parin routine for large_scale_forcing and nudging (should be seperate modules or new module switch) |
---|
539 | CALL mas_parin |
---|
540 | CALL nesting_offl_parin |
---|
541 | CALL ocean_parin |
---|
542 | CALL pcm_parin |
---|
543 | CALL radiation_parin |
---|
544 | CALL salsa_parin |
---|
545 | CALL spectra_parin |
---|
546 | CALL surface_data_output_parin |
---|
547 | CALL stg_parin |
---|
548 | CALL user_parin ! ToDo: make user code a single Fortran module |
---|
549 | CALL usm_parin |
---|
550 | CALL vm_parin |
---|
551 | CALL wtm_parin |
---|
552 | |
---|
553 | CALL package_parin ! ToDo: deprecated, needs to be dissolved |
---|
554 | |
---|
555 | |
---|
556 | END SUBROUTINE module_interface_parin |
---|
557 | |
---|
558 | |
---|
559 | !------------------------------------------------------------------------------! |
---|
560 | ! Description: |
---|
561 | ! ------------ |
---|
562 | !> Perform module-specific initialization checks |
---|
563 | !------------------------------------------------------------------------------! |
---|
564 | SUBROUTINE module_interface_check_parameters |
---|
565 | |
---|
566 | |
---|
567 | IF ( bulk_cloud_model ) CALL bcm_check_parameters |
---|
568 | IF ( air_chemistry ) CALL chem_check_parameters |
---|
569 | IF ( gust_module_enabled ) CALL gust_check_parameters |
---|
570 | IF ( indoor_model ) CALL im_check_parameters |
---|
571 | IF ( land_surface ) CALL lsm_check_parameters |
---|
572 | IF ( large_scale_forcing .OR. nudging ) CALL lsf_nudging_check_parameters ! ToDo: create single module switch |
---|
573 | IF ( nesting_offline ) CALL nesting_offl_check_parameters |
---|
574 | IF ( ocean_mode ) CALL ocean_check_parameters |
---|
575 | IF ( plant_canopy ) CALL pcm_check_parameters |
---|
576 | IF ( radiation ) CALL radiation_check_parameters |
---|
577 | IF ( salsa ) CALL salsa_check_parameters |
---|
578 | IF ( calculate_spectra ) CALL spectra_check_parameters |
---|
579 | IF ( surface_output ) CALL surface_data_output_check_parameters |
---|
580 | IF ( syn_turb_gen ) CALL stg_check_parameters |
---|
581 | IF ( urban_surface ) CALL usm_check_parameters |
---|
582 | IF ( virtual_measurement ) CALL vm_check_parameters |
---|
583 | IF ( wind_turbine ) CALL wtm_check_parameters |
---|
584 | IF ( user_module_enabled ) CALL user_check_parameters |
---|
585 | |
---|
586 | |
---|
587 | END SUBROUTINE module_interface_check_parameters |
---|
588 | |
---|
589 | |
---|
590 | !------------------------------------------------------------------------------! |
---|
591 | ! Description: |
---|
592 | ! ------------ |
---|
593 | !> Check module-specific data output of timeseries |
---|
594 | !------------------------------------------------------------------------------! |
---|
595 | SUBROUTINE module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
596 | |
---|
597 | |
---|
598 | INTEGER(iwp), INTENT(IN) :: dots_max !< variable output array index |
---|
599 | INTEGER(iwp), INTENT(INOUT) :: dots_num !< variable output array index |
---|
600 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label |
---|
601 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit |
---|
602 | |
---|
603 | |
---|
604 | IF ( radiation ) THEN |
---|
605 | CALL radiation_check_data_output_ts( dots_max, dots_num ) |
---|
606 | ENDIF |
---|
607 | |
---|
608 | IF ( user_module_enabled ) THEN |
---|
609 | CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
610 | ENDIF |
---|
611 | |
---|
612 | |
---|
613 | END SUBROUTINE module_interface_check_data_output_ts |
---|
614 | |
---|
615 | |
---|
616 | !------------------------------------------------------------------------------! |
---|
617 | ! Description: |
---|
618 | ! ------------ |
---|
619 | !> Check module-specific data output of profiles |
---|
620 | !------------------------------------------------------------------------------! |
---|
621 | SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit, & |
---|
622 | dopr_unit ) |
---|
623 | |
---|
624 | |
---|
625 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
626 | INTEGER(iwp), INTENT(IN) :: var_count !< variable output array index |
---|
627 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
628 | CHARACTER (LEN=*), INTENT(OUT) :: dopr_unit !< local value of dopr_unit |
---|
629 | |
---|
630 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
631 | CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
632 | ENDIF |
---|
633 | |
---|
634 | IF ( unit == 'illegal' .AND. air_chemistry ) THEN |
---|
635 | CALL chem_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
636 | ENDIF |
---|
637 | |
---|
638 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
639 | CALL gust_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
640 | ENDIF |
---|
641 | |
---|
642 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
643 | CALL lsm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
644 | ENDIF |
---|
645 | |
---|
646 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
647 | CALL lsf_nudging_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
648 | ENDIF |
---|
649 | |
---|
650 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
651 | CALL ocean_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
652 | ENDIF |
---|
653 | |
---|
654 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
655 | CALL radiation_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
656 | ENDIF |
---|
657 | |
---|
658 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
659 | unit = '' ! ToDo: Seems like a hack. Find a general soultion! |
---|
660 | CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
661 | ENDIF |
---|
662 | |
---|
663 | |
---|
664 | END SUBROUTINE module_interface_check_data_output_pr |
---|
665 | |
---|
666 | !------------------------------------------------------------------------------! |
---|
667 | ! Description: |
---|
668 | ! ------------ |
---|
669 | !> Check module-specific 2D and 3D data output |
---|
670 | !------------------------------------------------------------------------------! |
---|
671 | SUBROUTINE module_interface_check_data_output( variable, unit, i, j, ilen, k ) |
---|
672 | |
---|
673 | |
---|
674 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
675 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
676 | |
---|
677 | INTEGER(iwp), INTENT(IN) :: i !< ToDo: remove dummy argument, instead pass string from data_output |
---|
678 | INTEGER(iwp), INTENT(IN) :: j !< average quantity? 0 = no, 1 = yes |
---|
679 | INTEGER(iwp), INTENT(IN) :: ilen !< ToDo: remove dummy argument, instead pass string from data_output |
---|
680 | INTEGER(iwp), INTENT(IN) :: k !< ToDo: remove dummy argument, instead pass string from data_output |
---|
681 | |
---|
682 | IF ( unit == 'illegal' .AND. biometeorology ) THEN |
---|
683 | CALL bio_check_data_output( variable, unit, i, j, ilen, k ) |
---|
684 | ENDIF |
---|
685 | |
---|
686 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
687 | CALL bcm_check_data_output( variable, unit ) |
---|
688 | ENDIF |
---|
689 | |
---|
690 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
691 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
692 | CALL chem_check_data_output( variable, unit, i, ilen, k ) |
---|
693 | ENDIF |
---|
694 | |
---|
695 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
696 | CALL gust_check_data_output( variable, unit ) |
---|
697 | ENDIF |
---|
698 | |
---|
699 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
700 | CALL lsm_check_data_output( variable, unit, i, ilen, k ) |
---|
701 | ENDIF |
---|
702 | |
---|
703 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
704 | CALL ocean_check_data_output( variable, unit ) |
---|
705 | ENDIF |
---|
706 | |
---|
707 | IF ( unit == 'illegal' .AND. plant_canopy & |
---|
708 | .AND. variable(1:4) == 'pcm_' ) THEN ! ToDo: remove aditional conditions |
---|
709 | CALL pcm_check_data_output( variable, unit ) |
---|
710 | ENDIF |
---|
711 | |
---|
712 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
713 | CALL radiation_check_data_output( variable, unit, i, ilen, k ) |
---|
714 | ENDIF |
---|
715 | |
---|
716 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
717 | CALL salsa_check_data_output( variable, unit ) |
---|
718 | ENDIF |
---|
719 | |
---|
720 | IF ( unit == 'illegal' .AND. indoor_model ) THEN |
---|
721 | CALL im_check_data_output( variable, unit ) |
---|
722 | ENDIF |
---|
723 | |
---|
724 | IF ( unit == 'illegal' .AND. urban_surface & |
---|
725 | .AND. variable(1:4) == 'usm_' ) THEN ! ToDo: remove aditional conditions |
---|
726 | CALL usm_check_data_output( variable, unit ) |
---|
727 | ENDIF |
---|
728 | |
---|
729 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
730 | unit = '' |
---|
731 | CALL user_check_data_output( variable, unit ) |
---|
732 | ENDIF |
---|
733 | |
---|
734 | |
---|
735 | END SUBROUTINE module_interface_check_data_output |
---|
736 | |
---|
737 | |
---|
738 | !------------------------------------------------------------------------------! |
---|
739 | ! |
---|
740 | ! Description: |
---|
741 | ! ------------ |
---|
742 | !> Interface for init_masks. ToDo: get rid of these redundant calls! |
---|
743 | !------------------------------------------------------------------------------! |
---|
744 | SUBROUTINE module_interface_init_masks( variable, unit ) |
---|
745 | |
---|
746 | |
---|
747 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
748 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
749 | |
---|
750 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
751 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
752 | CALL chem_check_data_output( variable, unit, 0, 0, 0 ) |
---|
753 | ENDIF |
---|
754 | |
---|
755 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
756 | CALL radiation_check_data_output( variable, unit, 0, 0, 0 ) |
---|
757 | ENDIF |
---|
758 | |
---|
759 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
760 | CALL salsa_check_data_output( variable, unit ) |
---|
761 | ENDIF |
---|
762 | |
---|
763 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
764 | unit = '' |
---|
765 | CALL user_check_data_output( variable, unit ) |
---|
766 | ENDIF |
---|
767 | |
---|
768 | |
---|
769 | END SUBROUTINE module_interface_init_masks |
---|
770 | |
---|
771 | |
---|
772 | !------------------------------------------------------------------------------! |
---|
773 | ! |
---|
774 | ! Description: |
---|
775 | ! ------------ |
---|
776 | !> Define appropriate grid for module-specific netcdf output variables. |
---|
777 | !------------------------------------------------------------------------------! |
---|
778 | SUBROUTINE module_interface_define_netcdf_grid( var, found, & |
---|
779 | grid_x, grid_y, grid_z ) |
---|
780 | |
---|
781 | |
---|
782 | CHARACTER (LEN=*), INTENT(IN) :: var !< variable name |
---|
783 | LOGICAL, INTENT(OUT) :: found !< indicates if variable was found |
---|
784 | CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< netcdf dimension in x-direction |
---|
785 | CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< netcdf dimension in y-direction |
---|
786 | CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< netcdf dimension in z-direction |
---|
787 | ! |
---|
788 | !-- As long as no action is done in this subroutine, initialize strings with |
---|
789 | !-- intent(out) attribute, in order to avoid compiler warnings. |
---|
790 | found = .FALSE. |
---|
791 | grid_x = 'none' |
---|
792 | grid_y = 'none' |
---|
793 | grid_z = 'none' |
---|
794 | ! |
---|
795 | !-- Use var to avoid compiler warning about unused variable |
---|
796 | IF ( var == ' ' ) RETURN |
---|
797 | |
---|
798 | END SUBROUTINE module_interface_define_netcdf_grid |
---|
799 | |
---|
800 | |
---|
801 | !------------------------------------------------------------------------------! |
---|
802 | ! Description: |
---|
803 | ! ------------ |
---|
804 | !> Allocate module-specific arrays and pointers |
---|
805 | !------------------------------------------------------------------------------! |
---|
806 | SUBROUTINE module_interface_init_arrays |
---|
807 | |
---|
808 | |
---|
809 | CALL location_message( 'initializing module-specific arrays', 'start' ) |
---|
810 | |
---|
811 | IF ( bulk_cloud_model ) CALL bcm_init_arrays |
---|
812 | IF ( air_chemistry ) CALL chem_init_arrays |
---|
813 | IF ( gust_module_enabled ) CALL gust_init_arrays |
---|
814 | IF ( land_surface ) CALL lsm_init_arrays |
---|
815 | IF ( ocean_mode ) CALL ocean_init_arrays |
---|
816 | IF ( salsa ) CALL salsa_init_arrays |
---|
817 | IF ( urban_surface ) CALL usm_init_arrays |
---|
818 | IF ( surface_output ) CALL surface_data_output_init_arrays |
---|
819 | IF ( wind_turbine ) CALL wtm_init_arrays |
---|
820 | IF ( user_module_enabled ) CALL user_init_arrays |
---|
821 | |
---|
822 | CALL location_message( 'initializing module-specific arrays', 'finished' ) |
---|
823 | |
---|
824 | |
---|
825 | END SUBROUTINE module_interface_init_arrays |
---|
826 | |
---|
827 | |
---|
828 | !------------------------------------------------------------------------------! |
---|
829 | ! Description: |
---|
830 | ! ------------ |
---|
831 | !> Perform module-specific initialization |
---|
832 | !------------------------------------------------------------------------------! |
---|
833 | SUBROUTINE module_interface_init |
---|
834 | |
---|
835 | |
---|
836 | CALL location_message( 'initializing module features', 'start' ) |
---|
837 | |
---|
838 | IF ( biometeorology ) CALL bio_init |
---|
839 | IF ( bulk_cloud_model ) CALL bcm_init |
---|
840 | IF ( air_chemistry ) CALL chem_init |
---|
841 | IF ( virtual_flight ) CALL flight_init |
---|
842 | IF ( gust_module_enabled ) CALL gust_init |
---|
843 | IF ( indoor_model ) CALL im_init |
---|
844 | IF ( large_scale_forcing ) CALL lsf_init |
---|
845 | IF ( land_surface ) CALL lsm_init |
---|
846 | IF ( nudging ) CALL nudge_init |
---|
847 | IF ( ocean_mode ) CALL ocean_init |
---|
848 | IF ( plant_canopy ) CALL pcm_init |
---|
849 | IF ( salsa ) CALL salsa_init |
---|
850 | IF ( urban_surface ) CALL usm_init |
---|
851 | IF ( virtual_measurement ) CALL vm_init |
---|
852 | IF ( wind_turbine ) CALL wtm_init |
---|
853 | IF ( radiation ) CALL radiation_init |
---|
854 | IF ( user_module_enabled ) CALL user_init |
---|
855 | |
---|
856 | CALL location_message( 'initializing module features', 'finished' ) |
---|
857 | |
---|
858 | |
---|
859 | END SUBROUTINE module_interface_init |
---|
860 | |
---|
861 | |
---|
862 | !------------------------------------------------------------------------------! |
---|
863 | ! Description: |
---|
864 | ! ------------ |
---|
865 | !> Perform module-specific post-initialization checks |
---|
866 | !------------------------------------------------------------------------------! |
---|
867 | SUBROUTINE module_interface_init_checks |
---|
868 | |
---|
869 | |
---|
870 | IF ( biometeorology ) CALL bio_init_checks |
---|
871 | |
---|
872 | |
---|
873 | END SUBROUTINE module_interface_init_checks |
---|
874 | |
---|
875 | |
---|
876 | !------------------------------------------------------------------------------! |
---|
877 | ! Description: |
---|
878 | ! ------------ |
---|
879 | !> Gather module-specific header output |
---|
880 | !------------------------------------------------------------------------------! |
---|
881 | SUBROUTINE module_interface_header( io ) |
---|
882 | |
---|
883 | |
---|
884 | INTEGER(iwp), INTENT(IN) :: io !< unit of the output file |
---|
885 | |
---|
886 | |
---|
887 | IF ( biometeorology ) CALL bio_header ( io ) |
---|
888 | IF ( bulk_cloud_model ) CALL bcm_header( io ) |
---|
889 | IF ( air_chemistry ) CALL chem_header ( io ) |
---|
890 | IF ( virtual_flight ) CALL flight_header( io ) |
---|
891 | IF ( gust_module_enabled ) CALL gust_header( io ) |
---|
892 | IF ( land_surface ) CALL lsm_header( io ) |
---|
893 | IF ( large_scale_forcing ) CALL lsf_nudging_header( io ) |
---|
894 | IF ( nesting_offline ) CALL nesting_offl_header( io ) |
---|
895 | IF ( ocean_mode ) CALL ocean_header( io ) |
---|
896 | IF ( plant_canopy ) CALL pcm_header( io ) |
---|
897 | IF ( radiation ) CALL radiation_header( io ) |
---|
898 | IF ( salsa ) CALL salsa_header( io ) |
---|
899 | IF ( calculate_spectra ) CALL spectra_header( io ) |
---|
900 | IF ( syn_turb_gen ) CALL stg_header( io ) |
---|
901 | IF ( user_module_enabled ) CALL user_header( io ) |
---|
902 | |
---|
903 | |
---|
904 | END SUBROUTINE module_interface_header |
---|
905 | |
---|
906 | |
---|
907 | !------------------------------------------------------------------------------! |
---|
908 | ! Description: |
---|
909 | ! ------------ |
---|
910 | !> Perform module-specific actions while in time-integration (vector-optimized) |
---|
911 | !------------------------------------------------------------------------------! |
---|
912 | SUBROUTINE module_interface_actions( location ) |
---|
913 | |
---|
914 | |
---|
915 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
916 | |
---|
917 | |
---|
918 | IF ( bulk_cloud_model ) CALL bcm_actions( location ) |
---|
919 | IF ( air_chemistry ) CALL chem_actions( location ) |
---|
920 | IF ( gust_module_enabled ) CALL gust_actions( location ) |
---|
921 | IF ( ocean_mode ) CALL ocean_actions( location ) |
---|
922 | IF ( salsa ) CALL salsa_actions( location ) |
---|
923 | IF ( wind_turbine ) CALL wtm_actions( location ) |
---|
924 | IF ( user_module_enabled ) CALL user_actions( location ) |
---|
925 | |
---|
926 | |
---|
927 | END SUBROUTINE module_interface_actions |
---|
928 | |
---|
929 | |
---|
930 | !------------------------------------------------------------------------------! |
---|
931 | ! Description: |
---|
932 | ! ------------ |
---|
933 | !> Perform module-specific actions while in time-integration (cache-optimized) |
---|
934 | !------------------------------------------------------------------------------! |
---|
935 | SUBROUTINE module_interface_actions_ij( i, j, location ) |
---|
936 | |
---|
937 | |
---|
938 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
939 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
940 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
941 | |
---|
942 | |
---|
943 | IF ( bulk_cloud_model ) CALL bcm_actions( i, j, location ) |
---|
944 | IF ( air_chemistry ) CALL chem_actions( i, j, location ) |
---|
945 | IF ( gust_module_enabled ) CALL gust_actions( i, j, location ) |
---|
946 | IF ( ocean_mode ) CALL ocean_actions( i, j, location ) |
---|
947 | IF ( salsa ) CALL salsa_actions( i, j, location ) |
---|
948 | IF ( wind_turbine ) CALL wtm_actions( i, j, location ) |
---|
949 | IF ( user_module_enabled ) CALL user_actions( i, j, location ) |
---|
950 | |
---|
951 | |
---|
952 | END SUBROUTINE module_interface_actions_ij |
---|
953 | |
---|
954 | |
---|
955 | !------------------------------------------------------------------------------! |
---|
956 | ! Description: |
---|
957 | ! ------------ |
---|
958 | !> Compute module-specificc non_advective_processes (vector-optimized) |
---|
959 | !------------------------------------------------------------------------------! |
---|
960 | SUBROUTINE module_interface_non_advective_processes() |
---|
961 | |
---|
962 | |
---|
963 | IF ( bulk_cloud_model ) CALL bcm_non_advective_processes() |
---|
964 | IF ( air_chemistry ) CALL chem_non_advective_processes() |
---|
965 | |
---|
966 | |
---|
967 | END SUBROUTINE module_interface_non_advective_processes |
---|
968 | |
---|
969 | |
---|
970 | !------------------------------------------------------------------------------! |
---|
971 | ! Description: |
---|
972 | ! ------------ |
---|
973 | !> Compute module-specific non_advective_processes (cache-optimized) |
---|
974 | !------------------------------------------------------------------------------! |
---|
975 | SUBROUTINE module_interface_non_advective_processes_ij( i, j ) |
---|
976 | |
---|
977 | |
---|
978 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
979 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
980 | |
---|
981 | |
---|
982 | IF ( bulk_cloud_model ) CALL bcm_non_advective_processes( i, j ) |
---|
983 | IF ( air_chemistry ) CALL chem_non_advective_processes( i, j ) |
---|
984 | |
---|
985 | |
---|
986 | END SUBROUTINE module_interface_non_advective_processes_ij |
---|
987 | |
---|
988 | !------------------------------------------------------------------------------! |
---|
989 | ! Description: |
---|
990 | ! ------------ |
---|
991 | !> Exchange horiz for module-specific quantities |
---|
992 | !------------------------------------------------------------------------------! |
---|
993 | SUBROUTINE module_interface_exchange_horiz() |
---|
994 | |
---|
995 | |
---|
996 | IF ( bulk_cloud_model ) CALL bcm_exchange_horiz() |
---|
997 | IF ( air_chemistry ) CALL chem_exchange_horiz_bounds() |
---|
998 | |
---|
999 | END SUBROUTINE module_interface_exchange_horiz |
---|
1000 | |
---|
1001 | |
---|
1002 | !------------------------------------------------------------------------------! |
---|
1003 | ! Description: |
---|
1004 | ! ------------ |
---|
1005 | !> Compute module-specific prognostic_equations (vector-optimized) |
---|
1006 | !------------------------------------------------------------------------------! |
---|
1007 | SUBROUTINE module_interface_prognostic_equations() |
---|
1008 | |
---|
1009 | |
---|
1010 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations() |
---|
1011 | IF ( air_chemistry ) CALL chem_prognostic_equations() |
---|
1012 | IF ( gust_module_enabled ) CALL gust_prognostic_equations() |
---|
1013 | IF ( ocean_mode ) CALL ocean_prognostic_equations() |
---|
1014 | IF ( salsa ) CALL salsa_prognostic_equations() |
---|
1015 | |
---|
1016 | |
---|
1017 | END SUBROUTINE module_interface_prognostic_equations |
---|
1018 | |
---|
1019 | |
---|
1020 | !------------------------------------------------------------------------------! |
---|
1021 | ! Description: |
---|
1022 | ! ------------ |
---|
1023 | !> Compute module-specific prognostic_equations (cache-optimized) |
---|
1024 | !------------------------------------------------------------------------------! |
---|
1025 | SUBROUTINE module_interface_prognostic_equations_ij( i, j, i_omp_start, tn ) |
---|
1026 | |
---|
1027 | |
---|
1028 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
1029 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
1030 | INTEGER(iwp), INTENT(IN) :: i_omp_start !< first loop index of i-loop in prognostic_equations |
---|
1031 | INTEGER(iwp), INTENT(IN) :: tn !< task number of openmp task |
---|
1032 | |
---|
1033 | |
---|
1034 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1035 | IF ( air_chemistry ) CALL chem_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1036 | IF ( gust_module_enabled ) CALL gust_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1037 | IF ( ocean_mode ) CALL ocean_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1038 | IF ( salsa ) CALL salsa_prognostic_equations( i, j, i_omp_start, tn ) |
---|
1039 | |
---|
1040 | |
---|
1041 | END SUBROUTINE module_interface_prognostic_equations_ij |
---|
1042 | |
---|
1043 | |
---|
1044 | !------------------------------------------------------------------------------! |
---|
1045 | ! Description: |
---|
1046 | ! ------------ |
---|
1047 | !> Swap the timelevel pointers for module-specific arrays |
---|
1048 | !------------------------------------------------------------------------------! |
---|
1049 | SUBROUTINE module_interface_swap_timelevel ( swap_mode ) |
---|
1050 | |
---|
1051 | |
---|
1052 | INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap |
---|
1053 | |
---|
1054 | IF ( bulk_cloud_model ) CALL bcm_swap_timelevel( swap_mode ) |
---|
1055 | IF ( air_chemistry ) CALL chem_swap_timelevel( swap_mode ) |
---|
1056 | IF ( gust_module_enabled ) CALL gust_swap_timelevel( swap_mode ) |
---|
1057 | IF ( land_surface ) CALL lsm_swap_timelevel( swap_mode ) |
---|
1058 | IF ( ocean_mode ) CALL ocean_swap_timelevel( swap_mode ) |
---|
1059 | IF ( salsa ) CALL salsa_swap_timelevel( swap_mode ) |
---|
1060 | IF ( urban_surface ) CALL usm_swap_timelevel( swap_mode ) |
---|
1061 | |
---|
1062 | |
---|
1063 | END SUBROUTINE module_interface_swap_timelevel |
---|
1064 | |
---|
1065 | |
---|
1066 | !------------------------------------------------------------------------------! |
---|
1067 | ! |
---|
1068 | ! Description: |
---|
1069 | ! ------------ |
---|
1070 | !> Perform module-specific averaging of 3D data |
---|
1071 | !------------------------------------------------------------------------------! |
---|
1072 | SUBROUTINE module_interface_3d_data_averaging( mode, variable ) |
---|
1073 | |
---|
1074 | |
---|
1075 | CHARACTER (LEN=*), INTENT(IN) :: mode !< averaging interface mode |
---|
1076 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1077 | |
---|
1078 | IF ( biometeorology ) CALL bio_3d_data_averaging( mode, variable ) |
---|
1079 | IF ( bulk_cloud_model ) CALL bcm_3d_data_averaging( mode, variable ) |
---|
1080 | IF ( air_chemistry ) CALL chem_3d_data_averaging( mode, variable ) |
---|
1081 | IF ( gust_module_enabled ) CALL gust_3d_data_averaging( mode, variable ) |
---|
1082 | IF ( land_surface ) CALL lsm_3d_data_averaging( mode, variable ) |
---|
1083 | IF ( ocean_mode ) CALL ocean_3d_data_averaging( mode, variable ) |
---|
1084 | IF ( radiation ) CALL radiation_3d_data_averaging( mode, variable ) |
---|
1085 | IF ( salsa ) CALL salsa_3d_data_averaging( mode, variable ) |
---|
1086 | IF ( urban_surface ) CALL usm_3d_data_averaging( mode, variable ) |
---|
1087 | IF ( user_module_enabled ) CALL user_3d_data_averaging( mode, variable ) |
---|
1088 | |
---|
1089 | |
---|
1090 | END SUBROUTINE module_interface_3d_data_averaging |
---|
1091 | |
---|
1092 | !------------------------------------------------------------------------------! |
---|
1093 | ! |
---|
1094 | ! Description: |
---|
1095 | ! ------------ |
---|
1096 | !> Define module-specific 2D output variables |
---|
1097 | !------------------------------------------------------------------------------! |
---|
1098 | SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode, & |
---|
1099 | local_pf, two_d, nzb_do, nzt_do, & |
---|
1100 | fill_value ) |
---|
1101 | |
---|
1102 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
1103 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1104 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
1105 | CHARACTER (LEN=*), INTENT(INOUT) :: grid !< name of vertical grid |
---|
1106 | CHARACTER (LEN=*), INTENT(IN) :: mode !< either 'xy', 'xz' or 'yz' |
---|
1107 | LOGICAL, INTENT(OUT) :: two_d !< flag for 2D variables |
---|
1108 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
1109 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
1110 | REAL(wp), INTENT(IN) :: fill_value !< to be removed |
---|
1111 | |
---|
1112 | REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf !< ToDo: can also be kind=sp |
---|
1113 | |
---|
1114 | |
---|
1115 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
1116 | CALL bio_data_output_2d( & |
---|
1117 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
1118 | ) |
---|
1119 | ENDIF |
---|
1120 | |
---|
1121 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
1122 | CALL bcm_data_output_2d( & |
---|
1123 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1124 | ) |
---|
1125 | ENDIF |
---|
1126 | |
---|
1127 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
1128 | CALL chem_data_output_2d( & |
---|
1129 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
1130 | ) |
---|
1131 | ENDIF |
---|
1132 | |
---|
1133 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
1134 | CALL gust_data_output_2d( & |
---|
1135 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
1136 | ) |
---|
1137 | ENDIF |
---|
1138 | |
---|
1139 | IF ( .NOT. found .AND. land_surface ) THEN |
---|
1140 | CALL lsm_data_output_2d( & |
---|
1141 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1142 | ) |
---|
1143 | ENDIF |
---|
1144 | |
---|
1145 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
1146 | CALL ocean_data_output_2d( & |
---|
1147 | av, variable, found, grid, mode, local_pf, nzb_do, nzt_do & |
---|
1148 | ) |
---|
1149 | ENDIF |
---|
1150 | |
---|
1151 | IF ( .NOT. found .AND. radiation ) THEN |
---|
1152 | CALL radiation_data_output_2d( & |
---|
1153 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1154 | ) |
---|
1155 | ENDIF |
---|
1156 | |
---|
1157 | IF ( .NOT. found .AND. salsa ) THEN |
---|
1158 | CALL salsa_data_output_2d( & |
---|
1159 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
1160 | ) |
---|
1161 | ENDIF |
---|
1162 | |
---|
1163 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
1164 | CALL user_data_output_2d( & |
---|
1165 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
1166 | ) |
---|
1167 | ENDIF |
---|
1168 | |
---|
1169 | END SUBROUTINE module_interface_data_output_2d |
---|
1170 | |
---|
1171 | |
---|
1172 | !------------------------------------------------------------------------------! |
---|
1173 | ! |
---|
1174 | ! Description: |
---|
1175 | ! ------------ |
---|
1176 | !> Define module-specific 3D output variables |
---|
1177 | !------------------------------------------------------------------------------! |
---|
1178 | SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf, & |
---|
1179 | fill_value, resorted, nzb_do, nzt_do ) |
---|
1180 | |
---|
1181 | |
---|
1182 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
1183 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
1184 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
1185 | REAL(wp), INTENT(IN) :: fill_value !< ToDo: refactor |
---|
1186 | LOGICAL, INTENT(OUT) :: resorted !< flag if output has been resorted |
---|
1187 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
1188 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
1189 | |
---|
1190 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf |
---|
1191 | |
---|
1192 | |
---|
1193 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
1194 | CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1195 | resorted = .FALSE. |
---|
1196 | ENDIF |
---|
1197 | |
---|
1198 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
1199 | CALL bcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1200 | resorted = .TRUE. |
---|
1201 | ENDIF |
---|
1202 | |
---|
1203 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
1204 | CALL chem_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1205 | resorted = .TRUE. |
---|
1206 | ENDIF |
---|
1207 | |
---|
1208 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
1209 | CALL gust_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1210 | resorted = .TRUE. |
---|
1211 | ENDIF |
---|
1212 | |
---|
1213 | IF ( .NOT. found .AND. indoor_model ) THEN |
---|
1214 | CALL im_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1215 | resorted = .TRUE. |
---|
1216 | ENDIF |
---|
1217 | |
---|
1218 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
1219 | CALL ocean_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1220 | resorted = .TRUE. |
---|
1221 | ENDIF |
---|
1222 | |
---|
1223 | IF ( .NOT. found .AND. plant_canopy ) THEN |
---|
1224 | CALL pcm_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
1225 | resorted = .TRUE. |
---|
1226 | ENDIF |
---|
1227 | |
---|
1228 | IF ( .NOT. found .AND. radiation ) THEN |
---|
1229 | CALL radiation_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1230 | resorted = .TRUE. |
---|
1231 | ENDIF |
---|
1232 | |
---|
1233 | IF ( .NOT. found .AND. salsa ) THEN |
---|
1234 | CALL salsa_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1235 | resorted = .TRUE. |
---|
1236 | ENDIF |
---|
1237 | |
---|
1238 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
1239 | CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
1240 | resorted = .TRUE. |
---|
1241 | ENDIF |
---|
1242 | |
---|
1243 | |
---|
1244 | END SUBROUTINE module_interface_data_output_3d |
---|
1245 | |
---|
1246 | |
---|
1247 | !------------------------------------------------------------------------------! |
---|
1248 | ! Description: |
---|
1249 | ! ------------ |
---|
1250 | !> Compute module-specific profile and timeseries data |
---|
1251 | !------------------------------------------------------------------------------! |
---|
1252 | SUBROUTINE module_interface_statistics( mode, sr, tn, dots_max ) |
---|
1253 | |
---|
1254 | |
---|
1255 | CHARACTER (LEN=*), INTENT(IN) :: mode !< statistical analysis mode |
---|
1256 | INTEGER(iwp), INTENT(IN) :: sr !< |
---|
1257 | INTEGER(iwp), INTENT(IN) :: tn !< |
---|
1258 | INTEGER(iwp), INTENT(IN) :: dots_max !< maximum number of timeseries |
---|
1259 | |
---|
1260 | IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) |
---|
1261 | IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) |
---|
1262 | IF ( user_module_enabled ) CALL user_statistics( mode, sr, tn ) |
---|
1263 | |
---|
1264 | |
---|
1265 | END SUBROUTINE module_interface_statistics |
---|
1266 | |
---|
1267 | |
---|
1268 | !------------------------------------------------------------------------------! |
---|
1269 | ! Description: |
---|
1270 | ! ------------ |
---|
1271 | !> Read module-specific restart data globaly shared by all MPI ranks |
---|
1272 | !------------------------------------------------------------------------------! |
---|
1273 | SUBROUTINE module_interface_rrd_global( found ) |
---|
1274 | |
---|
1275 | |
---|
1276 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
1277 | |
---|
1278 | IF ( .NOT. found ) CALL bio_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1279 | IF ( .NOT. found ) CALL bcm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1280 | IF ( .NOT. found ) CALL flight_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1281 | IF ( .NOT. found ) CALL gust_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1282 | IF ( .NOT. found ) CALL ocean_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1283 | IF ( .NOT. found ) CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable |
---|
1284 | IF ( .NOT. found ) CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1285 | IF ( .NOT. found ) CALL surface_data_output_rrd_global( found ) |
---|
1286 | IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
1287 | |
---|
1288 | |
---|
1289 | END SUBROUTINE module_interface_rrd_global |
---|
1290 | |
---|
1291 | |
---|
1292 | !------------------------------------------------------------------------------! |
---|
1293 | ! Description: |
---|
1294 | ! ------------ |
---|
1295 | !> Write module-specific restart data globaly shared by all MPI ranks |
---|
1296 | !------------------------------------------------------------------------------! |
---|
1297 | SUBROUTINE module_interface_wrd_global |
---|
1298 | |
---|
1299 | |
---|
1300 | IF ( biometeorology ) CALL bio_wrd_global |
---|
1301 | IF ( bulk_cloud_model ) CALL bcm_wrd_global |
---|
1302 | IF ( virtual_flight ) CALL flight_wrd_global |
---|
1303 | IF ( gust_module_enabled ) CALL gust_wrd_global |
---|
1304 | IF ( ocean_mode ) CALL ocean_wrd_global |
---|
1305 | IF ( syn_turb_gen ) CALL stg_wrd_global |
---|
1306 | IF ( wind_turbine ) CALL wtm_wrd_global |
---|
1307 | IF ( surface_output ) CALL surface_data_output_wrd_global |
---|
1308 | IF ( user_module_enabled ) CALL user_wrd_global |
---|
1309 | |
---|
1310 | |
---|
1311 | END SUBROUTINE module_interface_wrd_global |
---|
1312 | |
---|
1313 | |
---|
1314 | !------------------------------------------------------------------------------! |
---|
1315 | ! Description: |
---|
1316 | ! ------------ |
---|
1317 | !> Read module-specific restart data specific to local MPI ranks |
---|
1318 | !------------------------------------------------------------------------------! |
---|
1319 | SUBROUTINE module_interface_rrd_local( map_index, & |
---|
1320 | nxlf, nxlc, nxl_on_file, & |
---|
1321 | nxrf, nxrc, nxr_on_file, & |
---|
1322 | nynf, nync, nyn_on_file, & |
---|
1323 | nysf, nysc, nys_on_file, & |
---|
1324 | tmp_2d, tmp_3d, found ) |
---|
1325 | |
---|
1326 | |
---|
1327 | INTEGER(iwp), INTENT(IN) :: map_index !< |
---|
1328 | INTEGER(iwp), INTENT(IN) :: nxlc !< |
---|
1329 | INTEGER(iwp), INTENT(IN) :: nxlf !< |
---|
1330 | INTEGER(iwp), INTENT(IN) :: nxl_on_file !< |
---|
1331 | INTEGER(iwp), INTENT(IN) :: nxrc !< |
---|
1332 | INTEGER(iwp), INTENT(IN) :: nxrf !< |
---|
1333 | INTEGER(iwp), INTENT(IN) :: nxr_on_file !< |
---|
1334 | INTEGER(iwp), INTENT(IN) :: nync !< |
---|
1335 | INTEGER(iwp), INTENT(IN) :: nynf !< |
---|
1336 | INTEGER(iwp), INTENT(IN) :: nyn_on_file !< |
---|
1337 | INTEGER(iwp), INTENT(IN) :: nysc !< |
---|
1338 | INTEGER(iwp), INTENT(IN) :: nysf !< |
---|
1339 | INTEGER(iwp), INTENT(IN) :: nys_on_file !< |
---|
1340 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
1341 | |
---|
1342 | REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_2d !< |
---|
1343 | REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_3d !< |
---|
1344 | |
---|
1345 | |
---|
1346 | IF ( .NOT. found ) CALL bio_rrd_local( & |
---|
1347 | found & |
---|
1348 | ) |
---|
1349 | |
---|
1350 | IF ( .NOT. found ) CALL bcm_rrd_local( & |
---|
1351 | map_index, & |
---|
1352 | nxlf, nxlc, nxl_on_file, & |
---|
1353 | nxrf, nxrc, nxr_on_file, & |
---|
1354 | nynf, nync, nyn_on_file, & |
---|
1355 | nysf, nysc, nys_on_file, & |
---|
1356 | tmp_2d, tmp_3d, found & |
---|
1357 | ) ! ToDo: change interface to pass variable |
---|
1358 | |
---|
1359 | IF ( .NOT. found ) CALL chem_rrd_local( & |
---|
1360 | map_index, & |
---|
1361 | nxlf, nxlc, nxl_on_file, & |
---|
1362 | nxrf, nxrc, nxr_on_file, & |
---|
1363 | nynf, nync, nyn_on_file, & |
---|
1364 | nysf, nysc, nys_on_file, & |
---|
1365 | tmp_3d, found & |
---|
1366 | ) ! ToDo: change interface to pass variable |
---|
1367 | |
---|
1368 | IF ( .NOT. found ) CALL gust_rrd_local( & |
---|
1369 | map_index, & |
---|
1370 | nxlf, nxlc, nxl_on_file, & |
---|
1371 | nxrf, nxrc, nxr_on_file, & |
---|
1372 | nynf, nync, nyn_on_file, & |
---|
1373 | nysf, nysc, nys_on_file, & |
---|
1374 | tmp_2d, tmp_3d, found & |
---|
1375 | ) ! ToDo: change interface to pass variable |
---|
1376 | |
---|
1377 | IF ( .NOT. found ) CALL lsm_rrd_local( & |
---|
1378 | map_index, & |
---|
1379 | nxlf, nxlc, nxl_on_file, & |
---|
1380 | nxrf, nxrc, nxr_on_file, & |
---|
1381 | nynf, nync, nyn_on_file, & |
---|
1382 | nysf, nysc, nys_on_file, & |
---|
1383 | tmp_2d, found & |
---|
1384 | ) ! ToDo: change interface to pass variable |
---|
1385 | |
---|
1386 | IF ( .NOT. found ) CALL ocean_rrd_local( & |
---|
1387 | map_index, & |
---|
1388 | nxlf, nxlc, nxl_on_file, & |
---|
1389 | nxrf, nxrc, nxr_on_file, & |
---|
1390 | nynf, nync, nyn_on_file, & |
---|
1391 | nysf, nysc, nys_on_file, & |
---|
1392 | tmp_3d, found & |
---|
1393 | ) ! ToDo: change interface to pass variable |
---|
1394 | |
---|
1395 | IF ( .NOT. found ) CALL radiation_rrd_local( & |
---|
1396 | map_index, & |
---|
1397 | nxlf, nxlc, nxl_on_file, & |
---|
1398 | nxrf, nxrc, nxr_on_file, & |
---|
1399 | nynf, nync, nyn_on_file, & |
---|
1400 | nysf, nysc, nys_on_file, & |
---|
1401 | tmp_2d, tmp_3d, found & |
---|
1402 | ) ! ToDo: change interface to pass variable |
---|
1403 | |
---|
1404 | IF ( .NOT. found ) CALL salsa_rrd_local( & |
---|
1405 | map_index, & |
---|
1406 | nxlf, nxlc, nxl_on_file, & |
---|
1407 | nxrf, nxrc, nxr_on_file, & |
---|
1408 | nynf, nync, nyn_on_file, & |
---|
1409 | nysf, nysc, nys_on_file, & |
---|
1410 | tmp_3d, found & |
---|
1411 | ) ! ToDo: change interface to pass variable |
---|
1412 | |
---|
1413 | IF ( .NOT. found ) CALL usm_rrd_local( & |
---|
1414 | map_index, & |
---|
1415 | nxlf, nxlc, nxl_on_file, & |
---|
1416 | nxrf, nxr_on_file, & |
---|
1417 | nynf, nyn_on_file, & |
---|
1418 | nysf, nysc, nys_on_file, & |
---|
1419 | found & |
---|
1420 | ) ! ToDo: change interface to pass variable |
---|
1421 | ! |
---|
1422 | !-- Surface data do not need overlap data, so do not pass these information. |
---|
1423 | IF ( .NOT. found ) CALL surface_data_output_rrd_local( found ) |
---|
1424 | |
---|
1425 | IF ( .NOT. found ) CALL user_rrd_local( & |
---|
1426 | map_index, & |
---|
1427 | nxlf, nxlc, nxl_on_file, & |
---|
1428 | nxrf, nxrc, nxr_on_file, & |
---|
1429 | nynf, nync, nyn_on_file, & |
---|
1430 | nysf, nysc, nys_on_file, & |
---|
1431 | tmp_3d, found & |
---|
1432 | ) ! ToDo: change interface to pass variable |
---|
1433 | |
---|
1434 | |
---|
1435 | END SUBROUTINE module_interface_rrd_local |
---|
1436 | |
---|
1437 | |
---|
1438 | !------------------------------------------------------------------------------! |
---|
1439 | ! Description: |
---|
1440 | ! ------------ |
---|
1441 | !> Write module-specific restart data specific to local MPI ranks |
---|
1442 | !------------------------------------------------------------------------------! |
---|
1443 | SUBROUTINE module_interface_wrd_local |
---|
1444 | |
---|
1445 | |
---|
1446 | IF ( biometeorology ) CALL bio_wrd_local |
---|
1447 | IF ( bulk_cloud_model ) CALL bcm_wrd_local |
---|
1448 | IF ( air_chemistry ) CALL chem_wrd_local |
---|
1449 | IF ( gust_module_enabled ) CALL gust_wrd_local |
---|
1450 | IF ( land_surface ) CALL lsm_wrd_local |
---|
1451 | IF ( ocean_mode ) CALL ocean_wrd_local |
---|
1452 | IF ( radiation ) CALL radiation_wrd_local |
---|
1453 | IF ( salsa ) CALL salsa_wrd_local |
---|
1454 | IF ( urban_surface ) CALL usm_wrd_local |
---|
1455 | IF ( surface_output ) CALL surface_data_output_wrd_local |
---|
1456 | IF ( user_module_enabled ) CALL user_wrd_local |
---|
1457 | |
---|
1458 | |
---|
1459 | END SUBROUTINE module_interface_wrd_local |
---|
1460 | |
---|
1461 | |
---|
1462 | !------------------------------------------------------------------------------! |
---|
1463 | ! Description: |
---|
1464 | ! ------------ |
---|
1465 | !> Perform module-specific last actions before the program terminates |
---|
1466 | !------------------------------------------------------------------------------! |
---|
1467 | SUBROUTINE module_interface_last_actions |
---|
1468 | |
---|
1469 | |
---|
1470 | IF ( virtual_measurement ) CALL vm_last_actions |
---|
1471 | IF ( user_module_enabled ) CALL user_last_actions |
---|
1472 | |
---|
1473 | |
---|
1474 | END SUBROUTINE module_interface_last_actions |
---|
1475 | |
---|
1476 | |
---|
1477 | END MODULE module_interface |
---|