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