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