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