[1682] | 1 | !> @file print_1d.f90 |
---|
[4649] | 2 | !--------------------------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[4649] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General |
---|
| 6 | ! Public License as published by the Free Software Foundation, either version 3 of the License, or |
---|
| 7 | ! (at your option) any later version. |
---|
[1036] | 8 | ! |
---|
[4649] | 9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
---|
| 10 | ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
| 11 | ! Public License for more details. |
---|
[1036] | 12 | ! |
---|
[4649] | 13 | ! You should have received a copy of the GNU General Public License along with PALM. If not, see |
---|
| 14 | ! <http://www.gnu.org/licenses/>. |
---|
[1036] | 15 | ! |
---|
[4360] | 16 | ! Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
[4649] | 17 | !--------------------------------------------------------------------------------------------------! |
---|
[1036] | 18 | ! |
---|
[4649] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[4649] | 22 | ! |
---|
| 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: print_1d.f90 4649 2020-08-25 12:11:17Z suehring $ |
---|
[4649] | 27 | ! File re-formatted to follow the PALM coding standard |
---|
| 28 | ! |
---|
| 29 | ! |
---|
| 30 | ! 4360 2020-01-07 11:25:50Z suehring |
---|
[4182] | 31 | ! Corrected "Former revisions" section |
---|
[4649] | 32 | ! |
---|
[4182] | 33 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[3421] | 34 | ! Renamed output variables |
---|
[1321] | 35 | ! |
---|
[4182] | 36 | ! Revision 1.1 1997/09/19 07:45:22 raasch |
---|
| 37 | ! Initial revision |
---|
| 38 | ! |
---|
[4649] | 39 | !--------------------------------------------------------------------------------------------------! |
---|
[1] | 40 | ! Description: |
---|
| 41 | ! ------------ |
---|
[1682] | 42 | !> List output of 1D-profiles. |
---|
[4649] | 43 | !--------------------------------------------------------------------------------------------------! |
---|
[1682] | 44 | SUBROUTINE print_1d |
---|
[1] | 45 | |
---|
[1320] | 46 | |
---|
[4649] | 47 | USE arrays_3d, & |
---|
| 48 | ONLY: zu, & |
---|
| 49 | zw |
---|
[1320] | 50 | |
---|
[4649] | 51 | USE control_parameters, & |
---|
| 52 | ONLY: run_description_header, & |
---|
| 53 | simulated_time_chr |
---|
[1320] | 54 | |
---|
[4649] | 55 | USE cpulog, & |
---|
| 56 | ONLY: cpu_log, & |
---|
| 57 | log_point |
---|
[1320] | 58 | |
---|
[4649] | 59 | USE indices, & |
---|
| 60 | ONLY: nzb, & |
---|
| 61 | nzt |
---|
| 62 | |
---|
[1320] | 63 | USE kinds |
---|
| 64 | |
---|
[1] | 65 | USE pegrid |
---|
| 66 | |
---|
[4649] | 67 | USE statistics, & |
---|
| 68 | ONLY: flow_statistics_called, & |
---|
| 69 | hom, & |
---|
| 70 | region, & |
---|
| 71 | statistic_regions |
---|
[1320] | 72 | |
---|
[1] | 73 | IMPLICIT NONE |
---|
| 74 | |
---|
| 75 | |
---|
[4649] | 76 | CHARACTER(LEN=20) :: period_chr !< |
---|
[1] | 77 | |
---|
[1682] | 78 | INTEGER(iwp) :: k !< |
---|
| 79 | INTEGER(iwp) :: sr !< |
---|
[1] | 80 | |
---|
[1320] | 81 | |
---|
[1] | 82 | ! |
---|
| 83 | !-- If required, compute statistics. |
---|
| 84 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
| 85 | |
---|
| 86 | ! |
---|
| 87 | !-- Flow_statistics has its own cpu-time measuring. |
---|
| 88 | CALL cpu_log( log_point(18), 'print_1d', 'start' ) |
---|
| 89 | |
---|
| 90 | IF ( myid == 0 ) THEN |
---|
| 91 | ! |
---|
| 92 | !-- Open file for list output of profiles. |
---|
| 93 | CALL check_open( 16 ) |
---|
| 94 | |
---|
| 95 | ! |
---|
| 96 | !-- Prepare header. |
---|
| 97 | period_chr = ' no time-average!' |
---|
| 98 | |
---|
| 99 | ! |
---|
| 100 | !-- Output for the total domain (and each subregion, if applicable). |
---|
| 101 | DO sr = 0, statistic_regions |
---|
| 102 | ! |
---|
| 103 | !-- Write header. |
---|
[4649] | 104 | WRITE( 16, 112 ) |
---|
| 105 | WRITE( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
| 106 | TRIM( region( sr ) ), TRIM( period_chr ), 'uv' |
---|
| 107 | WRITE( 16, 105 ) TRIM( simulated_time_chr ) |
---|
| 108 | WRITE( 16, 111 ) |
---|
[1] | 109 | |
---|
| 110 | ! |
---|
| 111 | !-- Output of values on the scalar levels. |
---|
[4649] | 112 | WRITE( 16, 120 ) |
---|
| 113 | WRITE( 16, 111 ) |
---|
[1] | 114 | DO k = nzt+1, nzb, -1 |
---|
[4649] | 115 | WRITE( 16, 121) k, zu(k), hom(k,1,1,sr), hom(k,1,1,sr) - hom(k,1,5,sr), & |
---|
| 116 | hom(k,1,2,sr), hom(k,1,2,sr) - hom(k,1,6,sr), hom(k,1,4,sr), & |
---|
| 117 | hom(k,1,4,sr) - hom(k,1,7,sr), hom(k,1,8,sr), hom(k,1,9,sr), & |
---|
| 118 | hom(k,1,10,sr), hom(k,1,11,sr), zu(k), k |
---|
[1] | 119 | ENDDO |
---|
[4649] | 120 | WRITE( 16, 111 ) |
---|
| 121 | WRITE( 16, 120 ) |
---|
| 122 | WRITE( 16, 111 ) |
---|
[1] | 123 | |
---|
| 124 | ! |
---|
| 125 | !-- Output of values on the w-levels. |
---|
[4649] | 126 | WRITE( 16, 112 ) |
---|
| 127 | WRITE( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
| 128 | TRIM( region( sr ) ), TRIM( period_chr ), 'w' |
---|
| 129 | WRITE( 16, 105 ) TRIM( simulated_time_chr ) |
---|
| 130 | WRITE( 16, 111 ) |
---|
[1] | 131 | |
---|
[4649] | 132 | WRITE( 16, 130 ) |
---|
| 133 | WRITE( 16, 111 ) |
---|
[1] | 134 | DO k = nzt+1, nzb, -1 |
---|
[4649] | 135 | WRITE( 16, 131) k, zw(k), hom(k,1,16,sr), hom(k,1,18,sr), hom(k,1,12,sr), & |
---|
| 136 | hom(k,1,19,sr), hom(k,1,14,sr), hom(k,1,20,sr), zw(k), k |
---|
[1] | 137 | ENDDO |
---|
[4649] | 138 | WRITE( 16, 111 ) |
---|
| 139 | WRITE( 16, 130 ) |
---|
| 140 | WRITE( 16, 111 ) |
---|
[1] | 141 | |
---|
| 142 | ENDDO |
---|
| 143 | |
---|
| 144 | ENDIF |
---|
| 145 | |
---|
[1318] | 146 | CALL cpu_log( log_point(18), 'print_1d', 'stop' ) |
---|
[1] | 147 | |
---|
| 148 | ! |
---|
| 149 | !-- Formats. |
---|
[4649] | 150 | 100 FORMAT( 1X, A / 1X, 10( '-' ) / ' Horizontally', A, ' averaged profiles on the ', A, '-level' ) |
---|
| 151 | 105 FORMAT( ' Time: ', A ) |
---|
| 152 | 111 FORMAT( 1X, 131( '-' ) ) |
---|
| 153 | 112 FORMAT( / ) |
---|
| 154 | 120 FORMAT( ' k zu u du v dv theta dtheta ', & |
---|
| 155 | ' e Km Kh l zu k' ) |
---|
| 156 | 121 FORMAT( 1X, I4, 1X, F7.1, 1X, F6.2, 1X, F5.2, 1X, F6.2, 1X, F5.2, 2X, F6.2, 1X, F5.2, 1X, & |
---|
| 157 | F7.4, 1X, F5.2, 1X, F5.2, 1X, F6.2, 1X, F7.1, 2X, I4 ) |
---|
| 158 | 130 FORMAT( ' k zw w''theta'' wtheta w''u'' wu ', & |
---|
| 159 | ' w''v'' wv zw k' ) |
---|
| 160 | 131 FORMAT( 1X, I4, 1X, F7.1, 6( 1X, E10.3 ), 1X, F7.1, 2X, I4 ) |
---|
[1] | 161 | |
---|
| 162 | |
---|
[4649] | 163 | END SUBROUTINE print_1d |
---|