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