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