Changeset 4039 for palm/trunk/SOURCE
- Timestamp:
- Jun 18, 2019 10:32:41 AM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4017 r4039 25 25 # ----------------- 26 26 # $Id$ 27 # add dependency for diagnostic output quantities 28 # 29 # 4017 2019-06-06 12:16:46Z schwenkel 27 30 # add dependency for init_pegrid 28 31 # … … 770 773 average_3d_data.o: \ 771 774 cpulog_mod.o \ 772 diagnostic_output_quantities_mod.o \773 775 exchange_horiz_2d.o \ 774 776 mod_kinds.o \ … … 934 936 bulk_cloud_model_mod.o \ 935 937 cpulog_mod.o \ 936 diagnostic_output_quantities_mod.o \937 938 land_surface_model_mod.o \ 938 939 mod_kinds.o \ … … 947 948 bulk_cloud_model_mod.o \ 948 949 cpulog_mod.o \ 949 diagnostic_output_quantities_mod.o \950 950 land_surface_model_mod.o \ 951 951 mod_kinds.o \ … … 962 962 diagnostic_output_quantities_mod.o: \ 963 963 mod_kinds.o \ 964 modules.o 964 modules.o \ 965 surface_mod.o 965 966 diffusion_s.o: \ 966 967 mod_kinds.o \ … … 1179 1180 bulk_cloud_model_mod.o \ 1180 1181 chemistry_model_mod.o \ 1182 diagnostic_output_quantities_mod.o \ 1181 1183 gust_mod.o \ 1182 1184 indoor_model_mod.o \ … … 1224 1226 biometeorology_mod.o \ 1225 1227 chemistry_model_mod.o \ 1228 diagnostic_output_quantities_mod.o \ 1226 1229 gust_mod.o \ 1227 1230 indoor_model_mod.o \ … … 1472 1475 bulk_cloud_model_mod.o \ 1473 1476 cpulog_mod.o \ 1474 diagnostic_output_quantities_mod.o \1475 1477 mod_kinds.o \ 1476 1478 module_interface.o \ … … 1714 1716 write_restart_data_mod.o: \ 1715 1717 date_and_time_mod.o \ 1716 diagnostic_output_quantities_mod.o \1717 1718 mod_kinds.o \ 1718 1719 model_1d_mod.o \ -
palm/trunk/SOURCE/average_3d_data.f90
r3994 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize diagnostic output 28 ! 29 ! 3994 2019-05-22 18:08:09Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 191 194 ONLY: cpu_log, log_point 192 195 193 USE diagnostic_output_quantities_mod, &194 ONLY: ti_av195 196 196 USE indices, & 197 197 ONLY: nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt … … 521 521 ENDIF 522 522 523 524 CASE ( 'ti' )525 IF ( ALLOCATED( ti_av ) ) THEN526 DO i = nxl, nxr527 DO j = nys, nyn528 DO k = nzb, nzt+1529 ti_av(k,j,i) = ti_av(k,j,i) / REAL( average_count_3d, KIND=wp )530 ENDDO531 ENDDO532 ENDDO533 ENDIF534 535 523 CASE ( 'w' ) 536 524 IF ( ALLOCATED( w_av ) ) THEN -
palm/trunk/SOURCE/check_parameters.f90
r4017 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize diagnostic output 28 ! 29 ! 4017 2019-06-06 12:16:46Z schwenkel 27 30 ! output of turbulence intensity added 28 31 ! … … 3061 3064 CONTINUE 3062 3065 3063 CASE ( 'ti' )3064 unit = '1/s'3065 3066 3066 CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*', & 3067 3067 'shf*', 'ssws*', 't*', 'theta_2m*', 'tsurf*', 'us*', & -
palm/trunk/SOURCE/data_output_2d.f90
r3994 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! modularize diagnostic output 28 ! 29 ! 3994 2019-05-22 18:08:09Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 324 327 USE cpulog, & 325 328 ONLY: cpu_log, log_point 326 327 USE diagnostic_output_quantities_mod, &328 ONLY: ti, ti_av329 329 330 330 USE indices, & … … 1171 1171 IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0_wp 1172 1172 ENDIF 1173 1173 1174 1174 CASE ( 'us*_xy' ) ! 2d-array 1175 1175 IF ( av == 0 ) THEN … … 1266 1266 two_d = .TRUE. 1267 1267 level_z(nzb+1) = zu(nzb+1) 1268 1269 CASE ( 'ti_xy', 'ti_xz', 'ti_yz' )1270 IF ( av == 0 ) THEN1271 to_be_resorted => ti1272 ELSE1273 IF ( .NOT. ALLOCATED( ti_av ) ) THEN1274 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )1275 ti_av = REAL( fill_value, KIND = wp )1276 ENDIF1277 to_be_resorted => ti_av1278 ENDIF1279 IF ( mode == 'xy' ) level_z = zu1280 1268 1281 1269 CASE ( 'w_xy', 'w_xz', 'w_yz' ) -
palm/trunk/SOURCE/data_output_3d.f90
r3994 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! modularize diagnostic output 28 ! 29 ! 3994 2019-05-22 18:08:09Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 275 278 USE cpulog, & 276 279 ONLY: log_point, cpu_log 277 278 USE diagnostic_output_quantities_mod, &279 ONLY: ti, ti_av280 280 281 281 #if defined( __parallel ) … … 703 703 ENDIF 704 704 to_be_resorted => vpt_av 705 ENDIF706 707 CASE ( 'ti' )708 IF ( av == 0 ) THEN709 to_be_resorted => ti710 ELSE711 IF ( .NOT. ALLOCATED( ti_av ) ) THEN712 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )713 ti_av = REAL( fill_value, KIND = wp )714 ENDIF715 to_be_resorted => ti_av716 705 ENDIF 717 706 -
palm/trunk/SOURCE/data_output_mask.f90
r3994 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize diagnostic output 28 ! 29 ! 3994 2019-05-22 18:08:09Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 180 183 time_since_reference_point 181 184 185 USE diagnostic_output_quantities_mod, & 186 ONLY: doq_output_mask 187 182 188 USE cpulog, & 183 189 ONLY: cpu_log, log_point 184 185 USE diagnostic_output_quantities_mod, &186 ONLY: ti, ti_av187 190 188 191 USE indices, & … … 669 672 ENDIF 670 673 671 CASE ( 'ti' )672 IF ( av == 0 ) THEN673 to_be_resorted => ti674 ELSE675 to_be_resorted => ti_av676 ENDIF677 678 674 CASE ( 'w' ) 679 675 grid = 'w' … … 697 693 local_pf ) 698 694 ENDIF 695 ! 696 !-- Check for diagnostic quantities 697 CALL doq_output_mask( av, domask(mid,av,ivar), found, local_pf ) 699 698 ! 700 699 !-- SALSA quantities -
palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
r3998 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Add output of uu, vv, ww to enable variance calculation according temporal 28 ! EC method 29 ! - Allocate arrays only when they are required 30 ! - Formatting adjustment 31 ! - Rename subroutines 32 ! - Further modularization 33 ! 34 ! 3998 2019-05-23 13:38:11Z suehring 27 35 ! Bugfix in gathering all output strings 28 36 ! … … 43 51 MODULE diagnostic_output_quantities_mod 44 52 45 46 ! USE arrays_3d, & 47 ! ONLY: dzw, e, heatflux_output_conversion, nc, nr, p, pt, & 48 ! precipitation_amount, prr, q, qc, ql, ql_c, ql_v, qr, s, tend, & 49 ! u, v, vpt, w, zu, zw, waterflux_output_conversion, hyrho, d_exner 53 USE arrays_3d, & 54 ONLY: ddzu, u, v, w 50 55 ! 51 56 ! USE averaging … … 62 67 ! USE cpulog, & 63 68 ! ONLY: cpu_log, log_point 64 ! 65 ! USE indices, & 66 ! ONLY: nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, & 67 ! nzb, nzt, wall_flags_0 69 70 USE grid_variables, & 71 ONLY: ddx, ddy 72 ! 73 USE indices, & 74 ONLY: nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0 68 75 ! 69 76 USE kinds … … 103 110 104 111 INTEGER(iwp) :: timestep_number_at_prev_calc = 0 !< ...at previous diagnostic output calculation 105 106 LOGICAL :: initialized_diagnostic_output_quantities = .FALSE. 107 LOGICAL :: prepared_diagnostic_output_quantities = .FALSE. 112 113 LOGICAL :: initialized_diagnostic_output_quantities = .FALSE. !< flag indicating whether output is initialized 114 LOGICAL :: prepared_diagnostic_output_quantities = .FALSE. !< flag indicating whether output is p 108 115 109 116 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ti !< rotation(u,v,w) aka turbulence intensity 110 117 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ti_av !< avg. rotation(u,v,w) aka turbulence intensity 118 119 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: uu !< uu 120 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: uu_av !< mean of uu 121 122 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: vv !< vv 123 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: vv_av !< mean of vv 124 125 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ww !< ww 126 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ww_av !< mean of ww 111 127 112 128 … … 117 133 ! 118 134 !-- Public variables 119 PUBLIC do_all, & 120 initialized_diagnostic_output_quantities, & 121 prepared_diagnostic_output_quantities, & 122 ti, ti_av, & 123 timestep_number_at_prev_calc 124 ! 125 !-- Public routines 126 PUBLIC diagnostic_output_quantities_calculate, & 127 diagnostic_output_quantities_init, & 128 diagnostic_output_quantities_prepare 129 130 131 INTERFACE diagnostic_output_quantities_init 132 MODULE PROCEDURE diagnostic_output_quantities_init 133 END INTERFACE diagnostic_output_quantities_init 134 135 INTERFACE diagnostic_output_quantities_calculate 136 MODULE PROCEDURE diagnostic_output_quantities_calculate 137 END INTERFACE diagnostic_output_quantities_calculate 138 139 INTERFACE diagnostic_output_quantities_prepare 140 MODULE PROCEDURE diagnostic_output_quantities_prepare 141 END INTERFACE diagnostic_output_quantities_prepare 135 PUBLIC do_all, & 136 initialized_diagnostic_output_quantities, & 137 prepared_diagnostic_output_quantities, & 138 timestep_number_at_prev_calc, & 139 ti_av, & 140 uu_av, & 141 vv_av, & 142 ww_av 143 ! 144 !-- Public routines 145 PUBLIC doq_3d_data_averaging, & 146 doq_calculate, & 147 doq_check_data_output, & 148 doq_define_netcdf_grid, & 149 doq_output_2d, & 150 doq_output_3d, & 151 doq_output_mask, & 152 doq_init, & 153 doq_prepare, & 154 doq_wrd_local 155 ! doq_rrd_local, & 156 157 158 INTERFACE doq_3d_data_averaging 159 MODULE PROCEDURE doq_3d_data_averaging 160 END INTERFACE doq_3d_data_averaging 161 162 INTERFACE doq_calculate 163 MODULE PROCEDURE doq_calculate 164 END INTERFACE doq_calculate 165 166 INTERFACE doq_check_data_output 167 MODULE PROCEDURE doq_check_data_output 168 END INTERFACE doq_check_data_output 169 170 INTERFACE doq_define_netcdf_grid 171 MODULE PROCEDURE doq_define_netcdf_grid 172 END INTERFACE doq_define_netcdf_grid 173 174 INTERFACE doq_output_2d 175 MODULE PROCEDURE doq_output_2d 176 END INTERFACE doq_output_2d 177 178 INTERFACE doq_output_3d 179 MODULE PROCEDURE doq_output_3d 180 END INTERFACE doq_output_3d 181 182 INTERFACE doq_output_mask 183 MODULE PROCEDURE doq_output_mask 184 END INTERFACE doq_output_mask 185 186 INTERFACE doq_init 187 MODULE PROCEDURE doq_init 188 END INTERFACE doq_init 189 190 INTERFACE doq_prepare 191 MODULE PROCEDURE doq_prepare 192 END INTERFACE doq_prepare 193 194 ! INTERFACE doq_rrd_local 195 ! MODULE PROCEDURE doq_rrd_local 196 ! END INTERFACE doq_rrd_local 197 198 INTERFACE doq_wrd_local 199 MODULE PROCEDURE doq_wrd_local 200 END INTERFACE doq_wrd_local 142 201 143 202 144 203 CONTAINS 145 204 146 205 !------------------------------------------------------------------------------! 147 206 ! Description: 148 207 ! ------------ 149 !> ... 150 !------------------------------------------------------------------------------! 151 SUBROUTINE diagnostic_output_quantities_init 152 153 154 USE indices, & 155 ONLY: nxl, nxr, nyn, nys, nzb, nzt 208 !> Sum up and time-average diagnostic output quantities as well as allocate 209 !> the array necessary for storing the average. 210 !------------------------------------------------------------------------------! 211 SUBROUTINE doq_3d_data_averaging( mode, variable ) 212 213 USE control_parameters, & 214 ONLY: average_count_3d 215 216 CHARACTER (LEN=*) :: mode !< 217 CHARACTER (LEN=*) :: variable !< 218 219 INTEGER(iwp) :: i !< 220 INTEGER(iwp) :: j !< 221 INTEGER(iwp) :: k !< 222 223 IF ( mode == 'allocate' ) THEN 224 225 SELECT CASE ( TRIM( variable ) ) 226 227 CASE ( 'ti' ) 228 IF ( .NOT. ALLOCATED( ti_av ) ) THEN 229 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 230 ENDIF 231 ti_av = 0.0_wp 232 233 CASE ( 'uu' ) 234 IF ( .NOT. ALLOCATED( uu_av ) ) THEN 235 ALLOCATE( uu_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 236 ENDIF 237 uu_av = 0.0_wp 238 239 CASE ( 'vv' ) 240 IF ( .NOT. ALLOCATED( vv_av ) ) THEN 241 ALLOCATE( vv_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 242 ENDIF 243 vv_av = 0.0_wp 244 245 CASE ( 'ww' ) 246 IF ( .NOT. ALLOCATED( ww_av ) ) THEN 247 ALLOCATE( ww_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 248 ENDIF 249 ww_av = 0.0_wp 250 251 CASE DEFAULT 252 CONTINUE 253 254 END SELECT 255 256 ELSEIF ( mode == 'sum' ) THEN 257 258 SELECT CASE ( TRIM( variable ) ) 259 260 CASE ( 'ti' ) 261 IF ( ALLOCATED( ti_av ) ) THEN 262 DO i = nxl, nxr 263 DO j = nys, nyn 264 DO k = nzb, nzt+1 265 ti_av(k,j,i) = ti_av(k,j,i) + ti(k,j,i) 266 ENDDO 267 ENDDO 268 ENDDO 269 ENDIF 270 271 CASE ( 'uu' ) 272 IF ( ALLOCATED( uu_av ) ) THEN 273 DO i = nxl, nxr 274 DO j = nys, nyn 275 DO k = nzb, nzt+1 276 uu_av(k,j,i) = uu_av(k,j,i) + uu(k,j,i) 277 ENDDO 278 ENDDO 279 ENDDO 280 ENDIF 281 282 CASE ( 'vv' ) 283 IF ( ALLOCATED( vv_av ) ) THEN 284 DO i = nxl, nxr 285 DO j = nys, nyn 286 DO k = nzb, nzt+1 287 vv_av(k,j,i) = vv_av(k,j,i) + vv(k,j,i) 288 ENDDO 289 ENDDO 290 ENDDO 291 ENDIF 292 293 CASE ( 'ww' ) 294 IF ( ALLOCATED( ww_av ) ) THEN 295 DO i = nxl, nxr 296 DO j = nys, nyn 297 DO k = nzb, nzt+1 298 ww_av(k,j,i) = ww_av(k,j,i) + ww(k,j,i) 299 ENDDO 300 ENDDO 301 ENDDO 302 ENDIF 303 304 CASE DEFAULT 305 CONTINUE 306 307 END SELECT 308 309 ELSEIF ( mode == 'average' ) THEN 310 311 SELECT CASE ( TRIM( variable ) ) 312 313 CASE ( 'ti' ) 314 IF ( ALLOCATED( ti_av ) ) THEN 315 DO i = nxl, nxr 316 DO j = nys, nyn 317 DO k = nzb, nzt+1 318 ti_av(k,j,i) = ti_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 319 ENDDO 320 ENDDO 321 ENDDO 322 ENDIF 323 324 CASE ( 'uu' ) 325 IF ( ALLOCATED( uu_av ) ) THEN 326 DO i = nxl, nxr 327 DO j = nys, nyn 328 DO k = nzb, nzt+1 329 uu_av(k,j,i) = uu_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 330 ENDDO 331 ENDDO 332 ENDDO 333 ENDIF 334 335 CASE ( 'vv' ) 336 IF ( ALLOCATED( vv_av ) ) THEN 337 DO i = nxl, nxr 338 DO j = nys, nyn 339 DO k = nzb, nzt+1 340 vv_av(k,j,i) = vv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 341 ENDDO 342 ENDDO 343 ENDDO 344 ENDIF 345 346 CASE ( 'ww' ) 347 IF ( ALLOCATED( ww_av ) ) THEN 348 DO i = nxl, nxr 349 DO j = nys, nyn 350 DO k = nzb, nzt+1 351 ww_av(k,j,i) = ww_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 352 ENDDO 353 ENDDO 354 ENDDO 355 ENDIF 356 357 END SELECT 358 359 ENDIF 360 361 362 END SUBROUTINE doq_3d_data_averaging 363 364 !------------------------------------------------------------------------------! 365 ! Description: 366 ! ------------ 367 !> Check data output for diagnostic output 368 !------------------------------------------------------------------------------! 369 SUBROUTINE doq_check_data_output( var, unit ) 156 370 157 371 IMPLICIT NONE 372 373 CHARACTER (LEN=*) :: unit !< 374 CHARACTER (LEN=*) :: var !< 375 376 SELECT CASE ( TRIM( var ) ) 377 378 CASE ( 'ti' ) 379 unit = '1/s' 380 381 CASE ( 'uu' ) 382 unit = 'm2/s2' 383 384 CASE ( 'vv' ) 385 unit = 'm2/s2' 386 387 CASE ( 'ww' ) 388 unit = 'm2/s2' 389 390 CASE DEFAULT 391 unit = 'illegal' 392 393 END SELECT 394 395 396 END SUBROUTINE doq_check_data_output 397 398 !------------------------------------------------------------------------------! 399 ! 400 ! Description: 401 ! ------------ 402 !> Subroutine defining appropriate grid for netcdf variables. 403 !------------------------------------------------------------------------------! 404 SUBROUTINE doq_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) 405 406 IMPLICIT NONE 407 408 CHARACTER (LEN=*), INTENT(IN) :: variable !< 409 LOGICAL, INTENT(OUT) :: found !< 410 CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< 411 CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< 412 CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< 413 414 found = .TRUE. 415 416 SELECT CASE ( TRIM( variable ) ) 417 ! 418 !-- s grid 419 CASE ( 'ti', 'ti_xy', 'ti_xz', 'ti_yz' ) 420 421 grid_x = 'x' 422 grid_y = 'y' 423 grid_z = 'zu' 424 ! 425 !-- u grid 426 CASE ( 'uu', 'uu_xy', 'uu_xz', 'uu_yz' ) 427 428 grid_x = 'xu' 429 grid_y = 'y' 430 grid_z = 'zu' 431 ! 432 !-- v grid 433 CASE ( 'vv', 'vv_xy', 'vv_xz', 'vv_yz' ) 434 435 grid_x = 'x' 436 grid_y = 'yv' 437 grid_z = 'zu' 438 ! 439 !-- w grid 440 CASE ( 'ww', 'ww_xy', 'ww_xz', 'ww_yz' ) 441 442 grid_x = 'x' 443 grid_y = 'y' 444 grid_z = 'zw' 445 446 CASE DEFAULT 447 found = .FALSE. 448 grid_x = 'none' 449 grid_y = 'none' 450 grid_z = 'none' 451 452 END SELECT 453 454 455 END SUBROUTINE doq_define_netcdf_grid 456 457 !------------------------------------------------------------------------------! 458 ! 459 ! Description: 460 ! ------------ 461 !> Subroutine defining 2D output variables 462 !------------------------------------------------------------------------------! 463 SUBROUTINE doq_output_2d( av, variable, found, grid, & 464 mode, local_pf, two_d, nzb_do, nzt_do, fill_value ) 465 466 467 IMPLICIT NONE 468 469 CHARACTER (LEN=*) :: grid !< 470 CHARACTER (LEN=*) :: mode !< 471 CHARACTER (LEN=*) :: variable !< 472 473 INTEGER(iwp) :: av !< value indicating averaged or non-averaged output 474 INTEGER(iwp) :: flag_nr !< number of the topography flag (0: scalar, 1: u, 2: v, 3: w) 475 INTEGER(iwp) :: i !< grid index x-direction 476 INTEGER(iwp) :: j !< grid index y-direction 477 INTEGER(iwp) :: k !< grid index z-direction 478 INTEGER(iwp) :: nzb_do !< 479 INTEGER(iwp) :: nzt_do !< 480 481 LOGICAL :: found !< true if variable is in list 482 LOGICAL :: resorted !< true if array is resorted 483 LOGICAL :: two_d !< flag parameter that indicates 2D variables (horizontal cross sections) 484 485 REAL(wp) :: fill_value !< value for the _FillValue attribute 486 487 REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< 488 REAL(wp), DIMENSION(:,:,:), POINTER :: to_be_resorted !< points to array which needs to be resorted for output 489 490 flag_nr = 0 491 found = .TRUE. 492 resorted = .FALSE. 493 two_d = .FALSE. 494 495 SELECT CASE ( TRIM( variable ) ) 496 497 CASE ( 'ti_xy', 'ti_xz', 'ti_yz' ) 498 IF ( av == 0 ) THEN 499 to_be_resorted => ti 500 ELSE 501 IF ( .NOT. ALLOCATED( ti_av ) ) THEN 502 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 503 ti_av = REAL( fill_value, KIND = wp ) 504 ENDIF 505 to_be_resorted => ti_av 506 ENDIF 507 flag_nr = 0 508 509 IF ( mode == 'xy' ) grid = 'zu' 510 511 CASE ( 'uu_xy', 'uu_xz', 'uu_yz' ) 512 IF ( av == 0 ) THEN 513 to_be_resorted => uu 514 ELSE 515 IF ( .NOT. ALLOCATED( uu_av ) ) THEN 516 ALLOCATE( uu_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 517 uu_av = REAL( fill_value, KIND = wp ) 518 ENDIF 519 to_be_resorted => uu_av 520 ENDIF 521 flag_nr = 1 522 523 IF ( mode == 'xy' ) grid = 'zu' 524 525 CASE ( 'vv_xy', 'vv_xz', 'vv_yz' ) 526 IF ( av == 0 ) THEN 527 to_be_resorted => vv 528 ELSE 529 IF ( .NOT. ALLOCATED( vv_av ) ) THEN 530 ALLOCATE( vv_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 531 vv_av = REAL( fill_value, KIND = wp ) 532 ENDIF 533 to_be_resorted => vv_av 534 ENDIF 535 flag_nr = 2 536 537 IF ( mode == 'xy' ) grid = 'zu' 538 539 CASE ( 'ww_xy', 'ww_xz', 'ww_yz' ) 540 IF ( av == 0 ) THEN 541 to_be_resorted => ww 542 ELSE 543 IF ( .NOT. ALLOCATED( ww_av ) ) THEN 544 ALLOCATE( ww_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 545 ww_av = REAL( fill_value, KIND = wp ) 546 ENDIF 547 to_be_resorted => ww_av 548 ENDIF 549 flag_nr = 3 550 551 IF ( mode == 'xy' ) grid = 'zw' 552 553 CASE DEFAULT 554 found = .FALSE. 555 grid = 'none' 556 557 END SELECT 558 559 IF ( found .AND. .NOT. resorted ) THEN 560 DO i = nxl, nxr 561 DO j = nys, nyn 562 DO k = nzb_do, nzt_do 563 local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), & 564 REAL( fill_value, KIND = wp ), & 565 BTEST( wall_flags_0(k,j,i), flag_nr ) ) 566 ENDDO 567 ENDDO 568 ENDDO 569 ENDIF 570 571 END SUBROUTINE doq_output_2d 572 573 574 !------------------------------------------------------------------------------! 575 ! 576 ! Description: 577 ! ------------ 578 !> Subroutine defining 3D output variables 579 !------------------------------------------------------------------------------! 580 SUBROUTINE doq_output_3d( av, variable, found, local_pf, fill_value, nzb_do, & 581 nzt_do ) 582 583 IMPLICIT NONE 584 585 CHARACTER (LEN=*) :: variable !< 586 587 INTEGER(iwp) :: av !< index indicating averaged or instantaneous output 588 INTEGER(iwp) :: flag_nr !< number of the topography flag (0: scalar, 1: u, 2: v, 3: w) 589 INTEGER(iwp) :: i !< index variable along x-direction 590 INTEGER(iwp) :: j !< index variable along y-direction 591 INTEGER(iwp) :: k !< index variable along z-direction 592 INTEGER(iwp) :: nzb_do !< lower limit of the data output (usually 0) 593 INTEGER(iwp) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) 594 595 LOGICAL :: found !< true if variable is in list 596 LOGICAL :: resorted !< true if array is resorted 597 598 REAL(wp) :: fill_value !< value for the _FillValue attribute 599 600 REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< 601 REAL(wp), DIMENSION(:,:,:), POINTER :: to_be_resorted !< points to array which needs to be resorted for output 602 603 flag_nr = 0 604 found = .TRUE. 605 resorted = .FALSE. 606 607 SELECT CASE ( TRIM( variable ) ) 608 609 CASE ( 'ti' ) 610 IF ( av == 0 ) THEN 611 to_be_resorted => ti 612 ELSE 613 IF ( .NOT. ALLOCATED( ti_av ) ) THEN 614 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 615 ti_av = REAL( fill_value, KIND = wp ) 616 ENDIF 617 to_be_resorted => ti_av 618 ENDIF 619 flag_nr = 0 620 621 CASE ( 'uu' ) 622 IF ( av == 0 ) THEN 623 to_be_resorted => uu 624 ELSE 625 IF ( .NOT. ALLOCATED( uu_av ) ) THEN 626 ALLOCATE( uu_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 627 uu_av = REAL( fill_value, KIND = wp ) 628 ENDIF 629 to_be_resorted => uu_av 630 ENDIF 631 flag_nr = 1 632 633 CASE ( 'vv' ) 634 IF ( av == 0 ) THEN 635 to_be_resorted => vv 636 ELSE 637 IF ( .NOT. ALLOCATED( vv_av ) ) THEN 638 ALLOCATE( vv_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 639 vv_av = REAL( fill_value, KIND = wp ) 640 ENDIF 641 to_be_resorted => vv_av 642 ENDIF 643 flag_nr = 2 644 645 CASE ( 'ww' ) 646 IF ( av == 0 ) THEN 647 to_be_resorted => ww 648 ELSE 649 IF ( .NOT. ALLOCATED( ww_av ) ) THEN 650 ALLOCATE( ww_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 651 ww_av = REAL( fill_value, KIND = wp ) 652 ENDIF 653 to_be_resorted => ww_av 654 ENDIF 655 flag_nr = 3 656 657 CASE DEFAULT 658 found = .FALSE. 659 660 END SELECT 661 662 IF ( found .AND. .NOT. resorted ) THEN 663 DO i = nxl, nxr 664 DO j = nys, nyn 665 DO k = nzb_do, nzt_do 666 local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), & 667 REAL( fill_value, KIND = wp ), & 668 BTEST( wall_flags_0(k,j,i), flag_nr ) ) 669 ENDDO 670 ENDDO 671 ENDDO 672 ENDIF 673 674 END SUBROUTINE doq_output_3d 675 676 ! Description: 677 ! ------------ 678 !> Resorts the user-defined output quantity with indices (k,j,i) to a 679 !> temporary array with indices (i,j,k) for masked data output. 680 !------------------------------------------------------------------------------! 681 SUBROUTINE doq_output_mask( av, variable, found, local_pf ) 682 683 USE control_parameters 684 685 USE indices 686 687 USE surface_mod, & 688 ONLY: get_topography_top_index_ji 689 690 IMPLICIT NONE 691 692 CHARACTER (LEN=*) :: variable !< 693 CHARACTER (LEN=5) :: grid !< flag to distinquish between staggered grids 694 695 INTEGER(iwp) :: av !< index indicating averaged or instantaneous output 696 INTEGER(iwp) :: flag_nr !< number of the topography flag (0: scalar, 1: u, 2: v, 3: w) 697 INTEGER(iwp) :: i !< index variable along x-direction 698 INTEGER(iwp) :: j !< index variable along y-direction 699 INTEGER(iwp) :: k !< index variable along z-direction 700 INTEGER(iwp) :: topo_top_ind !< k index of highest horizontal surface 701 702 LOGICAL :: found !< true if variable is in list 703 LOGICAL :: resorted !< true if array is resorted 704 705 REAL(wp), & 706 DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) :: & 707 local_pf !< 708 REAL(wp), DIMENSION(:,:,:), POINTER :: to_be_resorted !< points to array which needs to be resorted for output 709 710 flag_nr = 0 711 found = .TRUE. 712 resorted = .FALSE. 713 grid = 's' 714 715 SELECT CASE ( TRIM( variable ) ) 716 717 CASE ( 'ti' ) 718 IF ( av == 0 ) THEN 719 to_be_resorted => ti 720 ELSE 721 to_be_resorted => ti_av 722 ENDIF 723 grid = 's' 724 flag_nr = 0 725 726 CASE ( 'uu' ) 727 IF ( av == 0 ) THEN 728 to_be_resorted => uu 729 ELSE 730 to_be_resorted => uu_av 731 ENDIF 732 grid = 'u' 733 flag_nr = 1 734 735 CASE ( 'vv' ) 736 IF ( av == 0 ) THEN 737 to_be_resorted => vv 738 ELSE 739 to_be_resorted => vv_av 740 ENDIF 741 grid = 'v' 742 flag_nr = 2 743 744 CASE ( 'ww' ) 745 IF ( av == 0 ) THEN 746 to_be_resorted => ww 747 ELSE 748 to_be_resorted => ww_av 749 ENDIF 750 grid = 'w' 751 flag_nr = 3 752 753 754 CASE DEFAULT 755 found = .FALSE. 756 757 END SELECT 758 759 IF ( found .AND. .NOT. resorted ) THEN 760 IF ( .NOT. mask_surface(mid) ) THEN 761 ! 762 !-- Default masked output 763 DO i = 1, mask_size_l(mid,1) 764 DO j = 1, mask_size_l(mid,2) 765 DO k = 1, mask_size_l(mid,3) 766 local_pf(i,j,k) = to_be_resorted(mask_k(mid,k), & 767 mask_j(mid,j), & 768 mask_i(mid,i)) 769 ENDDO 770 ENDDO 771 ENDDO 772 773 ELSE 774 ! 775 !-- Terrain-following masked output 776 DO i = 1, mask_size_l(mid,1) 777 DO j = 1, mask_size_l(mid,2) 778 ! 779 !-- Get k index of highest horizontal surface 780 topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), & 781 mask_i(mid,i), & 782 grid ) 783 ! 784 !-- Save output array 785 DO k = 1, mask_size_l(mid,3) 786 local_pf(i,j,k) = to_be_resorted( & 787 MIN( topo_top_ind+mask_k(mid,k), & 788 nzt+1 ), & 789 mask_j(mid,j), & 790 mask_i(mid,i) ) 791 ENDDO 792 ENDDO 793 ENDDO 794 795 ENDIF 796 ENDIF 797 798 END SUBROUTINE doq_output_mask 799 800 !------------------------------------------------------------------------------! 801 ! Description: 802 ! ------------ 803 !> Allocate required arrays 804 !------------------------------------------------------------------------------! 805 SUBROUTINE doq_init 806 807 IMPLICIT NONE 808 809 INTEGER(iwp) :: ivar !< loop index over all 2d/3d/mask output quantities 158 810 ! 159 811 !-- Next line is to avoid compiler warnings about unused variables … … 161 813 162 814 initialized_diagnostic_output_quantities = .FALSE. 163 164 IF ( .NOT. ALLOCATED( ti ) ) THEN 165 ALLOCATE( ti(nzb:nzt+1,nys:nyn,nxl:nxr) ) 166 ti = 0.0_wp 167 ENDIF 815 816 ivar = 1 817 818 DO WHILE ( ivar <= SIZE( do_all ) ) 819 820 SELECT CASE ( TRIM( do_all(ivar) ) ) 821 ! 822 !-- Allocate array for 'turbulence intensity' 823 CASE ( 'ti' ) 824 IF ( .NOT. ALLOCATED( ti ) ) THEN 825 ALLOCATE( ti(nzb:nzt+1,nys:nyn,nxl:nxr) ) 826 ti = 0.0_wp 827 ENDIF 828 ! 829 !-- Allocate array for uu 830 CASE ( 'uu' ) 831 IF ( .NOT. ALLOCATED( uu ) ) THEN 832 ALLOCATE( uu(nzb:nzt+1,nys:nyn,nxl:nxr) ) 833 uu = 0.0_wp 834 ENDIF 835 836 ! 837 !-- Allocate array for vv 838 CASE ( 'vv' ) 839 IF ( .NOT. ALLOCATED( vv ) ) THEN 840 ALLOCATE( vv(nzb:nzt+1,nys:nyn,nxl:nxr) ) 841 vv = 0.0_wp 842 ENDIF 843 844 ! 845 !-- Allocate array for ww 846 CASE ( 'ww' ) 847 IF ( .NOT. ALLOCATED( ww ) ) THEN 848 ALLOCATE( ww(nzb:nzt+1,nys:nyn,nxl:nxr) ) 849 ww = 0.0_wp 850 ENDIF 851 852 END SELECT 853 854 ivar = ivar + 1 855 ENDDO 168 856 169 857 initialized_diagnostic_output_quantities = .TRUE. 170 171 END SUBROUTINE d iagnostic_output_quantities_init858 859 END SUBROUTINE doq_init 172 860 173 861 … … 175 863 ! Description: 176 864 ! ------------ 177 !> ...865 !> Calculate diagnostic quantities 178 866 !--------------------------------------------------------------------------------------------------! 179 SUBROUTINE diagnostic_output_quantities_calculate 180 181 182 USE arrays_3d, & 183 ONLY: ddzu, u, v, w 184 185 USE grid_variables, & 186 ONLY: ddx, ddy 187 188 USE indices, & 189 ONLY: nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0 867 SUBROUTINE doq_calculate 190 868 191 869 IMPLICIT NONE 192 870 193 871 INTEGER(iwp) :: i, j, k !< grid loop index in x-, y-, z-direction 194 INTEGER(iwp) :: ivar _all!< loop index over all 2d/3d/mask output quantities872 INTEGER(iwp) :: ivar !< loop index over all 2d/3d/mask output quantities 195 873 196 874 … … 198 876 ! 199 877 !-- Preparatory steps and initialization of output arrays 200 IF ( .NOT. prepared_diagnostic_output_quantities ) CALL d iagnostic_output_quantities_prepare201 IF ( .NOT. initialized_diagnostic_output_quantities ) CALL d iagnostic_output_quantities_init202 ! 203 !-- Save timestep number to check in time_integration if d iagnostic_output_quantities_calculate878 IF ( .NOT. prepared_diagnostic_output_quantities ) CALL doq_prepare 879 IF ( .NOT. initialized_diagnostic_output_quantities ) CALL doq_init 880 ! 881 !-- Save timestep number to check in time_integration if doq_calculate 204 882 !-- has been called already, since the CALL occurs at two locations, but the calculations need to be 205 883 !-- done only once per timestep. 206 884 timestep_number_at_prev_calc = current_timestep_number 207 885 208 209 ivar_all = 1 210 211 DO WHILE ( do_all(ivar_all)(1:1) /= ' ' ) 212 213 SELECT CASE ( TRIM( do_all(ivar_all) ) ) 886 ivar = 1 887 888 DO WHILE ( ivar <= SIZE( do_all ) ) 889 890 SELECT CASE ( TRIM( do_all(ivar) ) ) 214 891 ! 215 892 !-- Calculate 'turbulence intensity' from rot[(u,v,w)] at scalar grid point … … 218 895 DO j = nys, nyn 219 896 DO k = nzb+1, nzt 220 221 ti(k,j,i) = 0.25_wp * SQRT( & 222 ( ( w(k,j+1,i) + w(k-1,j+1,i) & 223 - w(k,j-1,i) - w(k-1,j-1,i) ) * ddy & 224 - ( v(k+1,j,i) + v(k+1,j+1,i) & 225 - v(k-1,j,i) - v(k-1,j+1,i) ) * ddzu(k) )**2 & 226 + ( ( u(k+1,j,i) + u(k+1,j,i+1) & 227 - u(k-1,j,i) - u(k-1,j,i+1) ) * ddzu(k) & 228 - ( w(k,j,i+1) + w(k-1,j,i+1) & 229 - w(k,j,i-1) - w(k-1,j,i-1) ) * ddx )**2 & 230 + ( ( v(k,j,i+1) + v(k,j+1,i+1) & 231 - v(k,j,i-1) - v(k,j+1,i-1) ) * ddx & 232 - ( u(k,j+1,i) + u(k,j+1,i+1) & 233 - u(k,j-1,i) - u(k,j-1,i+1) ) * ddy )**2 ) & 234 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0) ) 897 ti(k,j,i) = 0.25_wp * SQRT( & 898 ( ( w(k,j+1,i) + w(k-1,j+1,i) & 899 - w(k,j-1,i) - w(k-1,j-1,i) ) * ddy & 900 - ( v(k+1,j,i) + v(k+1,j+1,i) & 901 - v(k-1,j,i) - v(k-1,j+1,i) ) * ddzu(k) )**2 & 902 + ( ( u(k+1,j,i) + u(k+1,j,i+1) & 903 - u(k-1,j,i) - u(k-1,j,i+1) ) * ddzu(k) & 904 - ( w(k,j,i+1) + w(k-1,j,i+1) & 905 - w(k,j,i-1) - w(k-1,j,i-1) ) * ddx )**2 & 906 + ( ( v(k,j,i+1) + v(k,j+1,i+1) & 907 - v(k,j,i-1) - v(k,j+1,i-1) ) * ddx & 908 - ( u(k,j+1,i) + u(k,j+1,i+1) & 909 - u(k,j-1,i) - u(k,j-1,i+1) ) * ddy )**2 ) & 910 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0) ) 235 911 ENDDO 236 912 ENDDO 913 ENDDO 914 ! 915 !-- uu 916 CASE ( 'uu' ) 917 DO i = nxl, nxr 918 DO j = nys, nyn 919 DO k = nzb+1, nzt 920 uu(k,j,i) = u(k,j,i) * u(k,j,i) & 921 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 1) ) 922 ENDDO 923 ENDDO 237 924 ENDDO 238 239 END SELECT 240 241 ivar_all = ivar_all + 1 925 ! 926 !-- vv 927 CASE ( 'vv' ) 928 DO i = nxl, nxr 929 DO j = nys, nyn 930 DO k = nzb+1, nzt 931 vv(k,j,i) = v(k,j,i) * v(k,j,i) & 932 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 2) ) 933 ENDDO 934 ENDDO 935 ENDDO 936 ! 937 !-- ww 938 CASE ( 'ww' ) 939 DO i = nxl, nxr 940 DO j = nys, nyn 941 DO k = nzb+1, nzt-1 942 ww(k,j,i) = w(k,j,i) * w(k,j,i) & 943 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 3) ) 944 ENDDO 945 ENDDO 946 ENDDO 947 948 END SELECT 949 950 ivar = ivar + 1 242 951 ENDDO 243 952 244 953 ! CALL cpu_log( log_point(41), 'calculate_quantities', 'stop' ) 245 954 246 END SUBROUTINE d iagnostic_output_quantities_calculate955 END SUBROUTINE doq_calculate 247 956 248 957 … … 252 961 !> ... 253 962 !------------------------------------------------------------------------------! 254 SUBROUTINE d iagnostic_output_quantities_prepare255 256 257 USE control_parameters, 963 SUBROUTINE doq_prepare 964 965 966 USE control_parameters, & 258 967 ONLY: do2d, do3d, domask, masks, mid 259 968 … … 268 977 INTEGER(iwp) :: l !< index for cutting string 269 978 270 271 979 prepared_diagnostic_output_quantities = .FALSE. 272 980 … … 280 988 do2d_var(av,ivar)(1:l-3) = do2d(av,ivar)(1:l-3) 281 989 ! 282 !-- Gather 2d output quantity names, check for double occurrence of output quantity 990 !-- Gather 2d output quantity names. 991 !-- Check for double occurrence of output quantity, e.g. by _xy, 992 !-- _yz, _xz. 283 993 DO WHILE ( do2d_var(av,ivar)(1:1) /= ' ' ) 284 994 IF ( .NOT. ANY( do_all == do2d_var(av,ivar) ) ) THEN … … 293 1003 ivar = 1 294 1004 ! 295 !-- Gather 3d output quantity names , check for double occurrence of output quantity1005 !-- Gather 3d output quantity names 296 1006 DO WHILE ( do3d(av,ivar)(1:1) /= ' ' ) 297 1007 do_all(ivar_all) = do3d(av,ivar) 298 299 1008 ivar = ivar + 1 300 1009 ivar_all = ivar_all + 1 … … 303 1012 ivar = 1 304 1013 ! 305 !-- Gather masked output quantity names, check for double occurrence of output quantity 1014 !-- Gather masked output quantity names. Also check for double output 1015 !-- e.g. by different masks. 306 1016 DO mid = 1, masks 307 1017 DO WHILE ( domask(mid,av,ivar)(1:1) /= ' ' ) 308 do_all(ivar_all) = domask(mid,av,ivar) 1018 IF ( .NOT. ANY( do_all == domask(mid,av,ivar) ) ) THEN 1019 do_all(ivar_all) = do2d_var(av,ivar) 1020 ENDIF 309 1021 310 1022 ivar = ivar + 1 … … 318 1030 prepared_diagnostic_output_quantities = .TRUE. 319 1031 320 END SUBROUTINE diagnostic_output_quantities_prepare 1032 END SUBROUTINE doq_prepare 1033 1034 !------------------------------------------------------------------------------! 1035 ! Description: 1036 ! ------------ 1037 !> Subroutine reads local (subdomain) restart data 1038 !> Note: With the current structure reading of non-standard array is not 1039 !> possible 1040 !------------------------------------------------------------------------------! 1041 ! SUBROUTINE doq_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & 1042 ! nxr_on_file, nynf, nync, nyn_on_file, nysf, & 1043 ! nysc, nys_on_file, tmp_3d_non_standard, found ) 1044 ! 1045 ! 1046 ! USE control_parameters 1047 ! 1048 ! USE indices 1049 ! 1050 ! USE kinds 1051 ! 1052 ! USE pegrid 1053 ! 1054 ! 1055 ! IMPLICIT NONE 1056 ! 1057 ! INTEGER(iwp) :: k !< 1058 ! INTEGER(iwp) :: nxlc !< 1059 ! INTEGER(iwp) :: nxlf !< 1060 ! INTEGER(iwp) :: nxl_on_file !< 1061 ! INTEGER(iwp) :: nxrc !< 1062 ! INTEGER(iwp) :: nxrf !< 1063 ! INTEGER(iwp) :: nxr_on_file !< 1064 ! INTEGER(iwp) :: nync !< 1065 ! INTEGER(iwp) :: nynf !< 1066 ! INTEGER(iwp) :: nyn_on_file !< 1067 ! INTEGER(iwp) :: nysc !< 1068 ! INTEGER(iwp) :: nysf !< 1069 ! INTEGER(iwp) :: nys_on_file !< 1070 ! 1071 ! LOGICAL, INTENT(OUT) :: found 1072 ! 1073 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d_non_standard !< temporary array for storing 3D data with non standard dimensions 1074 ! ! 1075 ! !-- If temporary non-standard array for reading is already allocated, 1076 ! !-- deallocate it. 1077 ! IF ( ALLOCATED( tmp_3d_non_standard ) ) DEALLOCATE( tmp_3d_non_standard ) 1078 ! 1079 ! found = .TRUE. 1080 ! 1081 ! SELECT CASE ( restart_string(1:length) ) 1082 ! 1083 ! CASE ( 'ti_av' ) 1084 ! IF ( .NOT. ALLOCATED( ti_av ) ) THEN 1085 ! ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1086 ! ENDIF 1087 ! IF ( k == 1 ) THEN 1088 ! ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1089 ! nxl_on_file:nxr_on_file) ) 1090 ! READ ( 13 ) tmp_3d_non_standard 1091 ! ENDIF 1092 ! ti_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1093 ! 1094 ! CASE ( 'uu_av' ) 1095 ! IF ( .NOT. ALLOCATED( uu_av ) ) THEN 1096 ! ALLOCATE( uu_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1097 ! ENDIF 1098 ! IF ( k == 1 ) THEN 1099 ! ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1100 ! nxl_on_file:nxr_on_file) ) 1101 ! READ ( 13 ) tmp_3d_non_standard 1102 ! ENDIF 1103 ! uu_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1104 ! 1105 ! CASE ( 'vv_av' ) 1106 ! IF ( .NOT. ALLOCATED( vv_av ) ) THEN 1107 ! ALLOCATE( vv_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1108 ! ENDIF 1109 ! IF ( k == 1 ) THEN 1110 ! ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1111 ! nxl_on_file:nxr_on_file) ) 1112 ! READ ( 13 ) tmp_3d_non_standard 1113 ! ENDIF 1114 ! vv_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1115 ! 1116 ! CASE ( 'ww_av' ) 1117 ! IF ( .NOT. ALLOCATED( ww_av ) ) THEN 1118 ! ALLOCATE( ww_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1119 ! ENDIF 1120 ! IF ( k == 1 ) THEN 1121 ! ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1122 ! nxl_on_file:nxr_on_file) ) 1123 ! READ ( 13 ) tmp_3d_non_standard 1124 ! ENDIF 1125 ! ww_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1126 ! 1127 ! 1128 ! CASE DEFAULT 1129 ! 1130 ! found = .FALSE. 1131 ! 1132 ! END SELECT 1133 ! 1134 ! END SUBROUTINE doq_rrd_local 1135 1136 !------------------------------------------------------------------------------! 1137 ! Description: 1138 ! ------------ 1139 !> Subroutine writes local (subdomain) restart data 1140 !------------------------------------------------------------------------------! 1141 SUBROUTINE doq_wrd_local 1142 1143 1144 IMPLICIT NONE 1145 1146 IF ( ALLOCATED( ti_av ) ) THEN 1147 CALL wrd_write_string( 'ti_av' ) 1148 WRITE ( 14 ) ti_av 1149 ENDIF 1150 1151 IF ( ALLOCATED( uu_av ) ) THEN 1152 CALL wrd_write_string( 'uu_av' ) 1153 WRITE ( 14 ) uu_av 1154 ENDIF 1155 1156 IF ( ALLOCATED( vv_av ) ) THEN 1157 CALL wrd_write_string( 'vv_av' ) 1158 WRITE ( 14 ) vv_av 1159 ENDIF 1160 1161 IF ( ALLOCATED( ww_av ) ) THEN 1162 CALL wrd_write_string( 'ww_av' ) 1163 WRITE ( 14 ) ww_av 1164 ENDIF 1165 1166 1167 END SUBROUTINE doq_wrd_local 1168 1169 321 1170 322 1171 END MODULE diagnostic_output_quantities_mod -
palm/trunk/SOURCE/flow_statistics.f90
r3828 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Correct conversion to kinematic scalar fluxes in case of pw-scheme and 28 ! statistic regions 29 ! 30 ! 3828 2019-03-27 19:36:23Z raasch 27 31 ! unused variables removed 28 32 ! … … 1497 1501 vpt(k+1,j,i) - hom(k+1,1,44,sr) ) 1498 1502 sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) * & 1503 rho_air_zw(k) * & 1499 1504 heatflux_output_conversion(k) * & 1500 1505 rmask(j,i,sr) * flag … … 1509 1514 hom(k+1,1,42,sr) ) 1510 1515 sums_l(k,52,tn) = sums_l(k,52,tn) + pts * w(k,j,i) * & 1516 rho_air_zw(k) * & 1511 1517 waterflux_output_conversion(k) * & 1512 1518 rmask(j,i,sr) * & … … 1538 1544 vpt(k+1,j,i) - hom(k+1,1,44,sr) ) 1539 1545 sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) * & 1546 rho_air_zw(k) * & 1540 1547 heatflux_output_conversion(k) * & 1541 1548 rmask(j,i,sr) * & … … 1685 1692 ( pt(k,j,i) - hom(k,1,4,sr) + & 1686 1693 pt(k+1,j,i) - hom(k+1,1,4,sr) ) & 1694 * rho_air_zw(k) & 1687 1695 * heatflux_output_conversion(k) & 1688 1696 * w(k,j,i) * rmask(j,i,sr) * flag … … 1691 1699 q(k+1,j,i) - hom(k+1,1,41,sr) ) 1692 1700 sums_l(k,49,tn) = sums_l(k,49,tn) + pts * w(k,j,i) * & 1701 rho_air_zw(k) * & 1693 1702 waterflux_output_conversion(k) * & 1694 1703 rmask(j,i,sr) * flag -
palm/trunk/SOURCE/module_interface.f90
r4028 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Introduce diagnostic output 28 ! 29 ! 4028 2019-06-13 12:21:37Z schwenkel 27 30 ! Further modularization of particle code components 28 31 ! … … 210 213 chem_rrd_local, & 211 214 chem_wrd_local 215 216 USE diagnostic_output_quantities_mod, & 217 ONLY: doq_3d_data_averaging, & 218 doq_check_data_output, & 219 doq_define_netcdf_grid, & 220 doq_output_2d, & 221 doq_output_3d, & 222 doq_wrd_local 223 ! doq_rrd_local, & 212 224 213 225 USE flight_mod, & … … 751 763 CALL chem_check_data_output( variable, unit, i, ilen, k ) 752 764 ENDIF 765 766 IF ( unit == 'illegal' ) THEN 767 CALL doq_check_data_output( variable, unit ) 768 ENDIF 753 769 754 770 IF ( unit == 'illegal' .AND. gust_module_enabled ) THEN … … 1179 1195 IF ( bulk_cloud_model ) CALL bcm_3d_data_averaging( mode, variable ) 1180 1196 IF ( air_chemistry ) CALL chem_3d_data_averaging( mode, variable ) 1197 CALL doq_3d_data_averaging( mode, variable ) 1181 1198 IF ( gust_module_enabled ) CALL gust_3d_data_averaging( mode, variable ) 1182 1199 IF ( land_surface ) CALL lsm_3d_data_averaging( mode, variable ) … … 1234 1251 ) 1235 1252 ENDIF 1253 1254 IF ( .NOT. found ) THEN 1255 CALL doq_output_2d( & 1256 av, variable, found, grid, mode, local_pf, two_d, & 1257 nzb_do, nzt_do, fill_value ) 1258 ENDIF 1236 1259 1237 1260 IF ( .NOT. found .AND. gust_module_enabled ) THEN … … 1314 1337 resorted = .TRUE. 1315 1338 ENDIF 1316 1339 1340 IF ( .NOT. found ) THEN 1341 CALL doq_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) 1342 resorted = .TRUE. 1343 ENDIF 1344 1317 1345 IF ( .NOT. found .AND. gust_module_enabled ) THEN 1318 1346 CALL gust_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do ) … … 1466 1494 LOGICAL, INTENT(INOUT) :: found !< flag if variable was found 1467 1495 1468 REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), INTENT(OUT) :: tmp_2d !< 1469 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 !< 1496 REAL(wp), & 1497 DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), & 1498 INTENT(OUT) :: tmp_2d !< 1499 REAL(wp), & 1500 DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), & 1501 INTENT(OUT) :: tmp_3d !< 1470 1502 1471 1503 1472 1504 IF ( debug_output ) CALL debug_message( 'module-specific read local restart data', 'start' ) 1473 1505 1474 IF ( .NOT. found ) CALL bio_rrd_local(&1506 IF ( .NOT. found ) CALL bio_rrd_local( & 1475 1507 found & 1476 1508 ) 1477 1509 1478 IF ( .NOT. found ) CALL bcm_rrd_local(&1510 IF ( .NOT. found ) CALL bcm_rrd_local( & 1479 1511 map_index, & 1480 1512 nxlf, nxlc, nxl_on_file, & … … 1485 1517 ) ! ToDo: change interface to pass variable 1486 1518 1487 IF ( .NOT. found ) CALL chem_rrd_local(&1519 IF ( .NOT. found ) CALL chem_rrd_local( & 1488 1520 map_index, & 1489 1521 nxlf, nxlc, nxl_on_file, & … … 1493 1525 tmp_3d, found & 1494 1526 ) ! ToDo: change interface to pass variable 1495 1496 IF ( .NOT. found ) CALL gust_rrd_local( & 1527 1528 ! IF ( .NOT. found ) CALL doq_rrd_local( & 1529 ! map_index, & 1530 ! nxlf, nxlc, nxl_on_file, & 1531 ! nxrf, nxrc, nxr_on_file, & 1532 ! nynf, nync, nyn_on_file, & 1533 ! nysf, nysc, nys_on_file, & 1534 ! tmp_3d_non_standard, found & 1535 ! ) ! ToDo: change interface to pass variable CALL doq_wrd_local 1536 1537 IF ( .NOT. found ) CALL gust_rrd_local( & 1497 1538 map_index, & 1498 1539 nxlf, nxlc, nxl_on_file, & … … 1503 1544 ) ! ToDo: change interface to pass variable 1504 1545 1505 IF ( .NOT. found ) CALL lpm_rrd_local(&1546 IF ( .NOT. found ) CALL lpm_rrd_local( & 1506 1547 map_index, & 1507 1548 nxlf, nxlc, nxl_on_file, & … … 1512 1553 ) ! ToDo: change interface to pass variable 1513 1554 1514 IF ( .NOT. found ) CALL lsm_rrd_local(&1555 IF ( .NOT. found ) CALL lsm_rrd_local( & 1515 1556 map_index, & 1516 1557 nxlf, nxlc, nxl_on_file, & … … 1521 1562 ) ! ToDo: change interface to pass variable 1522 1563 1523 IF ( .NOT. found ) CALL ocean_rrd_local(&1564 IF ( .NOT. found ) CALL ocean_rrd_local( & 1524 1565 map_index, & 1525 1566 nxlf, nxlc, nxl_on_file, & … … 1530 1571 ) ! ToDo: change interface to pass variable 1531 1572 1532 IF ( .NOT. found ) CALL radiation_rrd_local(&1573 IF ( .NOT. found ) CALL radiation_rrd_local( & 1533 1574 map_index, & 1534 1575 nxlf, nxlc, nxl_on_file, & … … 1539 1580 ) ! ToDo: change interface to pass variable 1540 1581 1541 IF ( .NOT. found ) CALL salsa_rrd_local(&1582 IF ( .NOT. found ) CALL salsa_rrd_local( & 1542 1583 map_index, & 1543 1584 nxlf, nxlc, nxl_on_file, & … … 1548 1589 ) ! ToDo: change interface to pass variable 1549 1590 1550 IF ( .NOT. found ) CALL usm_rrd_local(&1591 IF ( .NOT. found ) CALL usm_rrd_local( & 1551 1592 map_index, & 1552 1593 nxlf, nxlc, nxl_on_file, & … … 1558 1599 ! 1559 1600 !-- Surface data do not need overlap data, so do not pass these information. 1560 IF ( .NOT. found ) CALL surface_data_output_rrd_local( found )1601 IF ( .NOT. found ) CALL surface_data_output_rrd_local( found ) 1561 1602 1562 IF ( .NOT. found ) CALL user_rrd_local(&1603 IF ( .NOT. found ) CALL user_rrd_local( & 1563 1604 map_index, & 1564 1605 nxlf, nxlc, nxl_on_file, & … … 1588 1629 IF ( bulk_cloud_model ) CALL bcm_wrd_local 1589 1630 IF ( air_chemistry ) CALL chem_wrd_local 1631 CALL doq_wrd_local 1590 1632 IF ( gust_module_enabled ) CALL gust_wrd_local 1591 1633 IF ( particle_advection ) CALL lpm_wrd_local -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r4029 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Rename subroutines in module for diagnostic quantities 28 ! 29 ! 4029 2019-06-14 14:04:35Z raasch 27 30 ! netcdf variable NF90_NOFILL is used as argument instead of "1" in calls to NF90_DEF_VAR_FILL 28 31 ! … … 698 701 skip_time_do3d, topography, num_leg, num_var_fl, & 699 702 urban_surface 703 704 USE diagnostic_output_quantities_mod, & 705 ONLY: doq_define_netcdf_grid 700 706 701 707 USE grid_variables, & … … 1124 1130 CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', & 1125 1131 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 1126 's', 'theta', 'thetal', 'thetav' , 'ti')1132 's', 'theta', 'thetal', 'thetav' ) 1127 1133 1128 1134 grid_x = 'x' … … 1169 1175 ENDIF 1170 1176 1177 IF ( .NOT. found ) & 1178 CALL doq_define_netcdf_grid( domask(mid,av,i), found, & 1179 grid_x, grid_y, grid_z ) 1180 1171 1181 IF ( .NOT. found .AND. gust_module_enabled ) THEN 1172 1182 CALL gust_define_netcdf_grid( domask(mid,av,i), found, & … … 1870 1880 CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', & 1871 1881 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 1872 's', 'theta', 'thetal', 'thetav' , 'ti')1882 's', 'theta', 'thetal', 'thetav' ) 1873 1883 1874 1884 grid_x = 'x' … … 1974 1984 grid_y, grid_z ) 1975 1985 ENDIF 1986 1987 IF ( .NOT. found ) & 1988 CALL doq_define_netcdf_grid( do3d(av,i), found, grid_x, & 1989 grid_y, grid_z ) 1976 1990 1977 1991 IF ( .NOT. found ) THEN … … 2858 2872 'ql_vp_xy', 'qr_xy', 'qv_xy', & 2859 2873 's_xy', & 2860 'theta_xy', 'thetal_xy', 'thetav_xy' , 'ti_xy')2874 'theta_xy', 'thetal_xy', 'thetav_xy' ) 2861 2875 2862 2876 grid_x = 'x' … … 2944 2958 grid_z ) 2945 2959 ENDIF 2946 2947 2960 2961 IF ( .NOT. found ) & 2962 CALL doq_define_netcdf_grid( & 2963 do2d(av,i), found, grid_x, & 2964 grid_y, grid_z ) 2948 2965 ! 2949 2966 !-- Check for user-defined quantities … … 3762 3779 'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz', & 3763 3780 'qv_xz', 's_xz', & 3764 'theta_xz', 'thetal_xz', 'thetav_xz' , 'ti_xz')3781 'theta_xz', 'thetal_xz', 'thetav_xz' ) 3765 3782 3766 3783 grid_x = 'x' … … 3837 3854 grid_z ) 3838 3855 ENDIF 3856 3857 IF ( .NOT. found ) & 3858 CALL doq_define_netcdf_grid( do2d(av,i), found, & 3859 grid_x, grid_y, grid_z ) 3839 3860 3840 3861 ! … … 4695 4716 grid_z ) 4696 4717 ENDIF 4718 4719 IF ( .NOT. found ) & 4720 CALL doq_define_netcdf_grid( & 4721 do2d(av,i), found, grid_x, & 4722 grid_y, grid_z ) 4697 4723 ! 4698 4724 !-- Check for user-defined quantities … … 6000 6026 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 6001 6027 'rho_sea_water', 's', 'sa', & 6002 'theta', 'thetal', 'thetav', ' ti', 'u', 'v' )6028 'theta', 'thetal', 'thetav', 'u', 'v' ) 6003 6029 6004 6030 grid_z = 'zu' -
palm/trunk/SOURCE/palm.f90
r4017 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Rename subroutines in module for diagnostic quantities 28 ! 29 ! 4017 2019-06-06 12:16:46Z schwenkel 27 30 ! new module for calculation and output of diagnostic quantities added 28 31 ! … … 305 308 306 309 USE diagnostic_output_quantities_mod, & 307 ONLY: d iagnostic_output_quantities_calculate310 ONLY: doq_calculate 308 311 309 312 USE indices, & … … 559 562 !-- If required, output of initial arrays 560 563 IF ( do2d_at_begin ) THEN 561 CALL d iagnostic_output_quantities_calculate !TODO, will be called twice564 CALL doq_calculate !TODO, will be called twice 562 565 563 566 CALL data_output_2d( 'xy', 0 ) … … 567 570 568 571 IF ( do3d_at_begin ) THEN 569 CALL d iagnostic_output_quantities_calculate !TODO, will be called twice572 CALL doq_calculate !TODO, will be called twice 570 573 571 574 CALL data_output_3d( 0 ) -
palm/trunk/SOURCE/radiation_model_mod.f90
r4008 r4039 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Bugfix for masked data output 31 ! 32 ! 4008 2019-05-30 09:50:11Z moh.hefny 30 33 ! Bugfix in check variable when a variable's string is less than 3 31 34 ! characters is processed. All variables now are checked if they … … 11197 11200 ! 11198 11201 !-- Resort the array to be output, if not done above 11199 IF ( .NOT. resorted ) THEN11202 IF ( found .AND. .NOT. resorted ) THEN 11200 11203 IF ( .NOT. mask_surface(mid) ) THEN 11201 11204 ! -
palm/trunk/SOURCE/read_restart_data_mod.f90
r4017 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! input of uu_av, vv_av, ww_av added 28 ! 29 ! 4017 2019-06-06 12:16:46Z schwenkel 27 30 ! bugfix for r3998, allocation of 3d temporary arrays of various dimensions revised 28 31 ! … … 111 114 !> 112 115 !> @todo: Revise max_pr_cs (profiles for chemistry) 116 !> @todo: Modularize reading of restart data for diagnostic quantities, which 117 !> is not possible with the current module-interface structure 113 118 !------------------------------------------------------------------------------! 114 119 MODULE read_restart_data_mod … … 135 140 136 141 USE diagnostic_output_quantities_mod, & 137 ONLY: ti_av 142 ONLY: ti_av, uu_av, vv_av, ww_av 138 143 139 144 USE grid_variables, & … … 1553 1558 u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1554 1559 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1560 1561 CASE ( 'uu_av' ) 1562 IF ( .NOT. ALLOCATED( uu_av ) ) THEN 1563 ALLOCATE( uu_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1564 ENDIF 1565 IF ( k == 1 ) THEN 1566 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1567 nxl_on_file:nxr_on_file) ) 1568 READ ( 13 ) tmp_3d_non_standard 1569 ENDIF 1570 uu_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1555 1571 1556 1572 CASE ( 'u_m_l' ) … … 1614 1630 v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1615 1631 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1632 1633 CASE ( 'vv_av' ) 1634 IF ( .NOT. ALLOCATED( vv_av ) ) THEN 1635 ALLOCATE( vv_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1636 ENDIF 1637 IF ( k == 1 ) THEN 1638 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1639 nxl_on_file:nxr_on_file) ) 1640 READ ( 13 ) tmp_3d_non_standard 1641 ENDIF 1642 vv_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1616 1643 1617 1644 CASE ( 'v_m_l' ) … … 1680 1707 w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1681 1708 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1709 1710 CASE ( 'ww_av' ) 1711 IF ( .NOT. ALLOCATED( ww_av ) ) THEN 1712 ALLOCATE( ww_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1713 ENDIF 1714 IF ( k == 1 ) THEN 1715 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1716 nxl_on_file:nxr_on_file) ) 1717 READ ( 13 ) tmp_3d_non_standard 1718 ENDIF 1719 ww_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1682 1720 1683 1721 CASE ( 'w_m_l' ) -
palm/trunk/SOURCE/sum_up_3d_data.f90
r3994 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize diagnostic output 28 ! 29 ! 3994 2019-05-22 18:08:09Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 286 289 USE cpulog, & 287 290 ONLY: cpu_log, log_point 288 289 USE diagnostic_output_quantities_mod, &290 ONLY: ti, ti_av291 291 292 292 USE indices, & … … 478 478 ENDIF 479 479 tsurf_av = 0.0_wp 480 481 CASE ( 'ti' )482 IF ( .NOT. ALLOCATED( ti_av ) ) THEN483 ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )484 ENDIF485 ti_av = 0.0_wp486 480 487 481 CASE ( 'u' ) … … 1031 1025 ENDIF 1032 1026 1033 CASE ( 'ti' )1034 IF ( ALLOCATED( ti_av ) ) THEN1035 DO i = nxl, nxr1036 DO j = nys, nyn1037 DO k = nzb, nzt+11038 ti_av(k,j,i) = ti_av(k,j,i) + ti(k,j,i)1039 ENDDO1040 ENDDO1041 ENDDO1042 ENDIF1043 1044 1027 CASE ( 'u' ) 1045 1028 IF ( ALLOCATED( u_av ) ) THEN -
palm/trunk/SOURCE/time_integration.f90
r4029 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Rename subroutines in module for diagnostic quantities 28 ! 29 ! 4029 2019-06-14 14:04:35Z raasch 27 30 ! exchange of ghost points and boundary conditions separated for chemical species and SALSA module, 28 31 ! bugfix: decycling of chemistry species after nesting data transfer … … 578 581 579 582 USE diagnostic_output_quantities_mod, & 580 ONLY: d iagnostic_output_quantities_calculate,&583 ONLY: doq_calculate, & 581 584 timestep_number_at_prev_calc 582 585 … … 1730 1733 IF ( time_do_sla >= dt_averaging_input ) THEN 1731 1734 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1732 CALL d iagnostic_output_quantities_calculate1735 CALL doq_calculate 1733 1736 1734 1737 CALL sum_up_3d_data … … 1811 1814 IF ( time_do2d_xy >= dt_do2d_xy .AND. time_since_reference_point >= skip_time_do2d_xy ) THEN 1812 1815 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1813 CALL d iagnostic_output_quantities_calculate1816 CALL doq_calculate 1814 1817 1815 1818 CALL data_output_2d( 'xy', 0 ) … … 1819 1822 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1820 1823 1821 CALL d iagnostic_output_quantities_calculate1824 CALL doq_calculate 1822 1825 CALL data_output_2d( 'xz', 0 ) 1823 1826 time_do2d_xz = MOD( time_do2d_xz, MAX( dt_do2d_xz, dt_3d ) ) … … 1825 1828 IF ( time_do2d_yz >= dt_do2d_yz .AND. time_since_reference_point >= skip_time_do2d_yz ) THEN 1826 1829 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1827 CALL d iagnostic_output_quantities_calculate1830 CALL doq_calculate 1828 1831 1829 1832 CALL data_output_2d( 'yz', 0 ) … … 1835 1838 IF ( time_do3d >= dt_do3d .AND. time_since_reference_point >= skip_time_do3d ) THEN 1836 1839 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1837 CALL d iagnostic_output_quantities_calculate1840 CALL doq_calculate 1838 1841 1839 1842 CALL data_output_3d( 0 ) … … 1847 1850 .AND. time_since_reference_point >= skip_time_domask(mid) ) THEN 1848 1851 IF ( current_timestep_number > timestep_number_at_prev_calc ) & 1849 CALL d iagnostic_output_quantities_calculate1852 CALL doq_calculate 1850 1853 1851 1854 CALL data_output_mask( 0 ) -
palm/trunk/SOURCE/write_restart_data_mod.f90
r4017 r4039 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularize diagnostic output 28 ! 29 ! 4017 2019-06-06 12:16:46Z schwenkel 27 30 ! output of turbulence intensity added 28 31 ! … … 95 98 ONLY: day_of_year_init, time_utc_init 96 99 97 USE diagnostic_output_quantities_mod, &98 ONLY: ti_av99 100 100 USE grid_variables, & 101 101 ONLY: dx, dy … … 1067 1067 ENDIF 1068 1068 1069 IF ( ALLOCATED( ti_av ) ) THEN1070 CALL wrd_write_string( 'ti_av' )1071 WRITE ( 14 ) ti_av1072 ENDIF1073 1074 1069 IF ( ALLOCATED( ts_av ) ) THEN 1075 1070 CALL wrd_write_string( 'ts_av' )
Note: See TracChangeset
for help on using the changeset viewer.