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