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