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