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 3649 2019-01-02 16:52:21Z suehring $ |
---|
27 | ! Initialize strings, in order to avoid compiler warnings for non-initialized |
---|
28 | ! characters with intent(out) attribute |
---|
29 | ! |
---|
30 | ! 3648 2019-01-02 16:35:46Z suehring |
---|
31 | ! Rename subroutines for surface-data output |
---|
32 | ! |
---|
33 | ! 3641 2018-12-23 22:10:01Z knoop |
---|
34 | ! Initial implementation of the PALM module interface |
---|
35 | ! |
---|
36 | ! |
---|
37 | ! Description: |
---|
38 | ! ------------ |
---|
39 | !> This is the interface between the PALM model core and all its modules. |
---|
40 | !> |
---|
41 | !------------------------------------------------------------------------------! |
---|
42 | MODULE module_interface |
---|
43 | |
---|
44 | USE indices, & |
---|
45 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt |
---|
46 | |
---|
47 | USE kinds |
---|
48 | |
---|
49 | !- load module-specific control parameters. |
---|
50 | !- ToDo: move all of them to respective module or a dedicated central module |
---|
51 | |
---|
52 | USE control_parameters, & |
---|
53 | ONLY: biometeorology, & |
---|
54 | air_chemistry, & |
---|
55 | land_surface, & |
---|
56 | large_scale_forcing, & |
---|
57 | nesting_offline, & |
---|
58 | nudging, & |
---|
59 | ocean_mode, & |
---|
60 | plant_canopy, & |
---|
61 | salsa, & |
---|
62 | surface_output, & |
---|
63 | syn_turb_gen, & |
---|
64 | urban_surface, & |
---|
65 | virtual_flight, & |
---|
66 | wind_turbine |
---|
67 | |
---|
68 | !- load interface routines of all PALM modules |
---|
69 | |
---|
70 | USE biometeorology_mod, & |
---|
71 | ONLY: bio_parin, & |
---|
72 | bio_check_parameters, & |
---|
73 | bio_check_data_output, & |
---|
74 | bio_header, & |
---|
75 | bio_3d_data_averaging, & |
---|
76 | bio_data_output_2d, & |
---|
77 | bio_data_output_3d |
---|
78 | |
---|
79 | USE bulk_cloud_model_mod, & |
---|
80 | ONLY: bulk_cloud_model, & |
---|
81 | bcm_parin, & |
---|
82 | bcm_check_parameters, & |
---|
83 | bcm_check_data_output_pr, & |
---|
84 | bcm_check_data_output, & |
---|
85 | bcm_header, & |
---|
86 | bcm_swap_timelevel, & |
---|
87 | bcm_3d_data_averaging, & |
---|
88 | bcm_data_output_2d, & |
---|
89 | bcm_data_output_3d, & |
---|
90 | bcm_rrd_global, & |
---|
91 | bcm_wrd_global, & |
---|
92 | bcm_rrd_local, & |
---|
93 | bcm_wrd_local |
---|
94 | |
---|
95 | USE chemistry_model_mod, & |
---|
96 | ONLY: chem_parin, & |
---|
97 | chem_check_parameters, & |
---|
98 | chem_check_data_output_pr, & |
---|
99 | chem_check_data_output, & |
---|
100 | chem_header, & |
---|
101 | chem_swap_timelevel, & |
---|
102 | chem_3d_data_averaging, & |
---|
103 | chem_data_output_2d, & |
---|
104 | chem_data_output_3d, & |
---|
105 | chem_statistics, & |
---|
106 | chem_rrd_local, & |
---|
107 | chem_wrd_local |
---|
108 | |
---|
109 | USE flight_mod, & |
---|
110 | ONLY: flight_parin, & |
---|
111 | flight_header, & |
---|
112 | flight_rrd_global, & |
---|
113 | flight_wrd_global |
---|
114 | |
---|
115 | USE gust_mod, & |
---|
116 | ONLY: gust_module_enabled, & |
---|
117 | gust_parin, & |
---|
118 | gust_check_parameters, & |
---|
119 | gust_check_data_output_pr, & |
---|
120 | gust_check_data_output, & |
---|
121 | gust_header, & |
---|
122 | gust_swap_timelevel, & |
---|
123 | gust_3d_data_averaging, & |
---|
124 | gust_data_output_2d, & |
---|
125 | gust_data_output_3d, & |
---|
126 | gust_statistics, & |
---|
127 | gust_rrd_global, & |
---|
128 | gust_wrd_global, & |
---|
129 | gust_rrd_local, & |
---|
130 | gust_wrd_local |
---|
131 | |
---|
132 | USE indoor_model_mod, & |
---|
133 | ONLY: im_parin |
---|
134 | |
---|
135 | USE land_surface_model_mod, & |
---|
136 | ONLY: lsm_parin, & |
---|
137 | lsm_check_parameters, & |
---|
138 | lsm_check_data_output_pr, & |
---|
139 | lsm_check_data_output, & |
---|
140 | lsm_header, & |
---|
141 | lsm_swap_timelevel, & |
---|
142 | lsm_3d_data_averaging, & |
---|
143 | lsm_data_output_2d, & |
---|
144 | lsm_rrd_local, & |
---|
145 | lsm_wrd_local |
---|
146 | |
---|
147 | USE lsf_nudging_mod, & |
---|
148 | ONLY: lsf_nudging_check_parameters, & |
---|
149 | lsf_nudging_check_data_output_pr, & |
---|
150 | lsf_nudging_header |
---|
151 | |
---|
152 | USE multi_agent_system_mod, & |
---|
153 | ONLY: mas_parin |
---|
154 | |
---|
155 | USE nesting_offl_mod, & |
---|
156 | ONLY: nesting_offl_parin, & |
---|
157 | nesting_offl_check_parameters, & |
---|
158 | nesting_offl_header |
---|
159 | |
---|
160 | USE ocean_mod, & |
---|
161 | ONLY: ocean_parin, & |
---|
162 | ocean_check_parameters, & |
---|
163 | ocean_check_data_output_pr, & |
---|
164 | ocean_check_data_output, & |
---|
165 | ocean_header, & |
---|
166 | ocean_swap_timelevel, & |
---|
167 | ocean_3d_data_averaging, & |
---|
168 | ocean_data_output_2d, & |
---|
169 | ocean_data_output_3d, & |
---|
170 | ocean_rrd_global, & |
---|
171 | ocean_wrd_global, & |
---|
172 | ocean_rrd_local, & |
---|
173 | ocean_wrd_local |
---|
174 | |
---|
175 | USE plant_canopy_model_mod, & |
---|
176 | ONLY: pcm_parin, & |
---|
177 | pcm_check_parameters, & |
---|
178 | pcm_check_data_output, & |
---|
179 | pcm_header, & |
---|
180 | pcm_data_output_3d |
---|
181 | |
---|
182 | USE radiation_model_mod, & |
---|
183 | ONLY: radiation, & |
---|
184 | radiation_parin, & |
---|
185 | radiation_check_parameters, & |
---|
186 | radiation_check_data_output_pr, & |
---|
187 | radiation_check_data_output, & |
---|
188 | radiation_header, & |
---|
189 | radiation_3d_data_averaging, & |
---|
190 | radiation_data_output_2d, & |
---|
191 | radiation_data_output_3d, & |
---|
192 | radiation_rrd_local, & |
---|
193 | radiation_wrd_local |
---|
194 | |
---|
195 | USE salsa_mod, & |
---|
196 | ONLY: salsa_parin, & |
---|
197 | salsa_check_parameters, & |
---|
198 | salsa_check_data_output, & |
---|
199 | salsa_header, & |
---|
200 | salsa_swap_timelevel, & |
---|
201 | salsa_3d_data_averaging, & |
---|
202 | salsa_data_output_2d, & |
---|
203 | salsa_data_output_3d, & |
---|
204 | salsa_rrd_local, & |
---|
205 | salsa_wrd_local |
---|
206 | |
---|
207 | USE spectra_mod, & |
---|
208 | ONLY: calculate_spectra, & |
---|
209 | spectra_parin, & |
---|
210 | spectra_check_parameters, & |
---|
211 | spectra_header |
---|
212 | |
---|
213 | USE surface_data_output_mod, & |
---|
214 | ONLY: surface_data_output_parin, & |
---|
215 | surface_data_output_check_parameters |
---|
216 | |
---|
217 | USE synthetic_turbulence_generator_mod, & |
---|
218 | ONLY: stg_parin, & |
---|
219 | stg_check_parameters, & |
---|
220 | stg_header, & |
---|
221 | stg_rrd_global, & |
---|
222 | stg_wrd_global |
---|
223 | |
---|
224 | USE urban_surface_mod, & |
---|
225 | ONLY: usm_parin, & |
---|
226 | usm_check_parameters, & |
---|
227 | usm_check_data_output, & |
---|
228 | usm_swap_timelevel, & |
---|
229 | usm_3d_data_averaging, & |
---|
230 | usm_rrd_local, & |
---|
231 | usm_wrd_local |
---|
232 | |
---|
233 | USE user_read_restart_data_mod, & |
---|
234 | ONLY: user_rrd_global, & |
---|
235 | user_rrd_local |
---|
236 | |
---|
237 | USE user_write_restart_data_mod, & |
---|
238 | ONLY: user_wrd_global, & |
---|
239 | user_wrd_local |
---|
240 | |
---|
241 | USE virtual_measurement_mod, & |
---|
242 | ONLY: vm_parin |
---|
243 | |
---|
244 | USE wind_turbine_model_mod, & |
---|
245 | ONLY: wtm_parin, & |
---|
246 | wtm_check_parameters, & |
---|
247 | wtm_rrd_global, & |
---|
248 | wtm_wrd_global |
---|
249 | |
---|
250 | IMPLICIT NONE |
---|
251 | |
---|
252 | PRIVATE |
---|
253 | |
---|
254 | ! |
---|
255 | !- Public functions |
---|
256 | PUBLIC & |
---|
257 | module_interface_parin, & |
---|
258 | module_interface_check_parameters, & |
---|
259 | module_interface_check_data_output_pr, & |
---|
260 | module_interface_check_data_output, & |
---|
261 | module_interface_define_netcdf_grid, & |
---|
262 | module_interface_init_arrays, & |
---|
263 | module_interface_init, & |
---|
264 | module_interface_header, & |
---|
265 | module_interface_actions, & |
---|
266 | module_interface_swap_timelevel, & |
---|
267 | module_interface_3d_data_averaging, & |
---|
268 | module_interface_data_output_2d, & |
---|
269 | module_interface_data_output_3d, & |
---|
270 | module_interface_statistics, & |
---|
271 | module_interface_rrd_global, & |
---|
272 | module_interface_wrd_global, & |
---|
273 | module_interface_rrd_local, & |
---|
274 | module_interface_wrd_local |
---|
275 | |
---|
276 | |
---|
277 | INTERFACE module_interface_parin |
---|
278 | MODULE PROCEDURE module_interface_parin |
---|
279 | END INTERFACE module_interface_parin |
---|
280 | |
---|
281 | INTERFACE module_interface_check_parameters |
---|
282 | MODULE PROCEDURE module_interface_check_parameters |
---|
283 | END INTERFACE module_interface_check_parameters |
---|
284 | |
---|
285 | INTERFACE module_interface_check_data_output_pr |
---|
286 | MODULE PROCEDURE module_interface_check_data_output_pr |
---|
287 | END INTERFACE module_interface_check_data_output_pr |
---|
288 | |
---|
289 | INTERFACE module_interface_check_data_output |
---|
290 | MODULE PROCEDURE module_interface_check_data_output |
---|
291 | END INTERFACE module_interface_check_data_output |
---|
292 | |
---|
293 | INTERFACE module_interface_define_netcdf_grid |
---|
294 | MODULE PROCEDURE module_interface_define_netcdf_grid |
---|
295 | END INTERFACE module_interface_define_netcdf_grid |
---|
296 | |
---|
297 | INTERFACE module_interface_init_arrays |
---|
298 | MODULE PROCEDURE module_interface_init_arrays |
---|
299 | END INTERFACE module_interface_init_arrays |
---|
300 | |
---|
301 | INTERFACE module_interface_init |
---|
302 | MODULE PROCEDURE module_interface_init |
---|
303 | END INTERFACE module_interface_init |
---|
304 | |
---|
305 | INTERFACE module_interface_header |
---|
306 | MODULE PROCEDURE module_interface_header |
---|
307 | END INTERFACE module_interface_header |
---|
308 | |
---|
309 | INTERFACE module_interface_actions |
---|
310 | MODULE PROCEDURE module_interface_actions |
---|
311 | MODULE PROCEDURE module_interface_actions_ij |
---|
312 | END INTERFACE module_interface_actions |
---|
313 | |
---|
314 | INTERFACE module_interface_swap_timelevel |
---|
315 | MODULE PROCEDURE module_interface_swap_timelevel |
---|
316 | END INTERFACE module_interface_swap_timelevel |
---|
317 | |
---|
318 | INTERFACE module_interface_3d_data_averaging |
---|
319 | MODULE PROCEDURE module_interface_3d_data_averaging |
---|
320 | END INTERFACE module_interface_3d_data_averaging |
---|
321 | |
---|
322 | INTERFACE module_interface_data_output_2d |
---|
323 | MODULE PROCEDURE module_interface_data_output_2d |
---|
324 | END INTERFACE module_interface_data_output_2d |
---|
325 | |
---|
326 | INTERFACE module_interface_data_output_3d |
---|
327 | MODULE PROCEDURE module_interface_data_output_3d |
---|
328 | END INTERFACE module_interface_data_output_3d |
---|
329 | |
---|
330 | INTERFACE module_interface_statistics |
---|
331 | MODULE PROCEDURE module_interface_statistics |
---|
332 | END INTERFACE module_interface_statistics |
---|
333 | |
---|
334 | INTERFACE module_interface_rrd_global |
---|
335 | MODULE PROCEDURE module_interface_rrd_global |
---|
336 | END INTERFACE module_interface_rrd_global |
---|
337 | |
---|
338 | INTERFACE module_interface_wrd_global |
---|
339 | MODULE PROCEDURE module_interface_wrd_global |
---|
340 | END INTERFACE module_interface_wrd_global |
---|
341 | |
---|
342 | INTERFACE module_interface_rrd_local |
---|
343 | MODULE PROCEDURE module_interface_rrd_local |
---|
344 | END INTERFACE module_interface_rrd_local |
---|
345 | |
---|
346 | INTERFACE module_interface_wrd_local |
---|
347 | MODULE PROCEDURE module_interface_wrd_local |
---|
348 | END INTERFACE module_interface_wrd_local |
---|
349 | |
---|
350 | |
---|
351 | CONTAINS |
---|
352 | |
---|
353 | |
---|
354 | !------------------------------------------------------------------------------! |
---|
355 | ! Description: |
---|
356 | ! ------------ |
---|
357 | !> Read module-specific parameter namelists |
---|
358 | !------------------------------------------------------------------------------! |
---|
359 | SUBROUTINE module_interface_parin |
---|
360 | |
---|
361 | |
---|
362 | CALL bio_parin |
---|
363 | CALL bcm_parin |
---|
364 | CALL chem_parin |
---|
365 | CALL flight_parin ! ToDo: rename module to match filename |
---|
366 | CALL gust_parin |
---|
367 | CALL im_parin |
---|
368 | CALL lsm_parin |
---|
369 | ! ToDo: create parin routine for large_scale_forcing and nudging (should be seperate modules or new module switch) |
---|
370 | CALL mas_parin |
---|
371 | CALL nesting_offl_parin |
---|
372 | CALL ocean_parin |
---|
373 | CALL pcm_parin |
---|
374 | CALL radiation_parin |
---|
375 | CALL salsa_parin |
---|
376 | CALL spectra_parin |
---|
377 | CALL surface_data_output_parin |
---|
378 | CALL stg_parin |
---|
379 | CALL user_parin ! ToDo: make user code a single Fortran module |
---|
380 | CALL usm_parin |
---|
381 | CALL vm_parin |
---|
382 | CALL wtm_parin |
---|
383 | |
---|
384 | CALL package_parin ! ToDo: deprecated, needs to be dissolved |
---|
385 | |
---|
386 | |
---|
387 | END SUBROUTINE module_interface_parin |
---|
388 | |
---|
389 | |
---|
390 | !------------------------------------------------------------------------------! |
---|
391 | ! Description: |
---|
392 | ! ------------ |
---|
393 | !> Perform module-specific initialization checks |
---|
394 | !------------------------------------------------------------------------------! |
---|
395 | SUBROUTINE module_interface_check_parameters |
---|
396 | |
---|
397 | |
---|
398 | IF ( biometeorology ) CALL bio_check_parameters |
---|
399 | IF ( bulk_cloud_model ) CALL bcm_check_parameters |
---|
400 | IF ( air_chemistry ) CALL chem_check_parameters |
---|
401 | IF ( gust_module_enabled ) CALL gust_check_parameters |
---|
402 | IF ( land_surface ) CALL lsm_check_parameters |
---|
403 | IF ( large_scale_forcing .OR. nudging ) CALL lsf_nudging_check_parameters ! ToDo: create single module switch |
---|
404 | IF ( nesting_offline ) CALL nesting_offl_check_parameters |
---|
405 | IF ( ocean_mode ) CALL ocean_check_parameters |
---|
406 | IF ( plant_canopy ) CALL pcm_check_parameters |
---|
407 | IF ( radiation ) CALL radiation_check_parameters |
---|
408 | IF ( salsa ) CALL salsa_check_parameters |
---|
409 | IF ( calculate_spectra ) CALL spectra_check_parameters |
---|
410 | IF ( surface_output ) CALL surface_data_output_check_parameters |
---|
411 | IF ( syn_turb_gen ) CALL stg_check_parameters |
---|
412 | IF ( urban_surface ) CALL usm_check_parameters |
---|
413 | IF ( wind_turbine ) CALL wtm_check_parameters |
---|
414 | CALL user_check_parameters |
---|
415 | |
---|
416 | |
---|
417 | END SUBROUTINE module_interface_check_parameters |
---|
418 | |
---|
419 | |
---|
420 | !------------------------------------------------------------------------------! |
---|
421 | ! Description: |
---|
422 | ! ------------ |
---|
423 | !> Check module-specific data output of profiles |
---|
424 | !------------------------------------------------------------------------------! |
---|
425 | SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit, & |
---|
426 | dopr_unit ) |
---|
427 | |
---|
428 | |
---|
429 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
430 | INTEGER(iwp), INTENT(IN) :: var_count !< variable output array index |
---|
431 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
432 | CHARACTER (LEN=*), INTENT(OUT) :: dopr_unit !< local value of dopr_unit |
---|
433 | |
---|
434 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
435 | CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
436 | ENDIF |
---|
437 | |
---|
438 | IF ( unit == 'illegal' .AND. air_chemistry ) THEN |
---|
439 | CALL chem_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
440 | ENDIF |
---|
441 | |
---|
442 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
443 | CALL gust_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
444 | ENDIF |
---|
445 | |
---|
446 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
447 | CALL lsm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
448 | ENDIF |
---|
449 | |
---|
450 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
451 | CALL lsf_nudging_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
452 | ENDIF |
---|
453 | |
---|
454 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
455 | CALL ocean_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
456 | ENDIF |
---|
457 | |
---|
458 | IF ( unit == 'illegal' ) THEN |
---|
459 | CALL radiation_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
460 | ENDIF |
---|
461 | |
---|
462 | IF ( unit == 'illegal' ) THEN |
---|
463 | unit = '' ! ToDo: Seems like a hack. Find a general soultion! |
---|
464 | CALL user_check_data_output_pr( variable, var_count, unit ) |
---|
465 | ENDIF |
---|
466 | |
---|
467 | |
---|
468 | |
---|
469 | END SUBROUTINE module_interface_check_data_output_pr |
---|
470 | |
---|
471 | !------------------------------------------------------------------------------! |
---|
472 | ! Description: |
---|
473 | ! ------------ |
---|
474 | !> Check module-specific 2D and 3D data output |
---|
475 | !------------------------------------------------------------------------------! |
---|
476 | SUBROUTINE module_interface_check_data_output( variable, unit, i, ilen, k ) |
---|
477 | |
---|
478 | |
---|
479 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
480 | CHARACTER (LEN=*), INTENT(OUT) :: unit !< physical unit of variable |
---|
481 | |
---|
482 | INTEGER(iwp), INTENT(IN) :: i !< ToDo: remove dummy argument, instead pass string from data_output |
---|
483 | INTEGER(iwp), INTENT(IN) :: ilen !< ToDo: remove dummy argument, instead pass string from data_output |
---|
484 | INTEGER(iwp), INTENT(IN) :: k !< ToDo: remove dummy argument, instead pass string from data_output |
---|
485 | |
---|
486 | IF ( unit == 'illegal' .AND. biometeorology ) THEN |
---|
487 | CALL bio_check_data_output( variable, unit, i, ilen, k ) |
---|
488 | ENDIF |
---|
489 | |
---|
490 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
491 | CALL bcm_check_data_output( variable, unit ) |
---|
492 | ENDIF |
---|
493 | |
---|
494 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
495 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
496 | CALL chem_check_data_output( variable, unit, i, ilen, k ) |
---|
497 | ENDIF |
---|
498 | |
---|
499 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
500 | CALL gust_check_data_output( variable, unit ) |
---|
501 | ENDIF |
---|
502 | |
---|
503 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
504 | CALL lsm_check_data_output( variable, unit, i, ilen, k ) |
---|
505 | ENDIF |
---|
506 | |
---|
507 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
508 | CALL ocean_check_data_output( variable, unit ) |
---|
509 | ENDIF |
---|
510 | |
---|
511 | IF ( unit == 'illegal' .AND. plant_canopy & |
---|
512 | .AND. variable(1:4) == 'pcm_' ) THEN ! ToDo: remove aditional conditions |
---|
513 | CALL pcm_check_data_output( variable, unit ) |
---|
514 | ENDIF |
---|
515 | |
---|
516 | IF ( unit == 'illegal' ) THEN |
---|
517 | CALL radiation_check_data_output( variable, unit, i, ilen, k ) |
---|
518 | ENDIF |
---|
519 | |
---|
520 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
521 | CALL salsa_check_data_output( variable, unit ) |
---|
522 | ENDIF |
---|
523 | |
---|
524 | IF ( unit == 'illegal' .AND. urban_surface & |
---|
525 | .AND. variable(1:4) == 'usm_' ) THEN ! ToDo: remove aditional conditions |
---|
526 | CALL usm_check_data_output( variable, unit ) |
---|
527 | ENDIF |
---|
528 | |
---|
529 | IF ( unit == 'illegal' ) THEN |
---|
530 | unit = '' |
---|
531 | CALL user_check_data_output( variable, unit ) |
---|
532 | ENDIF |
---|
533 | |
---|
534 | |
---|
535 | END SUBROUTINE module_interface_check_data_output |
---|
536 | |
---|
537 | |
---|
538 | !------------------------------------------------------------------------------! |
---|
539 | ! |
---|
540 | ! Description: |
---|
541 | ! ------------ |
---|
542 | !> Define appropriate grid for module-specific netcdf output variables. |
---|
543 | !------------------------------------------------------------------------------! |
---|
544 | SUBROUTINE module_interface_define_netcdf_grid( var, found, & |
---|
545 | grid_x, grid_y, grid_z ) |
---|
546 | |
---|
547 | |
---|
548 | CHARACTER (LEN=*), INTENT(IN) :: var !< variable name |
---|
549 | LOGICAL, INTENT(OUT) :: found !< indicates if variable was found |
---|
550 | CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< netcdf dimension in x-direction |
---|
551 | CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< netcdf dimension in y-direction |
---|
552 | CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< netcdf dimension in z-direction |
---|
553 | ! |
---|
554 | !--As long as no action is done in this subroutine, initial strings with |
---|
555 | !--intent(out) attribute, in order to avoid compiler warnings. |
---|
556 | found = .FALSE. |
---|
557 | grid_x = 'none' |
---|
558 | grid_y = 'none' |
---|
559 | grid_z = 'none' |
---|
560 | |
---|
561 | END SUBROUTINE module_interface_define_netcdf_grid |
---|
562 | |
---|
563 | |
---|
564 | !------------------------------------------------------------------------------! |
---|
565 | ! Description: |
---|
566 | ! ------------ |
---|
567 | !> Allocate module-specific arrays and pointers |
---|
568 | !------------------------------------------------------------------------------! |
---|
569 | SUBROUTINE module_interface_init_arrays |
---|
570 | |
---|
571 | |
---|
572 | END SUBROUTINE module_interface_init_arrays |
---|
573 | |
---|
574 | |
---|
575 | !------------------------------------------------------------------------------! |
---|
576 | ! Description: |
---|
577 | ! ------------ |
---|
578 | !> Perform module-specific initialization |
---|
579 | !------------------------------------------------------------------------------! |
---|
580 | SUBROUTINE module_interface_init |
---|
581 | |
---|
582 | |
---|
583 | END SUBROUTINE module_interface_init |
---|
584 | |
---|
585 | |
---|
586 | !------------------------------------------------------------------------------! |
---|
587 | ! Description: |
---|
588 | ! ------------ |
---|
589 | !> Gather module-specific header output |
---|
590 | !------------------------------------------------------------------------------! |
---|
591 | SUBROUTINE module_interface_header( io ) |
---|
592 | |
---|
593 | |
---|
594 | INTEGER(iwp), INTENT(IN) :: io !< unit of the output file |
---|
595 | |
---|
596 | |
---|
597 | IF ( biometeorology ) CALL bio_header ( io ) |
---|
598 | IF ( bulk_cloud_model ) CALL bcm_header( io ) |
---|
599 | IF ( air_chemistry ) CALL chem_header ( io ) |
---|
600 | IF ( virtual_flight ) CALL flight_header( io ) |
---|
601 | IF ( gust_module_enabled ) CALL gust_header( io ) |
---|
602 | IF ( land_surface ) CALL lsm_header( io ) |
---|
603 | IF ( large_scale_forcing ) CALL lsf_nudging_header( io ) |
---|
604 | IF ( nesting_offline ) CALL nesting_offl_header( io ) |
---|
605 | IF ( ocean_mode ) CALL ocean_header( io ) |
---|
606 | IF ( plant_canopy ) CALL pcm_header( io ) |
---|
607 | IF ( radiation ) CALL radiation_header( io ) |
---|
608 | IF ( salsa ) CALL salsa_header( io ) |
---|
609 | IF ( calculate_spectra ) CALL spectra_header( io ) |
---|
610 | IF ( syn_turb_gen ) CALL stg_header( io ) |
---|
611 | |
---|
612 | CALL user_header( io ) ! ToDo: make user module switch |
---|
613 | |
---|
614 | |
---|
615 | END SUBROUTINE module_interface_header |
---|
616 | |
---|
617 | |
---|
618 | !------------------------------------------------------------------------------! |
---|
619 | ! Description: |
---|
620 | ! ------------ |
---|
621 | !> Perform module-specific actions while in time-integration (cache-optimized) |
---|
622 | !------------------------------------------------------------------------------! |
---|
623 | SUBROUTINE module_interface_actions( location ) |
---|
624 | |
---|
625 | |
---|
626 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
627 | |
---|
628 | |
---|
629 | END SUBROUTINE module_interface_actions |
---|
630 | |
---|
631 | |
---|
632 | !------------------------------------------------------------------------------! |
---|
633 | ! Description: |
---|
634 | ! ------------ |
---|
635 | !> Perform module-specific actions while in time-integration (vector-optimized) |
---|
636 | !------------------------------------------------------------------------------! |
---|
637 | SUBROUTINE module_interface_actions_ij( i, j, location ) |
---|
638 | |
---|
639 | |
---|
640 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
641 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
642 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
643 | |
---|
644 | |
---|
645 | END SUBROUTINE module_interface_actions_ij |
---|
646 | |
---|
647 | |
---|
648 | !------------------------------------------------------------------------------! |
---|
649 | ! Description: |
---|
650 | ! ------------ |
---|
651 | !> Swap the timelevel pointers for module-specific arrays |
---|
652 | !------------------------------------------------------------------------------! |
---|
653 | SUBROUTINE module_interface_swap_timelevel ( swap_mode ) |
---|
654 | |
---|
655 | |
---|
656 | INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap |
---|
657 | |
---|
658 | IF ( bulk_cloud_model ) CALL bcm_swap_timelevel( swap_mode ) |
---|
659 | IF ( air_chemistry ) CALL chem_swap_timelevel( swap_mode ) |
---|
660 | IF ( gust_module_enabled ) CALL gust_swap_timelevel( swap_mode ) |
---|
661 | IF ( land_surface ) CALL lsm_swap_timelevel( swap_mode ) |
---|
662 | IF ( ocean_mode ) CALL ocean_swap_timelevel( swap_mode ) |
---|
663 | IF ( salsa ) CALL salsa_swap_timelevel( swap_mode ) |
---|
664 | IF ( urban_surface ) CALL usm_swap_timelevel( swap_mode ) |
---|
665 | |
---|
666 | |
---|
667 | END SUBROUTINE module_interface_swap_timelevel |
---|
668 | |
---|
669 | |
---|
670 | !------------------------------------------------------------------------------! |
---|
671 | ! |
---|
672 | ! Description: |
---|
673 | ! ------------ |
---|
674 | !> Perform module-specific averaging of 3D data |
---|
675 | !------------------------------------------------------------------------------! |
---|
676 | SUBROUTINE module_interface_3d_data_averaging( mode, variable ) |
---|
677 | |
---|
678 | |
---|
679 | CHARACTER (LEN=*), INTENT(IN) :: mode !< averaging interface mode |
---|
680 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
681 | |
---|
682 | IF ( biometeorology ) CALL bio_3d_data_averaging( mode, variable ) |
---|
683 | IF ( bulk_cloud_model ) CALL bcm_3d_data_averaging( mode, variable ) |
---|
684 | IF ( air_chemistry ) CALL chem_3d_data_averaging( mode, variable ) |
---|
685 | IF ( gust_module_enabled ) CALL gust_3d_data_averaging( mode, variable ) |
---|
686 | IF ( land_surface ) CALL lsm_3d_data_averaging( mode, variable ) |
---|
687 | IF ( ocean_mode ) CALL ocean_3d_data_averaging( mode, variable ) |
---|
688 | IF ( radiation ) CALL radiation_3d_data_averaging( mode, variable ) |
---|
689 | IF ( salsa ) CALL salsa_3d_data_averaging( mode, variable ) |
---|
690 | IF ( urban_surface ) CALL usm_3d_data_averaging( mode, variable ) |
---|
691 | |
---|
692 | CALL user_3d_data_averaging( mode, variable ) ! ToDo: make user module switch |
---|
693 | |
---|
694 | |
---|
695 | END SUBROUTINE module_interface_3d_data_averaging |
---|
696 | |
---|
697 | !------------------------------------------------------------------------------! |
---|
698 | ! |
---|
699 | ! Description: |
---|
700 | ! ------------ |
---|
701 | !> Define module-specific 2D output variables |
---|
702 | !------------------------------------------------------------------------------! |
---|
703 | SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode, & |
---|
704 | local_pf, two_d, nzb_do, nzt_do, & |
---|
705 | fill_value ) |
---|
706 | |
---|
707 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
708 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
709 | LOGICAL, INTENT(OUT) :: found !< flag if output variable is found |
---|
710 | CHARACTER (LEN=*), INTENT(INOUT) :: grid !< name of vertical grid |
---|
711 | CHARACTER (LEN=*), INTENT(IN) :: mode !< either 'xy', 'xz' or 'yz' |
---|
712 | LOGICAL, INTENT(OUT) :: two_d !< flag for 2D variables |
---|
713 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
714 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
715 | REAL(wp), INTENT(IN) :: fill_value !< to be removed |
---|
716 | |
---|
717 | REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf !< ToDo: can also be kind=sp |
---|
718 | |
---|
719 | |
---|
720 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
721 | CALL bio_data_output_2d( & |
---|
722 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
723 | ) |
---|
724 | ENDIF |
---|
725 | |
---|
726 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
727 | CALL bcm_data_output_2d( & |
---|
728 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do & |
---|
729 | ) |
---|
730 | ENDIF |
---|
731 | |
---|
732 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
733 | CALL chem_data_output_2d( & |
---|
734 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
735 | ) |
---|
736 | ENDIF |
---|
737 | |
---|
738 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
739 | CALL gust_data_output_2d( & |
---|
740 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
741 | ) |
---|
742 | ENDIF |
---|
743 | |
---|
744 | IF ( .NOT. found .AND. land_surface ) THEN |
---|
745 | CALL lsm_data_output_2d( & |
---|
746 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do & |
---|
747 | ) |
---|
748 | ENDIF |
---|
749 | |
---|
750 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
751 | CALL ocean_data_output_2d( & |
---|
752 | av, variable, found, grid, mode, local_pf, nzb_do, nzt_do & |
---|
753 | ) |
---|
754 | ENDIF |
---|
755 | |
---|
756 | IF ( .NOT. found .AND. radiation ) THEN |
---|
757 | CALL radiation_data_output_2d( & |
---|
758 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do & |
---|
759 | ) |
---|
760 | ENDIF |
---|
761 | |
---|
762 | IF ( .NOT. found .AND. salsa ) THEN |
---|
763 | CALL salsa_data_output_2d( & |
---|
764 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do & |
---|
765 | ) |
---|
766 | ENDIF |
---|
767 | |
---|
768 | IF ( .NOT. found ) THEN ! ToDo: make user module switch |
---|
769 | CALL user_data_output_2d( & |
---|
770 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
771 | ) |
---|
772 | ENDIF |
---|
773 | |
---|
774 | END SUBROUTINE module_interface_data_output_2d |
---|
775 | |
---|
776 | |
---|
777 | !------------------------------------------------------------------------------! |
---|
778 | ! |
---|
779 | ! Description: |
---|
780 | ! ------------ |
---|
781 | !> Define module-specific 3D output variables |
---|
782 | !------------------------------------------------------------------------------! |
---|
783 | SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf, & |
---|
784 | fill_value, resorted, nzb_do, nzt_do ) |
---|
785 | |
---|
786 | |
---|
787 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
788 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
789 | LOGICAL, INTENT(OUT) :: found !< flag if output variable is found |
---|
790 | REAL(wp), INTENT(IN) :: fill_value !< ToDo: refactor |
---|
791 | LOGICAL, INTENT(OUT) :: resorted !< flag if output has been resorted |
---|
792 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
793 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
794 | |
---|
795 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf |
---|
796 | |
---|
797 | |
---|
798 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
799 | CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
800 | resorted = .FALSE. |
---|
801 | ENDIF |
---|
802 | |
---|
803 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
804 | CALL bcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
805 | resorted = .TRUE. |
---|
806 | ENDIF |
---|
807 | |
---|
808 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
809 | CALL chem_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
810 | resorted = .TRUE. |
---|
811 | ENDIF |
---|
812 | |
---|
813 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
814 | CALL gust_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
815 | resorted = .TRUE. |
---|
816 | ENDIF |
---|
817 | |
---|
818 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
819 | CALL ocean_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
820 | resorted = .TRUE. |
---|
821 | ENDIF |
---|
822 | |
---|
823 | IF ( .NOT. found .AND. plant_canopy ) THEN |
---|
824 | CALL pcm_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
825 | resorted = .TRUE. |
---|
826 | ENDIF |
---|
827 | |
---|
828 | IF ( .NOT. found .AND. radiation ) THEN |
---|
829 | CALL radiation_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
830 | resorted = .TRUE. |
---|
831 | ENDIF |
---|
832 | |
---|
833 | IF ( .NOT. found .AND. salsa ) THEN |
---|
834 | CALL salsa_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
835 | resorted = .TRUE. |
---|
836 | ENDIF |
---|
837 | |
---|
838 | IF ( .NOT. found ) THEN ! ToDo: make user module switch |
---|
839 | CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
840 | resorted = .TRUE. |
---|
841 | ENDIF |
---|
842 | |
---|
843 | |
---|
844 | END SUBROUTINE module_interface_data_output_3d |
---|
845 | |
---|
846 | |
---|
847 | !------------------------------------------------------------------------------! |
---|
848 | ! Description: |
---|
849 | ! ------------ |
---|
850 | !> Compute module-specific profile and timeseries data |
---|
851 | !------------------------------------------------------------------------------! |
---|
852 | SUBROUTINE module_interface_statistics( mode, sr, tn, dots_max ) |
---|
853 | |
---|
854 | |
---|
855 | CHARACTER (LEN=*), INTENT(IN) :: mode !< statistical analysis mode |
---|
856 | INTEGER(iwp), INTENT(IN) :: sr !< |
---|
857 | INTEGER(iwp), INTENT(IN) :: tn !< |
---|
858 | INTEGER(iwp), INTENT(IN) :: dots_max !< maximum number of timeseries |
---|
859 | |
---|
860 | IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) |
---|
861 | IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) |
---|
862 | |
---|
863 | CALL user_statistics( mode, sr, tn ) ! ToDo: make user module switch |
---|
864 | |
---|
865 | |
---|
866 | END SUBROUTINE module_interface_statistics |
---|
867 | |
---|
868 | |
---|
869 | !------------------------------------------------------------------------------! |
---|
870 | ! Description: |
---|
871 | ! ------------ |
---|
872 | !> Read module-specific restart data globaly shared by all MPI ranks |
---|
873 | !------------------------------------------------------------------------------! |
---|
874 | SUBROUTINE module_interface_rrd_global( variable, found ) |
---|
875 | |
---|
876 | |
---|
877 | CHARACTER (LEN=*), INTENT(IN) :: variable !< name of global variable |
---|
878 | LOGICAL, INTENT(OUT) :: found !< flag if variable was found |
---|
879 | |
---|
880 | IF ( .NOT. found ) CALL bcm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
881 | IF ( .NOT. found ) CALL flight_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
882 | IF ( .NOT. found ) CALL gust_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
883 | IF ( .NOT. found ) CALL ocean_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
884 | IF ( .NOT. found ) CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable |
---|
885 | IF ( .NOT. found ) CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
886 | |
---|
887 | IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
888 | |
---|
889 | |
---|
890 | END SUBROUTINE module_interface_rrd_global |
---|
891 | |
---|
892 | |
---|
893 | !------------------------------------------------------------------------------! |
---|
894 | ! Description: |
---|
895 | ! ------------ |
---|
896 | !> Write module-specific restart data globaly shared by all MPI ranks |
---|
897 | !------------------------------------------------------------------------------! |
---|
898 | SUBROUTINE module_interface_wrd_global |
---|
899 | |
---|
900 | |
---|
901 | IF ( bulk_cloud_model ) CALL bcm_wrd_global |
---|
902 | IF ( virtual_flight ) CALL flight_wrd_global |
---|
903 | IF ( gust_module_enabled ) CALL gust_wrd_global |
---|
904 | IF ( ocean_mode ) CALL ocean_wrd_global |
---|
905 | IF ( syn_turb_gen ) CALL stg_wrd_global |
---|
906 | IF ( wind_turbine ) CALL wtm_wrd_global |
---|
907 | |
---|
908 | CALL user_wrd_global ! ToDo: make user module switch |
---|
909 | |
---|
910 | |
---|
911 | END SUBROUTINE module_interface_wrd_global |
---|
912 | |
---|
913 | |
---|
914 | !------------------------------------------------------------------------------! |
---|
915 | ! Description: |
---|
916 | ! ------------ |
---|
917 | !> Read module-specific restart data specific to local MPI ranks |
---|
918 | !------------------------------------------------------------------------------! |
---|
919 | SUBROUTINE module_interface_rrd_local( variable, file_index, map_index, & |
---|
920 | nxlf, nxlc, nxl_on_file, & |
---|
921 | nxrf, nxrc, nxr_on_file, & |
---|
922 | nynf, nync, nyn_on_file, & |
---|
923 | nysf, nysc, nys_on_file, & |
---|
924 | tmp_2d, tmp_3d, found ) |
---|
925 | |
---|
926 | |
---|
927 | CHARACTER (LEN=*), INTENT(IN) :: variable !< name of global variable |
---|
928 | INTEGER(iwp), INTENT(IN) :: file_index !< |
---|
929 | INTEGER(iwp), INTENT(IN) :: map_index !< |
---|
930 | INTEGER(iwp), INTENT(IN) :: nxlc !< |
---|
931 | INTEGER(iwp), INTENT(IN) :: nxlf !< |
---|
932 | INTEGER(iwp), INTENT(IN) :: nxl_on_file !< |
---|
933 | INTEGER(iwp), INTENT(IN) :: nxrc !< |
---|
934 | INTEGER(iwp), INTENT(IN) :: nxrf !< |
---|
935 | INTEGER(iwp), INTENT(IN) :: nxr_on_file !< |
---|
936 | INTEGER(iwp), INTENT(IN) :: nync !< |
---|
937 | INTEGER(iwp), INTENT(IN) :: nynf !< |
---|
938 | INTEGER(iwp), INTENT(IN) :: nyn_on_file !< |
---|
939 | INTEGER(iwp), INTENT(IN) :: nysc !< |
---|
940 | INTEGER(iwp), INTENT(IN) :: nysf !< |
---|
941 | INTEGER(iwp), INTENT(IN) :: nys_on_file !< |
---|
942 | LOGICAL, INTENT(OUT) :: found !< flag if variable was found |
---|
943 | |
---|
944 | REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_2d !< |
---|
945 | 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 !< |
---|
946 | |
---|
947 | |
---|
948 | IF ( .NOT. found ) CALL bcm_rrd_local( & |
---|
949 | file_index, map_index, & |
---|
950 | nxlf, nxlc, nxl_on_file, & |
---|
951 | nxrf, nxrc, nxr_on_file, & |
---|
952 | nynf, nync, nyn_on_file, & |
---|
953 | nysf, nysc, nys_on_file, & |
---|
954 | tmp_2d, tmp_3d, found & |
---|
955 | ) ! ToDo: change interface to pass variable |
---|
956 | |
---|
957 | IF ( .NOT. found ) CALL chem_rrd_local( & |
---|
958 | file_index, map_index, & |
---|
959 | nxlf, nxlc, nxl_on_file, & |
---|
960 | nxrf, nxrc, nxr_on_file, & |
---|
961 | nynf, nync, nyn_on_file, & |
---|
962 | nysf, nysc, nys_on_file, & |
---|
963 | tmp_3d, found & |
---|
964 | ) ! ToDo: change interface to pass variable |
---|
965 | |
---|
966 | IF ( .NOT. found ) CALL gust_rrd_local( & |
---|
967 | file_index, map_index, & |
---|
968 | nxlf, nxlc, nxl_on_file, & |
---|
969 | nxrf, nxrc, nxr_on_file, & |
---|
970 | nynf, nync, nyn_on_file, & |
---|
971 | nysf, nysc, nys_on_file, & |
---|
972 | tmp_2d, tmp_3d, found & |
---|
973 | ) ! ToDo: change interface to pass variable |
---|
974 | |
---|
975 | IF ( .NOT. found ) CALL lsm_rrd_local( & |
---|
976 | file_index, map_index, & |
---|
977 | nxlf, nxlc, nxl_on_file, & |
---|
978 | nxrf, nxrc, nxr_on_file, & |
---|
979 | nynf, nync, nyn_on_file, & |
---|
980 | nysf, nysc, nys_on_file, & |
---|
981 | tmp_2d, found & |
---|
982 | ) ! ToDo: change interface to pass variable |
---|
983 | |
---|
984 | IF ( .NOT. found ) CALL ocean_rrd_local( & |
---|
985 | file_index, map_index, & |
---|
986 | nxlf, nxlc, nxl_on_file, & |
---|
987 | nxrf, nxrc, nxr_on_file, & |
---|
988 | nynf, nync, nyn_on_file, & |
---|
989 | nysf, nysc, nys_on_file, & |
---|
990 | tmp_2d, tmp_3d, found & |
---|
991 | ) ! ToDo: change interface to pass variable |
---|
992 | |
---|
993 | IF ( .NOT. found ) CALL radiation_rrd_local( & |
---|
994 | file_index, map_index, & |
---|
995 | nxlf, nxlc, nxl_on_file, & |
---|
996 | nxrf, nxrc, nxr_on_file, & |
---|
997 | nynf, nync, nyn_on_file, & |
---|
998 | nysf, nysc, nys_on_file, & |
---|
999 | tmp_2d, tmp_3d, found & |
---|
1000 | ) ! ToDo: change interface to pass variable |
---|
1001 | |
---|
1002 | IF ( .NOT. found ) CALL salsa_rrd_local( & |
---|
1003 | file_index, map_index, & |
---|
1004 | nxlf, nxlc, nxl_on_file, & |
---|
1005 | nxrf, nxrc, nxr_on_file, & |
---|
1006 | nynf, nync, nyn_on_file, & |
---|
1007 | nysf, nysc, nys_on_file, & |
---|
1008 | tmp_3d, found & |
---|
1009 | ) ! ToDo: change interface to pass variable |
---|
1010 | |
---|
1011 | IF ( .NOT. found ) CALL usm_rrd_local( & |
---|
1012 | file_index, map_index, & |
---|
1013 | nxlf, nxlc, nxl_on_file, & |
---|
1014 | nxrf, nxrc, nxr_on_file, & |
---|
1015 | nynf, nync, nyn_on_file, & |
---|
1016 | nysf, nysc, nys_on_file, & |
---|
1017 | found & |
---|
1018 | ) ! ToDo: change interface to pass variable |
---|
1019 | |
---|
1020 | IF ( .NOT. found ) CALL user_rrd_local( & |
---|
1021 | file_index, map_index, & |
---|
1022 | nxlf, nxlc, nxl_on_file, & |
---|
1023 | nxrf, nxrc, nxr_on_file, & |
---|
1024 | nynf, nync, nyn_on_file, & |
---|
1025 | nysf, nysc, nys_on_file, & |
---|
1026 | tmp_3d, found & |
---|
1027 | ) ! ToDo: change interface to pass variable |
---|
1028 | |
---|
1029 | |
---|
1030 | END SUBROUTINE module_interface_rrd_local |
---|
1031 | |
---|
1032 | |
---|
1033 | !------------------------------------------------------------------------------! |
---|
1034 | ! Description: |
---|
1035 | ! ------------ |
---|
1036 | !> Write module-specific restart data specific to local MPI ranks |
---|
1037 | !------------------------------------------------------------------------------! |
---|
1038 | SUBROUTINE module_interface_wrd_local |
---|
1039 | |
---|
1040 | |
---|
1041 | IF ( bulk_cloud_model ) CALL bcm_wrd_local |
---|
1042 | IF ( air_chemistry ) CALL chem_wrd_local |
---|
1043 | IF ( gust_module_enabled ) CALL gust_wrd_local |
---|
1044 | IF ( land_surface ) CALL lsm_wrd_local |
---|
1045 | IF ( ocean_mode ) CALL ocean_wrd_local |
---|
1046 | IF ( radiation ) CALL radiation_wrd_local |
---|
1047 | IF ( salsa ) CALL salsa_wrd_local |
---|
1048 | IF ( urban_surface ) CALL usm_wrd_local |
---|
1049 | |
---|
1050 | CALL user_wrd_local ! ToDo: make user module switch |
---|
1051 | |
---|
1052 | |
---|
1053 | END SUBROUTINE module_interface_wrd_local |
---|
1054 | |
---|
1055 | |
---|
1056 | END MODULE module_interface |
---|