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