- Timestamp:
- Feb 1, 2021 10:51:45 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
r4828 r4861 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Implemented air temperature as diagnostic output quantity 22 22 ! 23 23 ! Former revisions: … … 31 31 ! 4671 2020-09-09 20:27:58Z pavelkrc 32 32 ! Implementation of downward facing USM and LSM surfaces 33 ! 33 ! 34 34 ! 4583 2020-06-29 12:36:47Z raasch 35 35 ! file re-formatted to follow the PALM coding standard … … 127 127 128 128 USE basic_constants_and_equations_mod, & 129 ONLY: kappa, & 129 ONLY: degc_to_k, & 130 kappa, & 130 131 pi, & 131 132 magnus, & … … 203 204 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rh !< relative humidity 204 205 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rh_av !< avg. relative humidity 206 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ta !< air temperature 207 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ta_av !< avg. air temperature 205 208 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ti !< rotation(u,v,w) aka turbulence intensity 206 209 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ti_av !< avg. rotation(u,v,w) aka turbulence intensity … … 339 342 rh_av = 0.0_wp 340 343 344 CASE ( 'ta' ) 345 IF ( .NOT. ALLOCATED( ta_av ) ) THEN 346 ALLOCATE( ta_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 347 ENDIF 348 ta_av = 0.0_wp 349 341 350 CASE ( 'ti' ) 342 351 IF ( .NOT. ALLOCATED( ti_av ) ) THEN … … 430 439 DO k = nzb, nzt+1 431 440 rh_av(k,j,i) = rh_av(k,j,i) + rh(k,j,i) 441 ENDDO 442 ENDDO 443 ENDDO 444 ENDIF 445 446 CASE ( 'ta' ) 447 IF ( ALLOCATED( ta_av ) ) THEN 448 DO i = nxl, nxr 449 DO j = nys, nyn 450 DO k = nzb, nzt+1 451 ta_av(k,j,i) = ta_av(k,j,i) + ta(k,j,i) 432 452 ENDDO 433 453 ENDDO … … 584 604 ENDIF 585 605 606 CASE ( 'ta' ) 607 IF ( ALLOCATED( ta_av ) ) THEN 608 DO i = nxl, nxr 609 DO j = nys, nyn 610 DO k = nzb, nzt+1 611 ta_av(k,j,i) = ta_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 612 ENDDO 613 ENDDO 614 ENDDO 615 ENDIF 616 586 617 CASE ( 'ti' ) 587 618 IF ( ALLOCATED( ti_av ) ) THEN … … 752 783 unit = '%' 753 784 785 CASE ( 'ta' ) 786 unit = 'degree_C' 787 754 788 CASE ( 'ti' ) 755 789 unit = '1/s' … … 868 902 !-- s grid 869 903 CASE ( 'rh', 'rh_xy', 'rh_xz', 'rh_yz', & 904 'ta', 'ta_xy', 'ta_xz', 'ta_yz', & 870 905 'ti', 'ti_xy', 'ti_xz', 'ti_yz', & 871 906 'wspeed', 'wspeed_xy', 'wspeed_xz', 'wspeed_yz', & … … 974 1009 IF ( mode == 'xy' ) grid = 'zu' 975 1010 1011 CASE ( 'ta_xy', 'ta_xz', 'ta_yz' ) 1012 IF ( av == 0 ) THEN 1013 to_be_resorted => ta 1014 ELSE 1015 IF ( .NOT. ALLOCATED( ta_av ) ) THEN 1016 ALLOCATE( ta_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1017 ta_av = REAL( fill_value, KIND = wp ) 1018 ENDIF 1019 to_be_resorted => ta_av 1020 ENDIF 1021 flag_nr = 0 1022 1023 IF ( mode == 'xy' ) grid = 'zu' 1024 976 1025 CASE ( 'ti_xy', 'ti_xz', 'ti_yz' ) 977 1026 IF ( av == 0 ) THEN … … 1226 1275 flag_nr = 0 1227 1276 1277 CASE ( 'ta' ) 1278 IF ( av == 0 ) THEN 1279 to_be_resorted => ta 1280 ELSE 1281 IF ( .NOT. ALLOCATED( ta ) ) THEN 1282 ALLOCATE( ta(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1283 ta = REAL( fill_value, KIND = wp ) 1284 ENDIF 1285 to_be_resorted => ta 1286 ENDIF 1287 flag_nr = 0 1288 1228 1289 CASE ( 'ti' ) 1229 1290 IF ( av == 0 ) THEN … … 1417 1478 ELSE 1418 1479 to_be_resorted => rh_av 1480 ENDIF 1481 grid = 's' 1482 flag_nr = 0 1483 1484 CASE ( 'ta' ) 1485 IF ( av == 0 ) THEN 1486 to_be_resorted => ta 1487 ELSE 1488 to_be_resorted => ta_av 1419 1489 ENDIF 1420 1490 grid = 's' … … 1597 1667 ENDIF 1598 1668 ! 1669 !-- Allocate array for 'air temperature' 1670 CASE ( 'ta' ) 1671 IF ( .NOT. ALLOCATED( ta ) ) THEN 1672 ALLOCATE( ta(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1673 ta = 0.0_wp 1674 ENDIF 1675 ! 1599 1676 !-- Allocate array for 'turbulence intensity' 1600 1677 CASE ( 'ti' ) … … 1776 1853 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 1 ) ) 1777 1854 ENDIF 1855 ENDDO 1856 ENDDO 1857 ENDDO 1858 ! 1859 !-- ta (air temperature) 1860 CASE ( 'ta' ) 1861 DO i = nxl, nxr 1862 DO j = nys, nyn 1863 DO k = nzb+1, nzt 1864 ta(k,j,i) = exner(k) * pt(k,j,i) - degc_to_k 1778 1865 ENDDO 1779 1866 ENDDO … … 2200 2287 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 2201 2288 2289 CASE ( 'ta_av' ) 2290 IF ( .NOT. ALLOCATED( ta_av ) ) THEN 2291 ALLOCATE( ta_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 2292 ENDIF 2293 IF ( k == 1 ) READ ( 13 ) tmp_3d 2294 ta_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 2295 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 2296 2202 2297 CASE ( 'ti_av' ) 2203 2298 IF ( .NOT. ALLOCATED( ti_av ) ) THEN … … 2321 2416 ENDIF 2322 2417 2418 CALL rd_mpi_io_check_array( 'ta_av' , found = array_found ) 2419 IF ( array_found ) THEN 2420 IF ( .NOT. ALLOCATED( ta_av ) ) ALLOCATE( ta_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 2421 CALL rrd_mpi_io( 'ta_av', ta_av ) 2422 ENDIF 2423 2323 2424 CALL rd_mpi_io_check_array( 'ti_av' , found = array_found ) 2324 2425 IF ( array_found ) THEN … … 2423 2524 ENDIF 2424 2525 2526 IF ( ALLOCATED( ta_av ) ) THEN 2527 CALL wrd_write_string( 'ta_av' ) 2528 WRITE ( 14 ) ta_av 2529 ENDIF 2530 2425 2531 IF ( ALLOCATED( ti_av ) ) THEN 2426 2532 CALL wrd_write_string( 'ti_av' ) … … 2487 2593 IF ( ALLOCATED( pt_2m_av ) ) CALL wrd_mpi_io( 'pt_2m_av', pt_2m_av ) 2488 2594 IF ( ALLOCATED( rh_av ) ) CALL wrd_mpi_io( 'rh_av', rh_av ) 2595 IF ( ALLOCATED( ta_av ) ) CALL wrd_mpi_io( 'ta_av', ta_av ) 2489 2596 IF ( ALLOCATED( ti_av ) ) CALL wrd_mpi_io( 'ti_av', ti_av ) 2490 2597 IF ( ALLOCATED( u_center_av ) ) CALL wrd_mpi_io( 'u_center_av', u_center_av )
Note: See TracChangeset
for help on using the changeset viewer.