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