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