130 | | 7. In case that output of time-averaged data is requested, the sum- and average-operations as well as the allocation of the sum-array have to be carried out in subroutine user_3d_data_averaging: |
131 | | |
132 | | IF ( mode == 'allocate' ) THEN |
133 | | ... |
134 | | CASE ( 'u2' ) |
135 | | IF ( .NOT. ALLOCATED( u2_av ) ) THEN |
136 | | ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) |
137 | | ENDIF |
138 | | u2_av = 0.0 |
139 | | ... |
140 | | ELSEIF ( mode == 'sum' ) THEN |
141 | | ... |
142 | | CASE ( 'u2' ) |
143 | | DO i = nxl-1, nxr+1 |
144 | | DO j = nys-1, nyn+1 |
145 | | DO k = nzb, nzt+1 |
146 | | u2_av(k,j,i) = u2_av(k,j,i) + u2(k,j,i) |
147 | | ENDDO |
148 | | ENDDO |
149 | | ENDDO |
150 | | ... |
151 | | ELSEIF ( mode == 'average' ) THEN |
152 | | ... |
153 | | CASE ( 'u2' ) |
154 | | DO i = nxl-1, nxr+1 |
155 | | DO j = nys-1, nyn+1 |
156 | | DO k = nzb, nzt+1 |
157 | | u2_av(k,j,i) = u2_av(k,j,i) / REAL( average_count_3d ) |
158 | | ENDDO |
159 | | ENDDO |
160 | | ENDDO |
161 | | |
162 | | |
163 | | 8. For output of 2d cross sections, the gridpoint data of the quantity has to be resorted to array local_pf in subroutine user_data_output_2d. Also the vertical grid, on which the quantity is defined, has to be set again: |
| 130 | 7. In case that output of time-averaged data is requested, the sum- and average-operations as well as the allocation of the sum-array have to be carried out in subroutine [../int#user_3d_data_averaging user_3d_data_averaging]: \\ |
| 131 | |
| 132 | {{{ IF ( mode == 'allocate' ) THEN }}} \\ |
| 133 | {{{ ... }}} \\ |
| 134 | {{{ CASE ( 'u2' ) }}} \\ |
| 135 | {{{ IF ( .NOT. ALLOCATED( u2_av ) ) THEN }}} \\ |
| 136 | {{{ ALLOCATE( u2_av(nzb:nzt+1,nysd:nynd,nxld:nxrd) ) }}} \\ |
| 137 | {{{ ENDIF }}} \\ |
| 138 | {{{ u2_av = 0.0 }}} \\ |
| 139 | {{{ ... }}} \\ |
| 140 | {{{ ELSEIF ( mode == 'sum' ) THEN }}} \\ |
| 141 | {{{ ... }}} \\ |
| 142 | {{{ CASE ( 'u2' ) }}} \\ |
| 143 | {{{ DO i = nxld, nxrd }}} \\ |
| 144 | {{{ DO j = nysd, nynd }}} \\ |
| 145 | {{{ DO k = nzb, nzt+1 }}} \\ |
| 146 | {{{ u2_av(k,j,i) = u2_av(k,j,i) + u2(k,j,i) }}} \\ |
| 147 | {{{ ENDDO }}} \\ |
| 148 | {{{ ENDDO }}} \\ |
| 149 | {{{ ENDDO }}} \\ |
| 150 | {{{ ... }}} \\ |
| 151 | {{{ ELSEIF ( mode == 'average' ) THEN }}} \\ |
| 152 | {{{ ... }}} \\ |
| 153 | {{{ CASE ( 'u2' ) }}} \\ |
| 154 | {{{ DO i = nxld, nxrd }}} \\ |
| 155 | {{{ DO j = nysd, nynd }}} \\ |
| 156 | {{{ DO k = nzb, nzt+1 }}} \\ |
| 157 | {{{ u2_av(k,j,i) = u2_av(k,j,i) / REAL( average_count_3d ) }}} \\ |
| 158 | {{{ ENDDO }}} \\ |
| 159 | {{{ ENDDO }}} \\ |
| 160 | {{{ ENDDO }}} \\ |
| 161 | |
| 162 | 8. For output of 2d cross sections, the gridpoint data of the quantity has to be resorted to array {{{local_pf}}} in subroutine [.../int#user_data_output_2d user_data_output_2d]. Also the vertical grid, on which the quantity is defined, has to be set again: |