Changeset 4866
- Timestamp:
- Feb 5, 2021 5:50:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
r4861 r4866 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! Implemented air temperature as diagnostic output quantity21 ! 22 22 ! 23 23 ! Former revisions: 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Implemented vertical passive scalar flux 27 ! Implemented air temperature as diagnostic output quantity (previous commit) 28 ! 29 ! 4861 2021-02-01 10:51:45Z raasch 26 30 ! Enable 3D data output also with 64-bit precision 27 31 ! … … 120 124 pt, & 121 125 q, & 126 s, & 122 127 u, & 123 128 v, & … … 139 144 humidity, & 140 145 message_string, & 146 passive_scalar, & 141 147 restart_data_format_output, & 142 148 varnamelength … … 230 236 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wq !< wq 231 237 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wq_av !< mean of wq 238 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ws !< ws 239 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ws_av !< mean of ws 232 240 233 241 … … 396 404 wq_av = 0.0_wp 397 405 406 CASE ( 'ws' ) 407 IF ( .NOT. ALLOCATED( ws_av ) ) THEN 408 ALLOCATE( ws_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 409 ENDIF 410 ws_av = 0.0_wp 411 398 412 CASE ( 'theta_2m*' ) 399 413 IF ( .NOT. ALLOCATED( pt_2m_av ) ) THEN … … 538 552 DO k = nzb, nzt+1 539 553 wq_av(k,j,i) = wq_av(k,j,i) + wq(k,j,i) 554 ENDDO 555 ENDDO 556 ENDDO 557 ENDIF 558 559 CASE ( 'ws' ) 560 IF ( ALLOCATED( ws_av ) ) THEN 561 DO i = nxl, nxr 562 DO j = nys, nyn 563 DO k = nzb, nzt+1 564 ws_av(k,j,i) = ws_av(k,j,i) + ws(k,j,i) 540 565 ENDDO 541 566 ENDDO … … 703 728 ENDIF 704 729 730 CASE ( 'ws' ) 731 IF ( ALLOCATED( ws_av ) ) THEN 732 DO i = nxl, nxr 733 DO j = nys, nyn 734 DO k = nzb, nzt+1 735 ws_av(k,j,i) = ws_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 736 ENDDO 737 ENDDO 738 ENDDO 739 ENDIF 740 705 741 CASE ( 'theta_2m*' ) 706 742 IF ( ALLOCATED( pt_2m_av ) ) THEN … … 810 846 unit = 'm/s' 811 847 848 CASE ( 'ws' ) 849 IF ( .NOT. passive_scalar ) THEN 850 message_string = 'data_output = ' // TRIM( var ) // & 851 ' is not implemented for passive_scalar = .FALSE.' 852 CALL message( 'diagnostic_output', 'PA0093', 1, 2, 0, 6, 0 ) 853 ENDIF 854 unit = 'm/s' 855 812 856 CASE ( 'wspeed' ) 813 857 unit = 'm/s' … … 937 981 'wv', 'wv_xy', 'wv_xz', 'wv_yz', & 938 982 'wtheta', 'wtheta_xy', 'wtheta_xz', 'wtheta_yz', & 939 'wq', 'wq_xy', 'wq_xz', 'wq_yz' ) 983 'wq', 'wq_xy', 'wq_xz', 'wq_yz', & 984 'ws', 'ws_xy', 'ws_xz', 'ws_yz' ) 940 985 941 986 grid_x = 'x' … … 1135 1180 IF ( mode == 'xy' ) grid = 'zw' 1136 1181 1182 CASE ( 'ws_xy', 'ws_xz', 'ws_yz' ) 1183 IF ( av == 0 ) THEN 1184 to_be_resorted => ws 1185 ELSE 1186 IF ( .NOT. ALLOCATED( ws_av ) ) THEN 1187 ALLOCATE( ws_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1188 ws_av = REAL( fill_value, KIND = wp ) 1189 ENDIF 1190 to_be_resorted => ws_av 1191 ENDIF 1192 flag_nr = 0 1193 1194 IF ( mode == 'xy' ) grid = 'zw' 1195 1137 1196 CASE ( 'theta_2m*_xy' ) ! 2d-array 1138 1197 IF ( av == 0 ) THEN … … 1383 1442 flag_nr = 0 1384 1443 1444 CASE ( 'ws' ) 1445 IF ( av == 0 ) THEN 1446 to_be_resorted => ws 1447 ELSE 1448 IF ( .NOT. ALLOCATED( ws_av ) ) THEN 1449 ALLOCATE( ws_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1450 ws_av = REAL( fill_value, KIND = wp ) 1451 ENDIF 1452 to_be_resorted => ws_av 1453 ENDIF 1454 flag_nr = 0 1455 1385 1456 CASE ( 'wspeed' ) 1386 1457 IF ( av == 0 ) THEN … … 1559 1630 ELSE 1560 1631 to_be_resorted => wq_av 1632 ENDIF 1633 grid = 's' 1634 flag_nr = 0 1635 1636 CASE ( 'ws' ) 1637 IF ( av == 0 ) THEN 1638 to_be_resorted => ws 1639 ELSE 1640 to_be_resorted => ws_av 1561 1641 ENDIF 1562 1642 grid = 's' … … 1728 1808 ALLOCATE( wq(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1729 1809 wq = 0.0_wp 1810 ENDIF 1811 ! 1812 !-- Allocate array for ws 1813 CASE ( 'ws' ) 1814 IF ( .NOT. ALLOCATED( ws ) ) THEN 1815 ALLOCATE( ws(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1816 ws = 0.0_wp 1730 1817 ENDIF 1731 1818 ! … … 1970 2057 ENDDO 1971 2058 ! 2059 !-- ws 2060 CASE ( 'ws' ) 2061 DO i = nxl, nxr 2062 DO j = nys, nyn 2063 DO k = nzb+1, nzt-1 2064 ws(k,j,i) = w(k,j,i) * 0.5_wp * ( s(k,j,i) + s(k+1,j,i) ) & 2065 * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 3 ) ) 2066 ENDDO 2067 ENDDO 2068 ENDDO 2069 ! 1972 2070 !-- 2-m potential temperature 1973 2071 CASE ( 'theta_2m*' ) … … 2359 2457 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 2360 2458 2459 CASE ( 'ws_av' ) 2460 IF ( .NOT. ALLOCATED( ws_av ) ) THEN 2461 ALLOCATE( ws_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 2462 ENDIF 2463 IF ( k == 1 ) READ ( 13 ) tmp_3d 2464 ws_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 2465 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 2466 2361 2467 CASE ( 'wspeed_av' ) 2362 2468 IF ( .NOT. ALLOCATED( wspeed_av ) ) THEN … … 2494 2600 ENDIF 2495 2601 2602 CALL rd_mpi_io_check_array( 'ws_av' , found = array_found ) 2603 IF ( array_found ) THEN 2604 IF ( .NOT. ALLOCATED( ws_av ) ) ALLOCATE( ws_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 2605 CALL rrd_mpi_io( 'ws_av', ws_av ) 2606 ENDIF 2607 2496 2608 CALL rd_mpi_io_check_array( 'wspeed_av' , found = array_found ) 2497 2609 IF ( array_found ) THEN … … 2582 2694 CALL wrd_write_string( 'wq_av' ) 2583 2695 WRITE ( 14 ) wq_av 2696 ENDIF 2697 2698 IF ( ALLOCATED( ws_av ) ) THEN 2699 CALL wrd_write_string( 'ws_av' ) 2700 WRITE ( 14 ) ws_av 2584 2701 ENDIF 2585 2702 … … 2602 2719 IF ( ALLOCATED( wtheta_av ) ) CALL wrd_mpi_io( 'wtheta_av', wtheta_av ) 2603 2720 IF ( ALLOCATED( wq_av ) ) CALL wrd_mpi_io( 'wq_av', wq_av ) 2721 IF ( ALLOCATED( ws_av ) ) CALL wrd_mpi_io( 'ws_av', ws_av ) 2604 2722 IF ( ALLOCATED( wspeed_av ) ) CALL wrd_mpi_io( 'wspeed_av', wspeed_av ) 2605 2723 IF ( ALLOCATED( wu_av ) ) CALL wrd_mpi_io( 'wu_av', wu_av )
Note: See TracChangeset
for help on using the changeset viewer.