[3637] | 1 | !> @file module_interface.f90 |
---|
| 2 | !------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
| 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
| 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
[3648] | 17 | ! Copyright 1997-2019 Leibniz Universitaet Hannover |
---|
[3637] | 18 | !------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
| 20 | ! Current revisions: |
---|
| 21 | ! ----------------- |
---|
| 22 | ! |
---|
[3745] | 23 | ! |
---|
[3637] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
[3770] | 26 | ! $Id: module_interface.f90 3875 2019-04-08 17:35:12Z knoop $ |
---|
[3864] | 27 | ! Add a call for salsa_prognostic_equations |
---|
| 28 | ! |
---|
| 29 | ! 3840 2019-03-29 10:35:52Z knoop |
---|
[3806] | 30 | ! bugfix: intent of dummy arguments changed to inout |
---|
| 31 | ! |
---|
| 32 | ! 3770 2019-02-28 11:22:32Z moh.hefny |
---|
[3769] | 33 | ! removed unused variables in module_interface_check_data_output_ts |
---|
[3770] | 34 | ! |
---|
[3769] | 35 | ! 3767 08:18:02Z raasch |
---|
[3767] | 36 | ! unused variable file_index removed from subroutine parameter list |
---|
| 37 | ! |
---|
| 38 | ! 3766 2019-02-26 16:23:41Z raasch |
---|
[3766] | 39 | ! first argument removed from module_interface_rrd_*, statement added to avoid |
---|
| 40 | ! compiler warning about unused variable, file reformatted with respect to coding |
---|
| 41 | ! standards |
---|
| 42 | ! |
---|
| 43 | ! 3762 2019-02-25 16:54:16Z suehring |
---|
[3762] | 44 | ! only pass required arguments to surface_data_output_rrd_local |
---|
| 45 | ! |
---|
| 46 | ! 3747 2019-02-16 15:15:23Z gronemeier |
---|
[3747] | 47 | ! Call user_init_arrays |
---|
| 48 | ! |
---|
| 49 | ! 3745 2019-02-15 18:57:56Z suehring |
---|
[3745] | 50 | ! Add indoor model |
---|
| 51 | ! |
---|
| 52 | ! 3744 2019-02-15 18:38:58Z suehring |
---|
[3739] | 53 | ! Removed bio_check_parameters as the method is empty. |
---|
| 54 | ! |
---|
| 55 | ! 3735 2019-02-12 09:52:40Z dom_dwd_user |
---|
[3735] | 56 | ! Accepting variable j from check_parameters and passing it to |
---|
| 57 | ! bio_check_data_output |
---|
| 58 | ! Add required restart data for surface output module |
---|
| 59 | ! |
---|
| 60 | ! 3731 2019-02-11 13:06:27Z suehring |
---|
[3717] | 61 | ! Add check_parameters routine for virtual measurements |
---|
| 62 | ! |
---|
| 63 | ! 3711 2019-01-31 13:44:26Z knoop |
---|
[3711] | 64 | ! Introduced module_interface_init_checks for post-init checks |
---|
| 65 | ! |
---|
| 66 | ! 3705 2019-01-29 19:56:39Z suehring |
---|
[3705] | 67 | ! Add last_actions for virtual measurements |
---|
| 68 | ! |
---|
| 69 | ! 3704 2019-01-29 19:51:41Z suehring |
---|
[3685] | 70 | ! Some interface calls moved to module_interface + cleanup |
---|
| 71 | ! |
---|
| 72 | ! 3684 2019-01-20 20:20:58Z knoop |
---|
[3655] | 73 | ! Bugfix: made unit intend INOUT |
---|
| 74 | ! |
---|
| 75 | ! 3650 2019-01-04 13:01:33Z kanani |
---|
[3650] | 76 | ! Add restart routines for biometeorology |
---|
| 77 | ! |
---|
| 78 | ! 3649 2019-01-02 16:52:21Z suehring |
---|
[3649] | 79 | ! Initialize strings, in order to avoid compiler warnings for non-initialized |
---|
| 80 | ! characters with intent(out) attribute |
---|
| 81 | ! |
---|
| 82 | ! 3648 2019-01-02 16:35:46Z suehring |
---|
[3648] | 83 | ! Rename subroutines for surface-data output |
---|
| 84 | ! |
---|
| 85 | ! 3641 2018-12-23 22:10:01Z knoop |
---|
[3637] | 86 | ! Initial implementation of the PALM module interface |
---|
| 87 | ! |
---|
| 88 | ! |
---|
| 89 | ! Description: |
---|
| 90 | ! ------------ |
---|
| 91 | !> This is the interface between the PALM model core and all its modules. |
---|
| 92 | !> |
---|
[3731] | 93 | !> @todo Re-format module to be consistent with coding standard |
---|
[3637] | 94 | !------------------------------------------------------------------------------! |
---|
[3766] | 95 | MODULE module_interface |
---|
[3637] | 96 | |
---|
[3766] | 97 | USE indices, & |
---|
| 98 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt |
---|
[3637] | 99 | |
---|
[3766] | 100 | USE kinds |
---|
[3637] | 101 | |
---|
[3766] | 102 | ! |
---|
| 103 | !-- load module-specific control parameters. |
---|
| 104 | !-- ToDo: move all of them to respective module or a dedicated central module |
---|
| 105 | USE control_parameters, & |
---|
| 106 | ONLY: biometeorology, & |
---|
| 107 | air_chemistry, & |
---|
| 108 | indoor_model, & |
---|
| 109 | land_surface, & |
---|
| 110 | large_scale_forcing, & |
---|
| 111 | nesting_offline, & |
---|
| 112 | nudging, & |
---|
| 113 | ocean_mode, & |
---|
| 114 | plant_canopy, & |
---|
| 115 | salsa, & |
---|
| 116 | surface_output, & |
---|
| 117 | syn_turb_gen, & |
---|
| 118 | urban_surface, & |
---|
| 119 | virtual_flight, & |
---|
| 120 | virtual_measurement, & |
---|
| 121 | wind_turbine |
---|
[3637] | 122 | |
---|
[3766] | 123 | ! |
---|
| 124 | !-- load interface routines of all PALM modules |
---|
| 125 | USE biometeorology_mod, & |
---|
| 126 | ONLY: bio_parin, & |
---|
| 127 | bio_check_data_output, & |
---|
| 128 | bio_init, & |
---|
| 129 | bio_init_checks, & |
---|
| 130 | bio_header, & |
---|
| 131 | bio_3d_data_averaging, & |
---|
| 132 | bio_data_output_2d, & |
---|
| 133 | bio_data_output_3d, & |
---|
| 134 | bio_rrd_global, & |
---|
| 135 | bio_rrd_local, & |
---|
| 136 | bio_wrd_global, & |
---|
| 137 | bio_wrd_local |
---|
[3637] | 138 | |
---|
[3766] | 139 | USE bulk_cloud_model_mod, & |
---|
| 140 | ONLY: bulk_cloud_model, & |
---|
| 141 | bcm_parin, & |
---|
| 142 | bcm_check_parameters, & |
---|
| 143 | bcm_check_data_output_pr, & |
---|
| 144 | bcm_check_data_output, & |
---|
| 145 | bcm_init_arrays, & |
---|
| 146 | bcm_init, & |
---|
| 147 | bcm_header, & |
---|
[3870] | 148 | bcm_actions, & |
---|
[3874] | 149 | bcm_non_transport_physics, & |
---|
[3870] | 150 | bcm_prognostic_equations, & |
---|
[3766] | 151 | bcm_swap_timelevel, & |
---|
| 152 | bcm_3d_data_averaging, & |
---|
| 153 | bcm_data_output_2d, & |
---|
| 154 | bcm_data_output_3d, & |
---|
| 155 | bcm_rrd_global, & |
---|
| 156 | bcm_wrd_global, & |
---|
| 157 | bcm_rrd_local, & |
---|
| 158 | bcm_wrd_local |
---|
[3637] | 159 | |
---|
| 160 | USE chemistry_model_mod, & |
---|
| 161 | ONLY: chem_parin, & |
---|
| 162 | chem_check_parameters, & |
---|
| 163 | chem_check_data_output_pr, & |
---|
| 164 | chem_check_data_output, & |
---|
[3685] | 165 | chem_init_arrays, & |
---|
| 166 | chem_init, & |
---|
[3637] | 167 | chem_header, & |
---|
| 168 | chem_swap_timelevel, & |
---|
| 169 | chem_3d_data_averaging, & |
---|
| 170 | chem_data_output_2d, & |
---|
| 171 | chem_data_output_3d, & |
---|
| 172 | chem_statistics, & |
---|
| 173 | chem_rrd_local, & |
---|
[3766] | 174 | chem_wrd_local |
---|
[3637] | 175 | |
---|
[3766] | 176 | USE flight_mod, & |
---|
| 177 | ONLY: flight_parin, & |
---|
| 178 | flight_header, & |
---|
| 179 | flight_init, & |
---|
| 180 | flight_rrd_global, & |
---|
| 181 | flight_wrd_global |
---|
[3637] | 182 | |
---|
[3766] | 183 | USE gust_mod, & |
---|
| 184 | ONLY: gust_module_enabled, & |
---|
| 185 | gust_parin, & |
---|
| 186 | gust_check_parameters, & |
---|
| 187 | gust_check_data_output_pr, & |
---|
| 188 | gust_check_data_output, & |
---|
| 189 | gust_init_arrays, & |
---|
| 190 | gust_init, & |
---|
| 191 | gust_header, & |
---|
| 192 | gust_actions, & |
---|
[3837] | 193 | gust_prognostic_equations, & |
---|
[3766] | 194 | gust_swap_timelevel, & |
---|
| 195 | gust_3d_data_averaging, & |
---|
| 196 | gust_data_output_2d, & |
---|
| 197 | gust_data_output_3d, & |
---|
| 198 | gust_statistics, & |
---|
| 199 | gust_rrd_global, & |
---|
| 200 | gust_wrd_global, & |
---|
| 201 | gust_rrd_local, & |
---|
| 202 | gust_wrd_local |
---|
[3637] | 203 | |
---|
[3766] | 204 | USE indoor_model_mod, & |
---|
| 205 | ONLY: im_parin, & |
---|
| 206 | im_check_data_output, & |
---|
| 207 | im_check_parameters, & |
---|
| 208 | im_data_output_3d, & |
---|
| 209 | im_init |
---|
[3637] | 210 | |
---|
[3766] | 211 | USE land_surface_model_mod, & |
---|
| 212 | ONLY: lsm_parin, & |
---|
| 213 | lsm_check_parameters, & |
---|
| 214 | lsm_check_data_output_pr, & |
---|
| 215 | lsm_check_data_output, & |
---|
| 216 | lsm_init_arrays, & |
---|
| 217 | lsm_init, & |
---|
| 218 | lsm_header, & |
---|
| 219 | lsm_swap_timelevel, & |
---|
| 220 | lsm_3d_data_averaging, & |
---|
| 221 | lsm_data_output_2d, & |
---|
| 222 | lsm_rrd_local, & |
---|
| 223 | lsm_wrd_local |
---|
[3637] | 224 | |
---|
[3766] | 225 | USE lsf_nudging_mod, & |
---|
| 226 | ONLY: lsf_nudging_check_parameters, & |
---|
| 227 | lsf_nudging_check_data_output_pr, & |
---|
| 228 | lsf_init, & |
---|
| 229 | nudge_init, & |
---|
| 230 | lsf_nudging_header |
---|
[3637] | 231 | |
---|
[3766] | 232 | USE multi_agent_system_mod, & |
---|
| 233 | ONLY: mas_parin |
---|
[3637] | 234 | |
---|
[3766] | 235 | USE nesting_offl_mod, & |
---|
| 236 | ONLY: nesting_offl_parin, & |
---|
| 237 | nesting_offl_check_parameters, & |
---|
| 238 | nesting_offl_header |
---|
[3637] | 239 | |
---|
[3766] | 240 | USE ocean_mod, & |
---|
| 241 | ONLY: ocean_parin, & |
---|
| 242 | ocean_check_parameters, & |
---|
| 243 | ocean_check_data_output_pr, & |
---|
| 244 | ocean_check_data_output, & |
---|
| 245 | ocean_init_arrays, & |
---|
| 246 | ocean_init, & |
---|
| 247 | ocean_header, & |
---|
[3873] | 248 | ocean_actions, & |
---|
[3840] | 249 | ocean_prognostic_equations, & |
---|
[3766] | 250 | ocean_swap_timelevel, & |
---|
| 251 | ocean_3d_data_averaging, & |
---|
| 252 | ocean_data_output_2d, & |
---|
| 253 | ocean_data_output_3d, & |
---|
| 254 | ocean_rrd_global, & |
---|
| 255 | ocean_wrd_global, & |
---|
| 256 | ocean_rrd_local, & |
---|
| 257 | ocean_wrd_local |
---|
[3637] | 258 | |
---|
[3766] | 259 | USE plant_canopy_model_mod, & |
---|
| 260 | ONLY: pcm_parin, & |
---|
| 261 | pcm_check_parameters, & |
---|
| 262 | pcm_check_data_output, & |
---|
| 263 | pcm_init, & |
---|
| 264 | pcm_header, & |
---|
| 265 | pcm_data_output_3d |
---|
[3637] | 266 | |
---|
[3766] | 267 | USE radiation_model_mod, & |
---|
| 268 | ONLY: radiation, & |
---|
| 269 | radiation_parin, & |
---|
| 270 | radiation_check_parameters, & |
---|
| 271 | radiation_check_data_output_ts, & |
---|
| 272 | radiation_check_data_output_pr, & |
---|
| 273 | radiation_check_data_output, & |
---|
| 274 | radiation_init, & |
---|
| 275 | radiation_header, & |
---|
| 276 | radiation_3d_data_averaging, & |
---|
| 277 | radiation_data_output_2d, & |
---|
| 278 | radiation_data_output_3d, & |
---|
| 279 | radiation_rrd_local, & |
---|
| 280 | radiation_wrd_local |
---|
[3637] | 281 | |
---|
[3766] | 282 | USE salsa_mod, & |
---|
| 283 | ONLY: salsa_parin, & |
---|
| 284 | salsa_check_parameters, & |
---|
| 285 | salsa_check_data_output, & |
---|
| 286 | salsa_init_arrays, & |
---|
| 287 | salsa_init, & |
---|
| 288 | salsa_header, & |
---|
[3871] | 289 | salsa_actions, & |
---|
[3864] | 290 | salsa_prognostic_equations, & |
---|
[3766] | 291 | salsa_swap_timelevel, & |
---|
| 292 | salsa_3d_data_averaging, & |
---|
| 293 | salsa_data_output_2d, & |
---|
| 294 | salsa_data_output_3d, & |
---|
| 295 | salsa_rrd_local, & |
---|
| 296 | salsa_wrd_local |
---|
[3637] | 297 | |
---|
[3766] | 298 | USE spectra_mod, & |
---|
| 299 | ONLY: calculate_spectra, & |
---|
| 300 | spectra_parin, & |
---|
| 301 | spectra_check_parameters, & |
---|
| 302 | spectra_header |
---|
[3637] | 303 | |
---|
[3766] | 304 | USE surface_data_output_mod, & |
---|
| 305 | ONLY: surface_data_output_parin, & |
---|
| 306 | surface_data_output_check_parameters, & |
---|
| 307 | surface_data_output_init_arrays, & |
---|
| 308 | surface_data_output_rrd_local, & |
---|
| 309 | surface_data_output_rrd_global, & |
---|
| 310 | surface_data_output_wrd_local, & |
---|
| 311 | surface_data_output_wrd_global |
---|
[3637] | 312 | |
---|
[3766] | 313 | USE synthetic_turbulence_generator_mod, & |
---|
| 314 | ONLY: stg_parin, & |
---|
| 315 | stg_check_parameters, & |
---|
| 316 | stg_header, & |
---|
| 317 | stg_rrd_global, & |
---|
| 318 | stg_wrd_global |
---|
[3637] | 319 | |
---|
[3766] | 320 | USE urban_surface_mod, & |
---|
| 321 | ONLY: usm_parin, & |
---|
| 322 | usm_check_parameters, & |
---|
| 323 | usm_check_data_output, & |
---|
| 324 | usm_init_arrays, & |
---|
| 325 | usm_init, & |
---|
| 326 | usm_swap_timelevel, & |
---|
| 327 | usm_3d_data_averaging, & |
---|
| 328 | usm_rrd_local, & |
---|
| 329 | usm_wrd_local |
---|
[3637] | 330 | |
---|
[3766] | 331 | USE user, & |
---|
| 332 | ONLY: user_module_enabled, & |
---|
| 333 | user_parin, & |
---|
| 334 | user_check_parameters, & |
---|
| 335 | user_check_data_output_ts, & |
---|
| 336 | user_check_data_output_pr, & |
---|
| 337 | user_check_data_output, & |
---|
| 338 | user_init, & |
---|
| 339 | user_init_arrays, & |
---|
| 340 | user_header, & |
---|
| 341 | user_actions, & |
---|
| 342 | user_3d_data_averaging, & |
---|
| 343 | user_data_output_2d, & |
---|
| 344 | user_data_output_3d, & |
---|
| 345 | user_statistics, & |
---|
| 346 | user_rrd_global, & |
---|
| 347 | user_rrd_local, & |
---|
| 348 | user_wrd_global, & |
---|
| 349 | user_wrd_local, & |
---|
| 350 | user_last_actions |
---|
[3684] | 351 | |
---|
[3766] | 352 | USE virtual_measurement_mod, & |
---|
| 353 | ONLY: vm_check_parameters, & |
---|
| 354 | vm_init, & |
---|
| 355 | vm_last_actions, & |
---|
| 356 | vm_parin |
---|
[3637] | 357 | |
---|
[3766] | 358 | USE wind_turbine_model_mod, & |
---|
| 359 | ONLY: wtm_parin, & |
---|
| 360 | wtm_check_parameters, & |
---|
| 361 | wtm_init_arrays, & |
---|
| 362 | wtm_init, & |
---|
[3875] | 363 | wtm_actions, & |
---|
[3766] | 364 | wtm_rrd_global, & |
---|
| 365 | wtm_wrd_global |
---|
[3637] | 366 | |
---|
[3766] | 367 | IMPLICIT NONE |
---|
[3637] | 368 | |
---|
[3766] | 369 | PRIVATE |
---|
[3637] | 370 | |
---|
| 371 | ! |
---|
[3766] | 372 | !-- Public functions |
---|
| 373 | PUBLIC & |
---|
| 374 | module_interface_parin, & |
---|
| 375 | module_interface_check_parameters, & |
---|
| 376 | module_interface_check_data_output_ts, & |
---|
| 377 | module_interface_check_data_output_pr, & |
---|
| 378 | module_interface_check_data_output, & |
---|
| 379 | module_interface_init_masks, & |
---|
| 380 | module_interface_define_netcdf_grid, & |
---|
| 381 | module_interface_init_arrays, & |
---|
| 382 | module_interface_init, & |
---|
| 383 | module_interface_init_checks, & |
---|
| 384 | module_interface_header, & |
---|
| 385 | module_interface_actions, & |
---|
[3874] | 386 | module_interface_non_transport_physics, & |
---|
[3837] | 387 | module_interface_prognostic_equations, & |
---|
[3766] | 388 | module_interface_swap_timelevel, & |
---|
| 389 | module_interface_3d_data_averaging, & |
---|
| 390 | module_interface_data_output_2d, & |
---|
| 391 | module_interface_data_output_3d, & |
---|
| 392 | module_interface_statistics, & |
---|
| 393 | module_interface_rrd_global, & |
---|
| 394 | module_interface_wrd_global, & |
---|
| 395 | module_interface_rrd_local, & |
---|
| 396 | module_interface_wrd_local, & |
---|
| 397 | module_interface_last_actions |
---|
[3637] | 398 | |
---|
| 399 | |
---|
[3766] | 400 | INTERFACE module_interface_parin |
---|
| 401 | MODULE PROCEDURE module_interface_parin |
---|
| 402 | END INTERFACE module_interface_parin |
---|
[3637] | 403 | |
---|
[3766] | 404 | INTERFACE module_interface_check_parameters |
---|
| 405 | MODULE PROCEDURE module_interface_check_parameters |
---|
| 406 | END INTERFACE module_interface_check_parameters |
---|
[3637] | 407 | |
---|
[3766] | 408 | INTERFACE module_interface_check_data_output_ts |
---|
| 409 | MODULE PROCEDURE module_interface_check_data_output_ts |
---|
| 410 | END INTERFACE module_interface_check_data_output_ts |
---|
[3700] | 411 | |
---|
[3766] | 412 | INTERFACE module_interface_check_data_output_pr |
---|
| 413 | MODULE PROCEDURE module_interface_check_data_output_pr |
---|
| 414 | END INTERFACE module_interface_check_data_output_pr |
---|
[3637] | 415 | |
---|
[3766] | 416 | INTERFACE module_interface_check_data_output |
---|
| 417 | MODULE PROCEDURE module_interface_check_data_output |
---|
| 418 | END INTERFACE module_interface_check_data_output |
---|
[3637] | 419 | |
---|
[3766] | 420 | INTERFACE module_interface_init_masks |
---|
| 421 | MODULE PROCEDURE module_interface_init_masks |
---|
| 422 | END INTERFACE module_interface_init_masks |
---|
[3687] | 423 | |
---|
[3766] | 424 | INTERFACE module_interface_define_netcdf_grid |
---|
| 425 | MODULE PROCEDURE module_interface_define_netcdf_grid |
---|
| 426 | END INTERFACE module_interface_define_netcdf_grid |
---|
[3637] | 427 | |
---|
[3766] | 428 | INTERFACE module_interface_init_arrays |
---|
| 429 | MODULE PROCEDURE module_interface_init_arrays |
---|
| 430 | END INTERFACE module_interface_init_arrays |
---|
[3637] | 431 | |
---|
[3766] | 432 | INTERFACE module_interface_init |
---|
| 433 | MODULE PROCEDURE module_interface_init |
---|
| 434 | END INTERFACE module_interface_init |
---|
[3637] | 435 | |
---|
[3766] | 436 | INTERFACE module_interface_init_checks |
---|
| 437 | MODULE PROCEDURE module_interface_init_checks |
---|
| 438 | END INTERFACE module_interface_init_checks |
---|
[3711] | 439 | |
---|
[3766] | 440 | INTERFACE module_interface_header |
---|
| 441 | MODULE PROCEDURE module_interface_header |
---|
| 442 | END INTERFACE module_interface_header |
---|
[3637] | 443 | |
---|
[3766] | 444 | INTERFACE module_interface_actions |
---|
| 445 | MODULE PROCEDURE module_interface_actions |
---|
| 446 | MODULE PROCEDURE module_interface_actions_ij |
---|
| 447 | END INTERFACE module_interface_actions |
---|
[3637] | 448 | |
---|
[3874] | 449 | INTERFACE module_interface_non_transport_physics |
---|
| 450 | MODULE PROCEDURE module_interface_non_transport_physics |
---|
| 451 | MODULE PROCEDURE module_interface_non_transport_physics_ij |
---|
| 452 | END INTERFACE module_interface_non_transport_physics |
---|
| 453 | |
---|
[3837] | 454 | INTERFACE module_interface_prognostic_equations |
---|
| 455 | MODULE PROCEDURE module_interface_prognostic_equations |
---|
| 456 | MODULE PROCEDURE module_interface_prognostic_equations_ij |
---|
| 457 | END INTERFACE module_interface_prognostic_equations |
---|
| 458 | |
---|
[3766] | 459 | INTERFACE module_interface_swap_timelevel |
---|
| 460 | MODULE PROCEDURE module_interface_swap_timelevel |
---|
| 461 | END INTERFACE module_interface_swap_timelevel |
---|
[3637] | 462 | |
---|
[3766] | 463 | INTERFACE module_interface_3d_data_averaging |
---|
| 464 | MODULE PROCEDURE module_interface_3d_data_averaging |
---|
| 465 | END INTERFACE module_interface_3d_data_averaging |
---|
[3637] | 466 | |
---|
[3766] | 467 | INTERFACE module_interface_data_output_2d |
---|
| 468 | MODULE PROCEDURE module_interface_data_output_2d |
---|
| 469 | END INTERFACE module_interface_data_output_2d |
---|
[3637] | 470 | |
---|
[3766] | 471 | INTERFACE module_interface_data_output_3d |
---|
| 472 | MODULE PROCEDURE module_interface_data_output_3d |
---|
| 473 | END INTERFACE module_interface_data_output_3d |
---|
[3637] | 474 | |
---|
[3766] | 475 | INTERFACE module_interface_statistics |
---|
| 476 | MODULE PROCEDURE module_interface_statistics |
---|
| 477 | END INTERFACE module_interface_statistics |
---|
[3637] | 478 | |
---|
[3766] | 479 | INTERFACE module_interface_rrd_global |
---|
| 480 | MODULE PROCEDURE module_interface_rrd_global |
---|
| 481 | END INTERFACE module_interface_rrd_global |
---|
[3637] | 482 | |
---|
[3766] | 483 | INTERFACE module_interface_wrd_global |
---|
| 484 | MODULE PROCEDURE module_interface_wrd_global |
---|
| 485 | END INTERFACE module_interface_wrd_global |
---|
[3637] | 486 | |
---|
[3766] | 487 | INTERFACE module_interface_rrd_local |
---|
| 488 | MODULE PROCEDURE module_interface_rrd_local |
---|
| 489 | END INTERFACE module_interface_rrd_local |
---|
[3637] | 490 | |
---|
[3766] | 491 | INTERFACE module_interface_wrd_local |
---|
| 492 | MODULE PROCEDURE module_interface_wrd_local |
---|
| 493 | END INTERFACE module_interface_wrd_local |
---|
[3637] | 494 | |
---|
[3766] | 495 | INTERFACE module_interface_last_actions |
---|
| 496 | MODULE PROCEDURE module_interface_last_actions |
---|
| 497 | END INTERFACE module_interface_last_actions |
---|
[3637] | 498 | |
---|
[3687] | 499 | |
---|
[3766] | 500 | CONTAINS |
---|
[3637] | 501 | |
---|
| 502 | |
---|
| 503 | !------------------------------------------------------------------------------! |
---|
| 504 | ! Description: |
---|
| 505 | ! ------------ |
---|
| 506 | !> Read module-specific parameter namelists |
---|
| 507 | !------------------------------------------------------------------------------! |
---|
[3766] | 508 | SUBROUTINE module_interface_parin |
---|
[3637] | 509 | |
---|
| 510 | |
---|
[3766] | 511 | CALL bio_parin |
---|
| 512 | CALL bcm_parin |
---|
| 513 | CALL chem_parin |
---|
| 514 | CALL flight_parin ! ToDo: rename module to match filename |
---|
| 515 | CALL gust_parin |
---|
| 516 | CALL im_parin |
---|
| 517 | CALL lsm_parin |
---|
| 518 | ! ToDo: create parin routine for large_scale_forcing and nudging (should be seperate modules or new module switch) |
---|
| 519 | CALL mas_parin |
---|
| 520 | CALL nesting_offl_parin |
---|
| 521 | CALL ocean_parin |
---|
| 522 | CALL pcm_parin |
---|
| 523 | CALL radiation_parin |
---|
| 524 | CALL salsa_parin |
---|
| 525 | CALL spectra_parin |
---|
| 526 | CALL surface_data_output_parin |
---|
| 527 | CALL stg_parin |
---|
| 528 | CALL user_parin ! ToDo: make user code a single Fortran module |
---|
| 529 | CALL usm_parin |
---|
| 530 | CALL vm_parin |
---|
| 531 | CALL wtm_parin |
---|
[3637] | 532 | |
---|
[3766] | 533 | CALL package_parin ! ToDo: deprecated, needs to be dissolved |
---|
[3637] | 534 | |
---|
| 535 | |
---|
[3766] | 536 | END SUBROUTINE module_interface_parin |
---|
[3637] | 537 | |
---|
| 538 | |
---|
| 539 | !------------------------------------------------------------------------------! |
---|
| 540 | ! Description: |
---|
| 541 | ! ------------ |
---|
| 542 | !> Perform module-specific initialization checks |
---|
| 543 | !------------------------------------------------------------------------------! |
---|
[3766] | 544 | SUBROUTINE module_interface_check_parameters |
---|
[3637] | 545 | |
---|
| 546 | |
---|
[3766] | 547 | IF ( bulk_cloud_model ) CALL bcm_check_parameters |
---|
| 548 | IF ( air_chemistry ) CALL chem_check_parameters |
---|
| 549 | IF ( gust_module_enabled ) CALL gust_check_parameters |
---|
| 550 | IF ( indoor_model ) CALL im_check_parameters |
---|
| 551 | IF ( land_surface ) CALL lsm_check_parameters |
---|
| 552 | IF ( large_scale_forcing .OR. nudging ) CALL lsf_nudging_check_parameters ! ToDo: create single module switch |
---|
| 553 | IF ( nesting_offline ) CALL nesting_offl_check_parameters |
---|
| 554 | IF ( ocean_mode ) CALL ocean_check_parameters |
---|
| 555 | IF ( plant_canopy ) CALL pcm_check_parameters |
---|
| 556 | IF ( radiation ) CALL radiation_check_parameters |
---|
| 557 | IF ( salsa ) CALL salsa_check_parameters |
---|
| 558 | IF ( calculate_spectra ) CALL spectra_check_parameters |
---|
| 559 | IF ( surface_output ) CALL surface_data_output_check_parameters |
---|
| 560 | IF ( syn_turb_gen ) CALL stg_check_parameters |
---|
| 561 | IF ( urban_surface ) CALL usm_check_parameters |
---|
| 562 | IF ( virtual_measurement ) CALL vm_check_parameters |
---|
| 563 | IF ( wind_turbine ) CALL wtm_check_parameters |
---|
| 564 | IF ( user_module_enabled ) CALL user_check_parameters |
---|
[3637] | 565 | |
---|
| 566 | |
---|
[3766] | 567 | END SUBROUTINE module_interface_check_parameters |
---|
[3637] | 568 | |
---|
| 569 | |
---|
| 570 | !------------------------------------------------------------------------------! |
---|
| 571 | ! Description: |
---|
| 572 | ! ------------ |
---|
[3700] | 573 | !> Check module-specific data output of timeseries |
---|
| 574 | !------------------------------------------------------------------------------! |
---|
[3766] | 575 | SUBROUTINE module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
[3700] | 576 | |
---|
| 577 | |
---|
[3766] | 578 | INTEGER(iwp), INTENT(IN) :: dots_max !< variable output array index |
---|
| 579 | INTEGER(iwp), INTENT(INOUT) :: dots_num !< variable output array index |
---|
| 580 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label |
---|
| 581 | CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit |
---|
[3700] | 582 | |
---|
| 583 | |
---|
[3766] | 584 | IF ( radiation ) THEN |
---|
[3769] | 585 | CALL radiation_check_data_output_ts( dots_max, dots_num ) |
---|
[3766] | 586 | ENDIF |
---|
[3700] | 587 | |
---|
[3766] | 588 | IF ( user_module_enabled ) THEN |
---|
| 589 | CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) |
---|
| 590 | ENDIF |
---|
[3700] | 591 | |
---|
| 592 | |
---|
[3766] | 593 | END SUBROUTINE module_interface_check_data_output_ts |
---|
[3700] | 594 | |
---|
| 595 | |
---|
| 596 | !------------------------------------------------------------------------------! |
---|
| 597 | ! Description: |
---|
| 598 | ! ------------ |
---|
[3637] | 599 | !> Check module-specific data output of profiles |
---|
| 600 | !------------------------------------------------------------------------------! |
---|
[3766] | 601 | SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit, & |
---|
| 602 | dopr_unit ) |
---|
[3637] | 603 | |
---|
| 604 | |
---|
[3766] | 605 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
| 606 | INTEGER(iwp), INTENT(IN) :: var_count !< variable output array index |
---|
| 607 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
| 608 | CHARACTER (LEN=*), INTENT(OUT) :: dopr_unit !< local value of dopr_unit |
---|
[3637] | 609 | |
---|
[3766] | 610 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
| 611 | CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 612 | ENDIF |
---|
[3637] | 613 | |
---|
[3766] | 614 | IF ( unit == 'illegal' .AND. air_chemistry ) THEN |
---|
| 615 | CALL chem_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 616 | ENDIF |
---|
[3637] | 617 | |
---|
[3766] | 618 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
| 619 | CALL gust_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 620 | ENDIF |
---|
[3637] | 621 | |
---|
[3766] | 622 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
| 623 | CALL lsm_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 624 | ENDIF |
---|
[3637] | 625 | |
---|
[3766] | 626 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
| 627 | CALL lsf_nudging_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 628 | ENDIF |
---|
[3637] | 629 | |
---|
[3766] | 630 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
| 631 | CALL ocean_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 632 | ENDIF |
---|
[3637] | 633 | |
---|
[3766] | 634 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
| 635 | CALL radiation_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 636 | ENDIF |
---|
[3637] | 637 | |
---|
[3766] | 638 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
| 639 | unit = '' ! ToDo: Seems like a hack. Find a general soultion! |
---|
| 640 | CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) |
---|
| 641 | ENDIF |
---|
[3637] | 642 | |
---|
| 643 | |
---|
[3766] | 644 | END SUBROUTINE module_interface_check_data_output_pr |
---|
[3637] | 645 | |
---|
| 646 | !------------------------------------------------------------------------------! |
---|
| 647 | ! Description: |
---|
| 648 | ! ------------ |
---|
| 649 | !> Check module-specific 2D and 3D data output |
---|
| 650 | !------------------------------------------------------------------------------! |
---|
[3766] | 651 | SUBROUTINE module_interface_check_data_output( variable, unit, i, j, ilen, k ) |
---|
[3637] | 652 | |
---|
| 653 | |
---|
[3766] | 654 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
| 655 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
[3637] | 656 | |
---|
[3766] | 657 | INTEGER(iwp), INTENT(IN) :: i !< ToDo: remove dummy argument, instead pass string from data_output |
---|
| 658 | INTEGER(iwp), INTENT(IN) :: j !< average quantity? 0 = no, 1 = yes |
---|
| 659 | INTEGER(iwp), INTENT(IN) :: ilen !< ToDo: remove dummy argument, instead pass string from data_output |
---|
| 660 | INTEGER(iwp), INTENT(IN) :: k !< ToDo: remove dummy argument, instead pass string from data_output |
---|
[3637] | 661 | |
---|
[3766] | 662 | IF ( unit == 'illegal' .AND. biometeorology ) THEN |
---|
| 663 | CALL bio_check_data_output( variable, unit, i, j, ilen, k ) |
---|
| 664 | ENDIF |
---|
[3637] | 665 | |
---|
[3766] | 666 | IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN |
---|
| 667 | CALL bcm_check_data_output( variable, unit ) |
---|
| 668 | ENDIF |
---|
[3637] | 669 | |
---|
[3766] | 670 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
| 671 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
| 672 | CALL chem_check_data_output( variable, unit, i, ilen, k ) |
---|
| 673 | ENDIF |
---|
[3637] | 674 | |
---|
[3766] | 675 | IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN |
---|
| 676 | CALL gust_check_data_output( variable, unit ) |
---|
| 677 | ENDIF |
---|
[3637] | 678 | |
---|
[3766] | 679 | IF ( unit == 'illegal' ) THEN ! ToDo: add module switch if possible |
---|
| 680 | CALL lsm_check_data_output( variable, unit, i, ilen, k ) |
---|
| 681 | ENDIF |
---|
[3637] | 682 | |
---|
[3766] | 683 | IF ( unit == 'illegal' .AND. ocean_mode ) THEN |
---|
| 684 | CALL ocean_check_data_output( variable, unit ) |
---|
| 685 | ENDIF |
---|
[3637] | 686 | |
---|
[3766] | 687 | IF ( unit == 'illegal' .AND. plant_canopy & |
---|
| 688 | .AND. variable(1:4) == 'pcm_' ) THEN ! ToDo: remove aditional conditions |
---|
| 689 | CALL pcm_check_data_output( variable, unit ) |
---|
| 690 | ENDIF |
---|
[3637] | 691 | |
---|
[3766] | 692 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
| 693 | CALL radiation_check_data_output( variable, unit, i, ilen, k ) |
---|
| 694 | ENDIF |
---|
[3637] | 695 | |
---|
[3766] | 696 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
[3637] | 697 | CALL salsa_check_data_output( variable, unit ) |
---|
[3766] | 698 | ENDIF |
---|
[3637] | 699 | |
---|
[3766] | 700 | IF ( unit == 'illegal' .AND. indoor_model ) THEN |
---|
[3744] | 701 | CALL im_check_data_output( variable, unit ) |
---|
[3766] | 702 | ENDIF |
---|
[3744] | 703 | |
---|
[3766] | 704 | IF ( unit == 'illegal' .AND. urban_surface & |
---|
[3637] | 705 | .AND. variable(1:4) == 'usm_' ) THEN ! ToDo: remove aditional conditions |
---|
| 706 | CALL usm_check_data_output( variable, unit ) |
---|
[3766] | 707 | ENDIF |
---|
[3637] | 708 | |
---|
[3766] | 709 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
| 710 | unit = '' |
---|
| 711 | CALL user_check_data_output( variable, unit ) |
---|
| 712 | ENDIF |
---|
[3637] | 713 | |
---|
| 714 | |
---|
[3766] | 715 | END SUBROUTINE module_interface_check_data_output |
---|
[3637] | 716 | |
---|
| 717 | |
---|
| 718 | !------------------------------------------------------------------------------! |
---|
| 719 | ! |
---|
| 720 | ! Description: |
---|
| 721 | ! ------------ |
---|
[3687] | 722 | !> Interface for init_masks. ToDo: get rid of these redundant calls! |
---|
| 723 | !------------------------------------------------------------------------------! |
---|
[3766] | 724 | SUBROUTINE module_interface_init_masks( variable, unit ) |
---|
[3687] | 725 | |
---|
| 726 | |
---|
[3766] | 727 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
| 728 | CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable |
---|
[3687] | 729 | |
---|
[3766] | 730 | IF ( unit == 'illegal' .AND. air_chemistry & |
---|
| 731 | .AND. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') ) THEN ! ToDo: remove aditional conditions |
---|
| 732 | CALL chem_check_data_output( variable, unit, 0, 0, 0 ) |
---|
| 733 | ENDIF |
---|
[3687] | 734 | |
---|
[3766] | 735 | IF ( unit == 'illegal' .AND. radiation ) THEN |
---|
| 736 | CALL radiation_check_data_output( variable, unit, 0, 0, 0 ) |
---|
| 737 | ENDIF |
---|
[3687] | 738 | |
---|
[3766] | 739 | IF ( unit == 'illegal' .AND. salsa ) THEN |
---|
| 740 | CALL salsa_check_data_output( variable, unit ) |
---|
| 741 | ENDIF |
---|
[3687] | 742 | |
---|
[3766] | 743 | IF ( unit == 'illegal' .AND. user_module_enabled ) THEN |
---|
| 744 | unit = '' |
---|
| 745 | CALL user_check_data_output( variable, unit ) |
---|
| 746 | ENDIF |
---|
[3687] | 747 | |
---|
| 748 | |
---|
[3766] | 749 | END SUBROUTINE module_interface_init_masks |
---|
[3687] | 750 | |
---|
| 751 | |
---|
| 752 | !------------------------------------------------------------------------------! |
---|
| 753 | ! |
---|
| 754 | ! Description: |
---|
| 755 | ! ------------ |
---|
[3637] | 756 | !> Define appropriate grid for module-specific netcdf output variables. |
---|
| 757 | !------------------------------------------------------------------------------! |
---|
[3766] | 758 | SUBROUTINE module_interface_define_netcdf_grid( var, found, & |
---|
| 759 | grid_x, grid_y, grid_z ) |
---|
[3637] | 760 | |
---|
| 761 | |
---|
[3766] | 762 | CHARACTER (LEN=*), INTENT(IN) :: var !< variable name |
---|
| 763 | LOGICAL, INTENT(OUT) :: found !< indicates if variable was found |
---|
| 764 | CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< netcdf dimension in x-direction |
---|
| 765 | CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< netcdf dimension in y-direction |
---|
| 766 | CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< netcdf dimension in z-direction |
---|
[3649] | 767 | ! |
---|
[3766] | 768 | !-- As long as no action is done in this subroutine, initialize strings with |
---|
| 769 | !-- intent(out) attribute, in order to avoid compiler warnings. |
---|
| 770 | found = .FALSE. |
---|
| 771 | grid_x = 'none' |
---|
| 772 | grid_y = 'none' |
---|
| 773 | grid_z = 'none' |
---|
| 774 | ! |
---|
| 775 | !-- Use var to avoid compiler warning about unused variable |
---|
| 776 | IF ( var == ' ' ) RETURN |
---|
[3637] | 777 | |
---|
[3766] | 778 | END SUBROUTINE module_interface_define_netcdf_grid |
---|
[3637] | 779 | |
---|
| 780 | |
---|
| 781 | !------------------------------------------------------------------------------! |
---|
| 782 | ! Description: |
---|
| 783 | ! ------------ |
---|
| 784 | !> Allocate module-specific arrays and pointers |
---|
| 785 | !------------------------------------------------------------------------------! |
---|
[3766] | 786 | SUBROUTINE module_interface_init_arrays |
---|
[3637] | 787 | |
---|
| 788 | |
---|
[3766] | 789 | IF ( bulk_cloud_model ) CALL bcm_init_arrays |
---|
| 790 | IF ( air_chemistry ) CALL chem_init_arrays |
---|
| 791 | IF ( gust_module_enabled ) CALL gust_init_arrays |
---|
| 792 | IF ( land_surface ) CALL lsm_init_arrays |
---|
| 793 | IF ( ocean_mode ) CALL ocean_init_arrays |
---|
| 794 | IF ( salsa ) CALL salsa_init_arrays |
---|
| 795 | IF ( urban_surface ) CALL usm_init_arrays |
---|
| 796 | IF ( surface_output ) CALL surface_data_output_init_arrays |
---|
| 797 | IF ( wind_turbine ) CALL wtm_init_arrays |
---|
| 798 | IF ( user_module_enabled ) CALL user_init_arrays |
---|
[3685] | 799 | |
---|
| 800 | |
---|
[3766] | 801 | END SUBROUTINE module_interface_init_arrays |
---|
[3637] | 802 | |
---|
| 803 | |
---|
| 804 | !------------------------------------------------------------------------------! |
---|
| 805 | ! Description: |
---|
| 806 | ! ------------ |
---|
| 807 | !> Perform module-specific initialization |
---|
| 808 | !------------------------------------------------------------------------------! |
---|
[3766] | 809 | SUBROUTINE module_interface_init |
---|
[3637] | 810 | |
---|
| 811 | |
---|
[3766] | 812 | IF ( biometeorology ) CALL bio_init |
---|
| 813 | IF ( bulk_cloud_model ) CALL bcm_init |
---|
| 814 | IF ( air_chemistry ) CALL chem_init |
---|
| 815 | IF ( virtual_flight ) CALL flight_init |
---|
| 816 | IF ( gust_module_enabled ) CALL gust_init |
---|
| 817 | IF ( indoor_model ) CALL im_init |
---|
| 818 | IF ( large_scale_forcing ) CALL lsf_init |
---|
| 819 | IF ( land_surface ) CALL lsm_init |
---|
| 820 | IF ( nudging ) CALL nudge_init |
---|
| 821 | IF ( ocean_mode ) CALL ocean_init |
---|
| 822 | IF ( plant_canopy ) CALL pcm_init |
---|
| 823 | IF ( salsa ) CALL salsa_init |
---|
| 824 | IF ( urban_surface ) CALL usm_init |
---|
| 825 | IF ( virtual_measurement ) CALL vm_init |
---|
| 826 | IF ( wind_turbine ) CALL wtm_init |
---|
| 827 | IF ( radiation ) CALL radiation_init |
---|
| 828 | IF ( user_module_enabled ) CALL user_init |
---|
[3685] | 829 | |
---|
| 830 | |
---|
[3766] | 831 | END SUBROUTINE module_interface_init |
---|
[3637] | 832 | |
---|
| 833 | |
---|
| 834 | !------------------------------------------------------------------------------! |
---|
| 835 | ! Description: |
---|
| 836 | ! ------------ |
---|
[3711] | 837 | !> Perform module-specific post-initialization checks |
---|
| 838 | !------------------------------------------------------------------------------! |
---|
[3766] | 839 | SUBROUTINE module_interface_init_checks |
---|
[3711] | 840 | |
---|
| 841 | |
---|
[3766] | 842 | IF ( biometeorology ) CALL bio_init_checks |
---|
[3711] | 843 | |
---|
| 844 | |
---|
[3766] | 845 | END SUBROUTINE module_interface_init_checks |
---|
[3711] | 846 | |
---|
| 847 | |
---|
| 848 | !------------------------------------------------------------------------------! |
---|
| 849 | ! Description: |
---|
| 850 | ! ------------ |
---|
[3637] | 851 | !> Gather module-specific header output |
---|
| 852 | !------------------------------------------------------------------------------! |
---|
[3766] | 853 | SUBROUTINE module_interface_header( io ) |
---|
[3637] | 854 | |
---|
| 855 | |
---|
[3766] | 856 | INTEGER(iwp), INTENT(IN) :: io !< unit of the output file |
---|
[3637] | 857 | |
---|
| 858 | |
---|
[3766] | 859 | IF ( biometeorology ) CALL bio_header ( io ) |
---|
| 860 | IF ( bulk_cloud_model ) CALL bcm_header( io ) |
---|
| 861 | IF ( air_chemistry ) CALL chem_header ( io ) |
---|
| 862 | IF ( virtual_flight ) CALL flight_header( io ) |
---|
| 863 | IF ( gust_module_enabled ) CALL gust_header( io ) |
---|
| 864 | IF ( land_surface ) CALL lsm_header( io ) |
---|
| 865 | IF ( large_scale_forcing ) CALL lsf_nudging_header( io ) |
---|
| 866 | IF ( nesting_offline ) CALL nesting_offl_header( io ) |
---|
| 867 | IF ( ocean_mode ) CALL ocean_header( io ) |
---|
| 868 | IF ( plant_canopy ) CALL pcm_header( io ) |
---|
| 869 | IF ( radiation ) CALL radiation_header( io ) |
---|
| 870 | IF ( salsa ) CALL salsa_header( io ) |
---|
| 871 | IF ( calculate_spectra ) CALL spectra_header( io ) |
---|
| 872 | IF ( syn_turb_gen ) CALL stg_header( io ) |
---|
| 873 | IF ( user_module_enabled ) CALL user_header( io ) |
---|
[3637] | 874 | |
---|
| 875 | |
---|
[3766] | 876 | END SUBROUTINE module_interface_header |
---|
[3637] | 877 | |
---|
| 878 | |
---|
| 879 | !------------------------------------------------------------------------------! |
---|
| 880 | ! Description: |
---|
| 881 | ! ------------ |
---|
[3874] | 882 | !> Perform module-specific actions while in time-integration (vector-optimized) |
---|
[3637] | 883 | !------------------------------------------------------------------------------! |
---|
[3766] | 884 | SUBROUTINE module_interface_actions( location ) |
---|
[3637] | 885 | |
---|
| 886 | |
---|
[3766] | 887 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
[3637] | 888 | |
---|
| 889 | |
---|
[3870] | 890 | IF ( bulk_cloud_model ) CALL bcm_actions( location ) |
---|
[3766] | 891 | IF ( gust_module_enabled ) CALL gust_actions( location ) |
---|
[3873] | 892 | IF ( ocean_mode ) CALL ocean_actions( location ) |
---|
[3871] | 893 | IF ( salsa ) CALL salsa_actions( location ) |
---|
[3875] | 894 | IF ( wind_turbine ) CALL wtm_actions( location ) |
---|
[3766] | 895 | IF ( user_module_enabled ) CALL user_actions( location ) |
---|
[3684] | 896 | |
---|
| 897 | |
---|
[3766] | 898 | END SUBROUTINE module_interface_actions |
---|
[3637] | 899 | |
---|
| 900 | |
---|
| 901 | !------------------------------------------------------------------------------! |
---|
| 902 | ! Description: |
---|
| 903 | ! ------------ |
---|
[3874] | 904 | !> Perform module-specific actions while in time-integration (cache-optimized) |
---|
[3637] | 905 | !------------------------------------------------------------------------------! |
---|
[3766] | 906 | SUBROUTINE module_interface_actions_ij( i, j, location ) |
---|
[3637] | 907 | |
---|
| 908 | |
---|
[3766] | 909 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
| 910 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
| 911 | CHARACTER (LEN=*), INTENT(IN) :: location !< call location string |
---|
[3637] | 912 | |
---|
| 913 | |
---|
[3870] | 914 | IF ( bulk_cloud_model ) CALL bcm_actions( i, j, location ) |
---|
[3766] | 915 | IF ( gust_module_enabled ) CALL gust_actions( i, j, location ) |
---|
[3873] | 916 | IF ( ocean_mode ) CALL ocean_actions( i, j, location ) |
---|
[3871] | 917 | IF ( salsa ) CALL salsa_actions( i, j, location ) |
---|
[3875] | 918 | IF ( wind_turbine ) CALL wtm_actions( i, j, location ) |
---|
[3766] | 919 | IF ( user_module_enabled ) CALL user_actions( i, j, location ) |
---|
[3684] | 920 | |
---|
| 921 | |
---|
[3766] | 922 | END SUBROUTINE module_interface_actions_ij |
---|
[3637] | 923 | |
---|
| 924 | |
---|
| 925 | !------------------------------------------------------------------------------! |
---|
| 926 | ! Description: |
---|
| 927 | ! ------------ |
---|
[3874] | 928 | !> Compute module-specific prognostic_equations (vector-optimized) |
---|
| 929 | !------------------------------------------------------------------------------! |
---|
| 930 | SUBROUTINE module_interface_non_transport_physics() |
---|
| 931 | |
---|
| 932 | |
---|
| 933 | IF ( bulk_cloud_model ) CALL bcm_non_transport_physics() |
---|
| 934 | |
---|
| 935 | |
---|
| 936 | END SUBROUTINE module_interface_non_transport_physics |
---|
| 937 | |
---|
| 938 | |
---|
| 939 | !------------------------------------------------------------------------------! |
---|
| 940 | ! Description: |
---|
| 941 | ! ------------ |
---|
[3837] | 942 | !> Compute module-specific prognostic_equations (cache-optimized) |
---|
| 943 | !------------------------------------------------------------------------------! |
---|
[3874] | 944 | SUBROUTINE module_interface_non_transport_physics_ij( i, j ) |
---|
| 945 | |
---|
| 946 | |
---|
| 947 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
| 948 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
| 949 | |
---|
| 950 | |
---|
| 951 | IF ( bulk_cloud_model ) CALL bcm_non_transport_physics( i, j ) |
---|
| 952 | |
---|
| 953 | |
---|
| 954 | END SUBROUTINE module_interface_non_transport_physics_ij |
---|
| 955 | |
---|
| 956 | |
---|
| 957 | !------------------------------------------------------------------------------! |
---|
| 958 | ! Description: |
---|
| 959 | ! ------------ |
---|
| 960 | !> Compute module-specific prognostic_equations (vector-optimized) |
---|
| 961 | !------------------------------------------------------------------------------! |
---|
[3837] | 962 | SUBROUTINE module_interface_prognostic_equations() |
---|
| 963 | |
---|
| 964 | |
---|
[3870] | 965 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations() |
---|
[3837] | 966 | IF ( gust_module_enabled ) CALL gust_prognostic_equations() |
---|
[3840] | 967 | IF ( ocean_mode ) CALL ocean_prognostic_equations() |
---|
[3864] | 968 | IF ( salsa ) CALL salsa_prognostic_equations() |
---|
[3837] | 969 | |
---|
| 970 | |
---|
| 971 | END SUBROUTINE module_interface_prognostic_equations |
---|
| 972 | |
---|
| 973 | |
---|
| 974 | !------------------------------------------------------------------------------! |
---|
| 975 | ! Description: |
---|
| 976 | ! ------------ |
---|
[3874] | 977 | !> Compute module-specific prognostic_equations (cache-optimized) |
---|
[3837] | 978 | !------------------------------------------------------------------------------! |
---|
| 979 | SUBROUTINE module_interface_prognostic_equations_ij( i, j, i_omp_start, tn ) |
---|
| 980 | |
---|
| 981 | |
---|
| 982 | INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction |
---|
| 983 | INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction |
---|
| 984 | INTEGER(iwp), INTENT(IN) :: i_omp_start !< first loop index of i-loop in prognostic_equations |
---|
| 985 | INTEGER(iwp), INTENT(IN) :: tn !< task number of openmp task |
---|
| 986 | |
---|
| 987 | |
---|
[3870] | 988 | IF ( bulk_cloud_model ) CALL bcm_prognostic_equations( i, j, i_omp_start, tn ) |
---|
[3837] | 989 | IF ( gust_module_enabled ) CALL gust_prognostic_equations( i, j, i_omp_start, tn ) |
---|
[3840] | 990 | IF ( ocean_mode ) CALL ocean_prognostic_equations( i, j, i_omp_start, tn ) |
---|
[3864] | 991 | IF ( salsa ) CALL salsa_prognostic_equations( i, j, i_omp_start, tn ) |
---|
[3837] | 992 | |
---|
| 993 | |
---|
| 994 | END SUBROUTINE module_interface_prognostic_equations_ij |
---|
| 995 | |
---|
| 996 | |
---|
| 997 | !------------------------------------------------------------------------------! |
---|
| 998 | ! Description: |
---|
| 999 | ! ------------ |
---|
[3637] | 1000 | !> Swap the timelevel pointers for module-specific arrays |
---|
| 1001 | !------------------------------------------------------------------------------! |
---|
[3766] | 1002 | SUBROUTINE module_interface_swap_timelevel ( swap_mode ) |
---|
[3637] | 1003 | |
---|
| 1004 | |
---|
[3766] | 1005 | INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap |
---|
[3637] | 1006 | |
---|
[3766] | 1007 | IF ( bulk_cloud_model ) CALL bcm_swap_timelevel( swap_mode ) |
---|
| 1008 | IF ( air_chemistry ) CALL chem_swap_timelevel( swap_mode ) |
---|
| 1009 | IF ( gust_module_enabled ) CALL gust_swap_timelevel( swap_mode ) |
---|
| 1010 | IF ( land_surface ) CALL lsm_swap_timelevel( swap_mode ) |
---|
| 1011 | IF ( ocean_mode ) CALL ocean_swap_timelevel( swap_mode ) |
---|
| 1012 | IF ( salsa ) CALL salsa_swap_timelevel( swap_mode ) |
---|
| 1013 | IF ( urban_surface ) CALL usm_swap_timelevel( swap_mode ) |
---|
[3637] | 1014 | |
---|
| 1015 | |
---|
[3766] | 1016 | END SUBROUTINE module_interface_swap_timelevel |
---|
[3637] | 1017 | |
---|
| 1018 | |
---|
| 1019 | !------------------------------------------------------------------------------! |
---|
| 1020 | ! |
---|
| 1021 | ! Description: |
---|
| 1022 | ! ------------ |
---|
| 1023 | !> Perform module-specific averaging of 3D data |
---|
| 1024 | !------------------------------------------------------------------------------! |
---|
[3766] | 1025 | SUBROUTINE module_interface_3d_data_averaging( mode, variable ) |
---|
[3637] | 1026 | |
---|
| 1027 | |
---|
[3766] | 1028 | CHARACTER (LEN=*), INTENT(IN) :: mode !< averaging interface mode |
---|
| 1029 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
[3637] | 1030 | |
---|
[3766] | 1031 | IF ( biometeorology ) CALL bio_3d_data_averaging( mode, variable ) |
---|
| 1032 | IF ( bulk_cloud_model ) CALL bcm_3d_data_averaging( mode, variable ) |
---|
| 1033 | IF ( air_chemistry ) CALL chem_3d_data_averaging( mode, variable ) |
---|
| 1034 | IF ( gust_module_enabled ) CALL gust_3d_data_averaging( mode, variable ) |
---|
| 1035 | IF ( land_surface ) CALL lsm_3d_data_averaging( mode, variable ) |
---|
| 1036 | IF ( ocean_mode ) CALL ocean_3d_data_averaging( mode, variable ) |
---|
| 1037 | IF ( radiation ) CALL radiation_3d_data_averaging( mode, variable ) |
---|
| 1038 | IF ( salsa ) CALL salsa_3d_data_averaging( mode, variable ) |
---|
| 1039 | IF ( urban_surface ) CALL usm_3d_data_averaging( mode, variable ) |
---|
| 1040 | IF ( user_module_enabled ) CALL user_3d_data_averaging( mode, variable ) |
---|
[3637] | 1041 | |
---|
| 1042 | |
---|
[3766] | 1043 | END SUBROUTINE module_interface_3d_data_averaging |
---|
[3637] | 1044 | |
---|
| 1045 | !------------------------------------------------------------------------------! |
---|
| 1046 | ! |
---|
| 1047 | ! Description: |
---|
| 1048 | ! ------------ |
---|
| 1049 | !> Define module-specific 2D output variables |
---|
| 1050 | !------------------------------------------------------------------------------! |
---|
[3766] | 1051 | SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode, & |
---|
| 1052 | local_pf, two_d, nzb_do, nzt_do, & |
---|
| 1053 | fill_value ) |
---|
[3637] | 1054 | |
---|
[3766] | 1055 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
| 1056 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
| 1057 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
| 1058 | CHARACTER (LEN=*), INTENT(INOUT) :: grid !< name of vertical grid |
---|
| 1059 | CHARACTER (LEN=*), INTENT(IN) :: mode !< either 'xy', 'xz' or 'yz' |
---|
| 1060 | LOGICAL, INTENT(OUT) :: two_d !< flag for 2D variables |
---|
| 1061 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
| 1062 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
| 1063 | REAL(wp), INTENT(IN) :: fill_value !< to be removed |
---|
[3637] | 1064 | |
---|
[3766] | 1065 | REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf !< ToDo: can also be kind=sp |
---|
[3637] | 1066 | |
---|
| 1067 | |
---|
[3766] | 1068 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
| 1069 | CALL bio_data_output_2d( & |
---|
| 1070 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
| 1071 | ) |
---|
| 1072 | ENDIF |
---|
[3637] | 1073 | |
---|
[3766] | 1074 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
| 1075 | CALL bcm_data_output_2d( & |
---|
| 1076 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
| 1077 | ) |
---|
| 1078 | ENDIF |
---|
[3637] | 1079 | |
---|
[3766] | 1080 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
| 1081 | CALL chem_data_output_2d( & |
---|
| 1082 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
| 1083 | ) |
---|
| 1084 | ENDIF |
---|
[3637] | 1085 | |
---|
[3766] | 1086 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
| 1087 | CALL gust_data_output_2d( & |
---|
| 1088 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value & |
---|
| 1089 | ) |
---|
| 1090 | ENDIF |
---|
[3637] | 1091 | |
---|
[3766] | 1092 | IF ( .NOT. found .AND. land_surface ) THEN |
---|
| 1093 | CALL lsm_data_output_2d( & |
---|
| 1094 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
| 1095 | ) |
---|
| 1096 | ENDIF |
---|
[3637] | 1097 | |
---|
[3766] | 1098 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
| 1099 | CALL ocean_data_output_2d( & |
---|
| 1100 | av, variable, found, grid, mode, local_pf, nzb_do, nzt_do & |
---|
| 1101 | ) |
---|
| 1102 | ENDIF |
---|
[3637] | 1103 | |
---|
[3766] | 1104 | IF ( .NOT. found .AND. radiation ) THEN |
---|
| 1105 | CALL radiation_data_output_2d( & |
---|
| 1106 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
| 1107 | ) |
---|
| 1108 | ENDIF |
---|
[3637] | 1109 | |
---|
[3766] | 1110 | IF ( .NOT. found .AND. salsa ) THEN |
---|
| 1111 | CALL salsa_data_output_2d( & |
---|
| 1112 | av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do& |
---|
| 1113 | ) |
---|
| 1114 | ENDIF |
---|
[3637] | 1115 | |
---|
[3766] | 1116 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
| 1117 | CALL user_data_output_2d( & |
---|
| 1118 | av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & |
---|
| 1119 | ) |
---|
| 1120 | ENDIF |
---|
[3637] | 1121 | |
---|
[3766] | 1122 | END SUBROUTINE module_interface_data_output_2d |
---|
[3637] | 1123 | |
---|
| 1124 | |
---|
| 1125 | !------------------------------------------------------------------------------! |
---|
| 1126 | ! |
---|
| 1127 | ! Description: |
---|
| 1128 | ! ------------ |
---|
| 1129 | !> Define module-specific 3D output variables |
---|
| 1130 | !------------------------------------------------------------------------------! |
---|
[3766] | 1131 | SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf, & |
---|
| 1132 | fill_value, resorted, nzb_do, nzt_do ) |
---|
[3637] | 1133 | |
---|
| 1134 | |
---|
[3766] | 1135 | INTEGER(iwp), INTENT(IN) :: av !< flag for (non-)average output |
---|
| 1136 | CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name |
---|
| 1137 | LOGICAL, INTENT(INOUT) :: found !< flag if output variable is found |
---|
| 1138 | REAL(wp), INTENT(IN) :: fill_value !< ToDo: refactor |
---|
| 1139 | LOGICAL, INTENT(OUT) :: resorted !< flag if output has been resorted |
---|
| 1140 | INTEGER(iwp), INTENT(IN) :: nzb_do !< vertical output index (bottom) (usually 0) |
---|
| 1141 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) |
---|
[3637] | 1142 | |
---|
[3766] | 1143 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(OUT) :: local_pf |
---|
[3637] | 1144 | |
---|
| 1145 | |
---|
[3766] | 1146 | IF ( .NOT. found .AND. biometeorology ) THEN |
---|
| 1147 | CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1148 | resorted = .FALSE. |
---|
| 1149 | ENDIF |
---|
[3637] | 1150 | |
---|
[3766] | 1151 | IF ( .NOT. found .AND. bulk_cloud_model ) THEN |
---|
| 1152 | CALL bcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1153 | resorted = .TRUE. |
---|
| 1154 | ENDIF |
---|
[3637] | 1155 | |
---|
[3766] | 1156 | IF ( .NOT. found .AND. air_chemistry ) THEN |
---|
| 1157 | CALL chem_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
| 1158 | resorted = .TRUE. |
---|
| 1159 | ENDIF |
---|
[3637] | 1160 | |
---|
[3766] | 1161 | IF ( .NOT. found .AND. gust_module_enabled ) THEN |
---|
| 1162 | CALL gust_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
| 1163 | resorted = .TRUE. |
---|
| 1164 | ENDIF |
---|
[3744] | 1165 | |
---|
[3766] | 1166 | IF ( .NOT. found .AND. indoor_model ) THEN |
---|
| 1167 | CALL im_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
| 1168 | resorted = .TRUE. |
---|
| 1169 | ENDIF |
---|
[3637] | 1170 | |
---|
[3766] | 1171 | IF ( .NOT. found .AND. ocean_mode ) THEN |
---|
| 1172 | CALL ocean_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1173 | resorted = .TRUE. |
---|
| 1174 | ENDIF |
---|
[3637] | 1175 | |
---|
[3766] | 1176 | IF ( .NOT. found .AND. plant_canopy ) THEN |
---|
| 1177 | CALL pcm_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) |
---|
| 1178 | resorted = .TRUE. |
---|
| 1179 | ENDIF |
---|
[3637] | 1180 | |
---|
[3766] | 1181 | IF ( .NOT. found .AND. radiation ) THEN |
---|
| 1182 | CALL radiation_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1183 | resorted = .TRUE. |
---|
| 1184 | ENDIF |
---|
[3637] | 1185 | |
---|
[3766] | 1186 | IF ( .NOT. found .AND. salsa ) THEN |
---|
| 1187 | CALL salsa_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1188 | resorted = .TRUE. |
---|
| 1189 | ENDIF |
---|
[3637] | 1190 | |
---|
[3766] | 1191 | IF ( .NOT. found .AND. user_module_enabled ) THEN |
---|
| 1192 | CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 1193 | resorted = .TRUE. |
---|
| 1194 | ENDIF |
---|
[3637] | 1195 | |
---|
| 1196 | |
---|
[3766] | 1197 | END SUBROUTINE module_interface_data_output_3d |
---|
[3637] | 1198 | |
---|
| 1199 | |
---|
| 1200 | !------------------------------------------------------------------------------! |
---|
| 1201 | ! Description: |
---|
| 1202 | ! ------------ |
---|
| 1203 | !> Compute module-specific profile and timeseries data |
---|
| 1204 | !------------------------------------------------------------------------------! |
---|
[3766] | 1205 | SUBROUTINE module_interface_statistics( mode, sr, tn, dots_max ) |
---|
[3637] | 1206 | |
---|
| 1207 | |
---|
[3766] | 1208 | CHARACTER (LEN=*), INTENT(IN) :: mode !< statistical analysis mode |
---|
| 1209 | INTEGER(iwp), INTENT(IN) :: sr !< |
---|
| 1210 | INTEGER(iwp), INTENT(IN) :: tn !< |
---|
| 1211 | INTEGER(iwp), INTENT(IN) :: dots_max !< maximum number of timeseries |
---|
[3637] | 1212 | |
---|
[3766] | 1213 | IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) |
---|
| 1214 | IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) |
---|
| 1215 | IF ( user_module_enabled ) CALL user_statistics( mode, sr, tn ) |
---|
[3637] | 1216 | |
---|
| 1217 | |
---|
[3766] | 1218 | END SUBROUTINE module_interface_statistics |
---|
[3637] | 1219 | |
---|
| 1220 | |
---|
| 1221 | !------------------------------------------------------------------------------! |
---|
| 1222 | ! Description: |
---|
| 1223 | ! ------------ |
---|
| 1224 | !> Read module-specific restart data globaly shared by all MPI ranks |
---|
| 1225 | !------------------------------------------------------------------------------! |
---|
[3766] | 1226 | SUBROUTINE module_interface_rrd_global( found ) |
---|
[3637] | 1227 | |
---|
| 1228 | |
---|
[3806] | 1229 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
[3637] | 1230 | |
---|
[3766] | 1231 | IF ( .NOT. found ) CALL bio_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1232 | IF ( .NOT. found ) CALL bcm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1233 | IF ( .NOT. found ) CALL flight_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1234 | IF ( .NOT. found ) CALL gust_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1235 | IF ( .NOT. found ) CALL ocean_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1236 | IF ( .NOT. found ) CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable |
---|
| 1237 | IF ( .NOT. found ) CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
| 1238 | IF ( .NOT. found ) CALL surface_data_output_rrd_global( found ) |
---|
| 1239 | IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable |
---|
[3637] | 1240 | |
---|
| 1241 | |
---|
[3766] | 1242 | END SUBROUTINE module_interface_rrd_global |
---|
[3637] | 1243 | |
---|
| 1244 | |
---|
| 1245 | !------------------------------------------------------------------------------! |
---|
| 1246 | ! Description: |
---|
| 1247 | ! ------------ |
---|
| 1248 | !> Write module-specific restart data globaly shared by all MPI ranks |
---|
| 1249 | !------------------------------------------------------------------------------! |
---|
[3766] | 1250 | SUBROUTINE module_interface_wrd_global |
---|
[3637] | 1251 | |
---|
| 1252 | |
---|
[3766] | 1253 | IF ( biometeorology ) CALL bio_wrd_global |
---|
| 1254 | IF ( bulk_cloud_model ) CALL bcm_wrd_global |
---|
| 1255 | IF ( virtual_flight ) CALL flight_wrd_global |
---|
| 1256 | IF ( gust_module_enabled ) CALL gust_wrd_global |
---|
| 1257 | IF ( ocean_mode ) CALL ocean_wrd_global |
---|
| 1258 | IF ( syn_turb_gen ) CALL stg_wrd_global |
---|
| 1259 | IF ( wind_turbine ) CALL wtm_wrd_global |
---|
| 1260 | IF ( surface_output ) CALL surface_data_output_wrd_global |
---|
| 1261 | IF ( user_module_enabled ) CALL user_wrd_global |
---|
[3637] | 1262 | |
---|
| 1263 | |
---|
[3766] | 1264 | END SUBROUTINE module_interface_wrd_global |
---|
[3637] | 1265 | |
---|
| 1266 | |
---|
| 1267 | !------------------------------------------------------------------------------! |
---|
| 1268 | ! Description: |
---|
| 1269 | ! ------------ |
---|
| 1270 | !> Read module-specific restart data specific to local MPI ranks |
---|
| 1271 | !------------------------------------------------------------------------------! |
---|
[3767] | 1272 | SUBROUTINE module_interface_rrd_local( map_index, & |
---|
[3766] | 1273 | nxlf, nxlc, nxl_on_file, & |
---|
| 1274 | nxrf, nxrc, nxr_on_file, & |
---|
| 1275 | nynf, nync, nyn_on_file, & |
---|
| 1276 | nysf, nysc, nys_on_file, & |
---|
| 1277 | tmp_2d, tmp_3d, found ) |
---|
[3637] | 1278 | |
---|
| 1279 | |
---|
[3806] | 1280 | INTEGER(iwp), INTENT(IN) :: map_index !< |
---|
| 1281 | INTEGER(iwp), INTENT(IN) :: nxlc !< |
---|
| 1282 | INTEGER(iwp), INTENT(IN) :: nxlf !< |
---|
| 1283 | INTEGER(iwp), INTENT(IN) :: nxl_on_file !< |
---|
| 1284 | INTEGER(iwp), INTENT(IN) :: nxrc !< |
---|
| 1285 | INTEGER(iwp), INTENT(IN) :: nxrf !< |
---|
| 1286 | INTEGER(iwp), INTENT(IN) :: nxr_on_file !< |
---|
| 1287 | INTEGER(iwp), INTENT(IN) :: nync !< |
---|
| 1288 | INTEGER(iwp), INTENT(IN) :: nynf !< |
---|
| 1289 | INTEGER(iwp), INTENT(IN) :: nyn_on_file !< |
---|
| 1290 | INTEGER(iwp), INTENT(IN) :: nysc !< |
---|
| 1291 | INTEGER(iwp), INTENT(IN) :: nysf !< |
---|
| 1292 | INTEGER(iwp), INTENT(IN) :: nys_on_file !< |
---|
| 1293 | LOGICAL, INTENT(INOUT) :: found !< flag if variable was found |
---|
[3637] | 1294 | |
---|
[3766] | 1295 | REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_2d !< |
---|
| 1296 | REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_3d !< |
---|
[3637] | 1297 | |
---|
| 1298 | |
---|
[3766] | 1299 | IF ( .NOT. found ) CALL bio_rrd_local( & |
---|
| 1300 | found & |
---|
| 1301 | ) |
---|
[3650] | 1302 | |
---|
[3766] | 1303 | IF ( .NOT. found ) CALL bcm_rrd_local( & |
---|
[3767] | 1304 | map_index, & |
---|
[3766] | 1305 | nxlf, nxlc, nxl_on_file, & |
---|
| 1306 | nxrf, nxrc, nxr_on_file, & |
---|
| 1307 | nynf, nync, nyn_on_file, & |
---|
| 1308 | nysf, nysc, nys_on_file, & |
---|
| 1309 | tmp_2d, tmp_3d, found & |
---|
| 1310 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1311 | |
---|
[3766] | 1312 | IF ( .NOT. found ) CALL chem_rrd_local( & |
---|
[3767] | 1313 | map_index, & |
---|
[3766] | 1314 | nxlf, nxlc, nxl_on_file, & |
---|
| 1315 | nxrf, nxrc, nxr_on_file, & |
---|
| 1316 | nynf, nync, nyn_on_file, & |
---|
| 1317 | nysf, nysc, nys_on_file, & |
---|
| 1318 | tmp_3d, found & |
---|
| 1319 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1320 | |
---|
[3766] | 1321 | IF ( .NOT. found ) CALL gust_rrd_local( & |
---|
[3767] | 1322 | map_index, & |
---|
[3766] | 1323 | nxlf, nxlc, nxl_on_file, & |
---|
| 1324 | nxrf, nxrc, nxr_on_file, & |
---|
| 1325 | nynf, nync, nyn_on_file, & |
---|
| 1326 | nysf, nysc, nys_on_file, & |
---|
| 1327 | tmp_2d, tmp_3d, found & |
---|
| 1328 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1329 | |
---|
[3766] | 1330 | IF ( .NOT. found ) CALL lsm_rrd_local( & |
---|
[3767] | 1331 | map_index, & |
---|
[3766] | 1332 | nxlf, nxlc, nxl_on_file, & |
---|
| 1333 | nxrf, nxrc, nxr_on_file, & |
---|
| 1334 | nynf, nync, nyn_on_file, & |
---|
| 1335 | nysf, nysc, nys_on_file, & |
---|
| 1336 | tmp_2d, found & |
---|
| 1337 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1338 | |
---|
[3766] | 1339 | IF ( .NOT. found ) CALL ocean_rrd_local( & |
---|
[3767] | 1340 | map_index, & |
---|
[3766] | 1341 | nxlf, nxlc, nxl_on_file, & |
---|
| 1342 | nxrf, nxrc, nxr_on_file, & |
---|
| 1343 | nynf, nync, nyn_on_file, & |
---|
| 1344 | nysf, nysc, nys_on_file, & |
---|
[3767] | 1345 | tmp_3d, found & |
---|
[3766] | 1346 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1347 | |
---|
[3766] | 1348 | IF ( .NOT. found ) CALL radiation_rrd_local( & |
---|
[3767] | 1349 | map_index, & |
---|
[3766] | 1350 | nxlf, nxlc, nxl_on_file, & |
---|
| 1351 | nxrf, nxrc, nxr_on_file, & |
---|
| 1352 | nynf, nync, nyn_on_file, & |
---|
| 1353 | nysf, nysc, nys_on_file, & |
---|
| 1354 | tmp_2d, tmp_3d, found & |
---|
| 1355 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1356 | |
---|
[3766] | 1357 | IF ( .NOT. found ) CALL salsa_rrd_local( & |
---|
[3767] | 1358 | map_index, & |
---|
[3766] | 1359 | nxlf, nxlc, nxl_on_file, & |
---|
| 1360 | nxrf, nxrc, nxr_on_file, & |
---|
| 1361 | nynf, nync, nyn_on_file, & |
---|
| 1362 | nysf, nysc, nys_on_file, & |
---|
| 1363 | tmp_3d, found & |
---|
| 1364 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1365 | |
---|
[3766] | 1366 | IF ( .NOT. found ) CALL usm_rrd_local( & |
---|
[3767] | 1367 | map_index, & |
---|
[3766] | 1368 | nxlf, nxlc, nxl_on_file, & |
---|
[3767] | 1369 | nxrf, nxr_on_file, & |
---|
| 1370 | nynf, nyn_on_file, & |
---|
[3766] | 1371 | nysf, nysc, nys_on_file, & |
---|
| 1372 | found & |
---|
| 1373 | ) ! ToDo: change interface to pass variable |
---|
[3762] | 1374 | ! |
---|
[3766] | 1375 | !-- Surface data do not need overlap data, so do not pass these information. |
---|
| 1376 | IF ( .NOT. found ) CALL surface_data_output_rrd_local( found ) |
---|
[3731] | 1377 | |
---|
[3766] | 1378 | IF ( .NOT. found ) CALL user_rrd_local( & |
---|
[3767] | 1379 | map_index, & |
---|
[3766] | 1380 | nxlf, nxlc, nxl_on_file, & |
---|
| 1381 | nxrf, nxrc, nxr_on_file, & |
---|
| 1382 | nynf, nync, nyn_on_file, & |
---|
| 1383 | nysf, nysc, nys_on_file, & |
---|
| 1384 | tmp_3d, found & |
---|
| 1385 | ) ! ToDo: change interface to pass variable |
---|
[3637] | 1386 | |
---|
| 1387 | |
---|
[3766] | 1388 | END SUBROUTINE module_interface_rrd_local |
---|
[3637] | 1389 | |
---|
| 1390 | |
---|
| 1391 | !------------------------------------------------------------------------------! |
---|
| 1392 | ! Description: |
---|
| 1393 | ! ------------ |
---|
| 1394 | !> Write module-specific restart data specific to local MPI ranks |
---|
| 1395 | !------------------------------------------------------------------------------! |
---|
[3766] | 1396 | SUBROUTINE module_interface_wrd_local |
---|
[3637] | 1397 | |
---|
| 1398 | |
---|
[3766] | 1399 | IF ( biometeorology ) CALL bio_wrd_local |
---|
| 1400 | IF ( bulk_cloud_model ) CALL bcm_wrd_local |
---|
| 1401 | IF ( air_chemistry ) CALL chem_wrd_local |
---|
| 1402 | IF ( gust_module_enabled ) CALL gust_wrd_local |
---|
| 1403 | IF ( land_surface ) CALL lsm_wrd_local |
---|
| 1404 | IF ( ocean_mode ) CALL ocean_wrd_local |
---|
| 1405 | IF ( radiation ) CALL radiation_wrd_local |
---|
| 1406 | IF ( salsa ) CALL salsa_wrd_local |
---|
| 1407 | IF ( urban_surface ) CALL usm_wrd_local |
---|
| 1408 | IF ( surface_output ) CALL surface_data_output_wrd_local |
---|
| 1409 | IF ( user_module_enabled ) CALL user_wrd_local |
---|
[3637] | 1410 | |
---|
| 1411 | |
---|
[3766] | 1412 | END SUBROUTINE module_interface_wrd_local |
---|
[3637] | 1413 | |
---|
| 1414 | |
---|
[3687] | 1415 | !------------------------------------------------------------------------------! |
---|
| 1416 | ! Description: |
---|
| 1417 | ! ------------ |
---|
| 1418 | !> Perform module-specific last actions before the program terminates |
---|
| 1419 | !------------------------------------------------------------------------------! |
---|
[3766] | 1420 | SUBROUTINE module_interface_last_actions |
---|
[3687] | 1421 | |
---|
| 1422 | |
---|
[3766] | 1423 | IF ( virtual_measurement ) CALL vm_last_actions |
---|
| 1424 | IF ( user_module_enabled ) CALL user_last_actions |
---|
[3687] | 1425 | |
---|
| 1426 | |
---|
[3766] | 1427 | END SUBROUTINE module_interface_last_actions |
---|
[3687] | 1428 | |
---|
[3766] | 1429 | |
---|
| 1430 | END MODULE module_interface |
---|