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