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