[1682] | 1 | !> @file average_3d_data.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[1036] | 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
[2101] | 17 | ! Copyright 1997-2017 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[1552] | 22 | ! |
---|
[2233] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: average_3d_data.f90 2233 2017-05-30 18:08:54Z schwenkel $ |
---|
| 27 | ! |
---|
[2233] | 28 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
| 29 | ! Adjustments to new surface concept - additional ghost point exchange |
---|
| 30 | ! of surface variable required |
---|
| 31 | ! |
---|
[2032] | 32 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
| 33 | ! renamed variable rho to rho_ocean and rho_av to rho_ocean_av |
---|
| 34 | ! |
---|
[2012] | 35 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
| 36 | ! Flag urban_surface is now defined in module control_parameters, |
---|
| 37 | ! changed prefix for urban surface model output to "usm_", |
---|
| 38 | ! introduced control parameter varnamelength for LEN of trimvar. |
---|
| 39 | ! |
---|
[2008] | 40 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
| 41 | ! Added support for new urban surface model (temporary modifications of |
---|
| 42 | ! SELECT CASE ( ) necessary, see variable trimvar), |
---|
| 43 | ! added comments in variable declaration section |
---|
| 44 | ! |
---|
[2001] | 45 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 46 | ! Forced header and separation lines into 80 columns |
---|
| 47 | ! |
---|
[1973] | 48 | ! 1972 2016-07-26 07:52:02Z maronga |
---|
| 49 | ! Output of land surface quantities is now done directly in the respective module |
---|
| 50 | ! |
---|
[1961] | 51 | ! 1960 2016-07-12 16:34:24Z suehring |
---|
| 52 | ! Treat humidity and passive scalar separately |
---|
| 53 | ! |
---|
[1692] | 54 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
| 55 | ! Added output of Obukhov length and radiative heating rates for RRTMG. |
---|
| 56 | ! |
---|
[1683] | 57 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 58 | ! Code annotations made doxygen readable |
---|
| 59 | ! |
---|
[1586] | 60 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 61 | ! Adapted for RRTMG |
---|
| 62 | ! |
---|
[1556] | 63 | ! 1555 2015-03-04 17:44:27Z maronga |
---|
| 64 | ! Added output of r_a and r_s |
---|
| 65 | ! |
---|
[1552] | 66 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 67 | ! Added support for land surface and radiation model parameters. |
---|
| 68 | ! |
---|
[1323] | 69 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 70 | ! REAL functions provided with KIND-attribute |
---|
| 71 | ! |
---|
[1321] | 72 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 73 | ! ONLY-attribute added to USE-statements, |
---|
| 74 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 75 | ! kinds are defined in new module kinds, |
---|
| 76 | ! revision history before 2012 removed, |
---|
| 77 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 78 | ! all variable declaration statements |
---|
[772] | 79 | ! |
---|
[1319] | 80 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 81 | ! barrier argument removed from cpu_log, |
---|
| 82 | ! module interfaces removed |
---|
| 83 | ! |
---|
[1116] | 84 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 85 | ! +qc |
---|
| 86 | ! |
---|
[1054] | 87 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 88 | ! averaging of nr, qr added |
---|
| 89 | ! |
---|
[1037] | 90 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 91 | ! code put under GPL (PALM 3.9) |
---|
| 92 | ! |
---|
[979] | 93 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 94 | ! +z0h_av |
---|
[77] | 95 | ! |
---|
[1] | 96 | ! Revision 1.1 2006/02/23 09:48:58 raasch |
---|
| 97 | ! Initial revision |
---|
| 98 | ! |
---|
| 99 | ! |
---|
| 100 | ! Description: |
---|
| 101 | ! ------------ |
---|
[1682] | 102 | !> Time-averaging of 3d-data-arrays. |
---|
[1] | 103 | !------------------------------------------------------------------------------! |
---|
[1682] | 104 | SUBROUTINE average_3d_data |
---|
| 105 | |
---|
[1] | 106 | |
---|
| 107 | USE averaging |
---|
| 108 | |
---|
[1320] | 109 | USE control_parameters, & |
---|
[2232] | 110 | ONLY: average_count_3d, doav, doav_n, land_surface, urban_surface, & |
---|
| 111 | varnamelength |
---|
[1320] | 112 | |
---|
| 113 | USE cpulog, & |
---|
| 114 | ONLY: cpu_log, log_point |
---|
| 115 | |
---|
| 116 | USE indices, & |
---|
[2232] | 117 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
[1320] | 118 | |
---|
| 119 | USE kinds |
---|
| 120 | |
---|
[1551] | 121 | USE land_surface_model_mod, & |
---|
[2232] | 122 | ONLY: lsm_3d_data_averaging |
---|
[1320] | 123 | |
---|
[1551] | 124 | USE radiation_model_mod, & |
---|
[1976] | 125 | ONLY: radiation, radiation_3d_data_averaging |
---|
[1551] | 126 | |
---|
[2007] | 127 | USE urban_surface_mod, & |
---|
[2011] | 128 | ONLY: usm_average_3d_data |
---|
[1691] | 129 | |
---|
[2007] | 130 | |
---|
[1] | 131 | IMPLICIT NONE |
---|
| 132 | |
---|
[2007] | 133 | INTEGER(iwp) :: i !< running index |
---|
| 134 | INTEGER(iwp) :: ii !< running index |
---|
| 135 | INTEGER(iwp) :: j !< running index |
---|
| 136 | INTEGER(iwp) :: k !< running index |
---|
[1] | 137 | |
---|
[2011] | 138 | CHARACTER (LEN=varnamelength) :: trimvar !< TRIM of output-variable string |
---|
[1] | 139 | |
---|
[2007] | 140 | |
---|
[1] | 141 | CALL cpu_log (log_point(35),'average_3d_data','start') |
---|
| 142 | |
---|
| 143 | ! |
---|
| 144 | !-- Check, if averaging is necessary |
---|
| 145 | IF ( average_count_3d <= 1 ) RETURN |
---|
| 146 | |
---|
| 147 | ! |
---|
| 148 | !-- Loop of all variables to be averaged. |
---|
| 149 | DO ii = 1, doav_n |
---|
| 150 | |
---|
| 151 | ! |
---|
[2007] | 152 | !-- Temporary solution to account for data output within the new urban |
---|
| 153 | !-- surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar ) |
---|
| 154 | trimvar = TRIM( doav(ii) ) |
---|
[2011] | 155 | IF ( urban_surface .AND. trimvar(1:4) == 'usm_' ) THEN |
---|
[2007] | 156 | trimvar = 'usm_output' |
---|
| 157 | ENDIF |
---|
| 158 | |
---|
| 159 | ! |
---|
[1] | 160 | !-- Store the array chosen on the temporary array. |
---|
[2007] | 161 | SELECT CASE ( trimvar ) |
---|
[1] | 162 | |
---|
| 163 | CASE ( 'e' ) |
---|
[667] | 164 | DO i = nxlg, nxrg |
---|
| 165 | DO j = nysg, nyng |
---|
[1] | 166 | DO k = nzb, nzt+1 |
---|
[1322] | 167 | e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 168 | ENDDO |
---|
| 169 | ENDDO |
---|
| 170 | ENDDO |
---|
| 171 | |
---|
[354] | 172 | CASE ( 'qsws*' ) |
---|
[667] | 173 | DO i = nxlg, nxrg |
---|
| 174 | DO j = nysg, nyng |
---|
[1322] | 175 | qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[354] | 176 | ENDDO |
---|
| 177 | ENDDO |
---|
[2232] | 178 | CALL exchange_horiz_2d( qsws_av, nbgp ) |
---|
[354] | 179 | |
---|
[771] | 180 | CASE ( 'lpt' ) |
---|
| 181 | DO i = nxlg, nxrg |
---|
| 182 | DO j = nysg, nyng |
---|
| 183 | DO k = nzb, nzt+1 |
---|
[1322] | 184 | lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[771] | 185 | ENDDO |
---|
| 186 | ENDDO |
---|
| 187 | ENDDO |
---|
| 188 | |
---|
[1] | 189 | CASE ( 'lwp*' ) |
---|
[667] | 190 | DO i = nxlg, nxrg |
---|
| 191 | DO j = nysg, nyng |
---|
[1322] | 192 | lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 193 | ENDDO |
---|
| 194 | ENDDO |
---|
| 195 | |
---|
[1053] | 196 | CASE ( 'nr' ) |
---|
| 197 | DO i = nxlg, nxrg |
---|
| 198 | DO j = nysg, nyng |
---|
| 199 | DO k = nzb, nzt+1 |
---|
[1322] | 200 | nr_av(k,j,i) = nr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1053] | 201 | ENDDO |
---|
| 202 | ENDDO |
---|
| 203 | ENDDO |
---|
| 204 | |
---|
[1691] | 205 | CASE ( 'ol*' ) |
---|
| 206 | DO i = nxlg, nxrg |
---|
| 207 | DO j = nysg, nyng |
---|
| 208 | ol_av(j,i) = ol_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 209 | ENDDO |
---|
| 210 | ENDDO |
---|
[2232] | 211 | CALL exchange_horiz_2d( ol_av, nbgp ) |
---|
[1691] | 212 | |
---|
[1] | 213 | CASE ( 'p' ) |
---|
[667] | 214 | DO i = nxlg, nxrg |
---|
| 215 | DO j = nysg, nyng |
---|
[1] | 216 | DO k = nzb, nzt+1 |
---|
[1322] | 217 | p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 218 | ENDDO |
---|
| 219 | ENDDO |
---|
| 220 | ENDDO |
---|
| 221 | |
---|
| 222 | CASE ( 'pc' ) |
---|
| 223 | DO i = nxl, nxr |
---|
| 224 | DO j = nys, nyn |
---|
| 225 | DO k = nzb, nzt+1 |
---|
[1322] | 226 | pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 227 | ENDDO |
---|
| 228 | ENDDO |
---|
| 229 | ENDDO |
---|
| 230 | |
---|
| 231 | CASE ( 'pr' ) |
---|
| 232 | DO i = nxl, nxr |
---|
| 233 | DO j = nys, nyn |
---|
| 234 | DO k = nzb, nzt+1 |
---|
[1322] | 235 | pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 236 | ENDDO |
---|
| 237 | ENDDO |
---|
| 238 | ENDDO |
---|
| 239 | |
---|
[72] | 240 | CASE ( 'prr*' ) |
---|
[667] | 241 | DO i = nxlg, nxrg |
---|
| 242 | DO j = nysg, nyng |
---|
[1320] | 243 | precipitation_rate_av(j,i) = precipitation_rate_av(j,i) / & |
---|
[1322] | 244 | REAL( average_count_3d, KIND=wp ) |
---|
[72] | 245 | ENDDO |
---|
| 246 | ENDDO |
---|
| 247 | |
---|
[1] | 248 | CASE ( 'pt' ) |
---|
[667] | 249 | DO i = nxlg, nxrg |
---|
| 250 | DO j = nysg, nyng |
---|
[1] | 251 | DO k = nzb, nzt+1 |
---|
[1322] | 252 | pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 253 | ENDDO |
---|
| 254 | ENDDO |
---|
| 255 | ENDDO |
---|
| 256 | |
---|
| 257 | CASE ( 'q' ) |
---|
[667] | 258 | DO i = nxlg, nxrg |
---|
| 259 | DO j = nysg, nyng |
---|
[1] | 260 | DO k = nzb, nzt+1 |
---|
[1322] | 261 | q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 262 | ENDDO |
---|
| 263 | ENDDO |
---|
| 264 | ENDDO |
---|
[367] | 265 | |
---|
[1115] | 266 | CASE ( 'qc' ) |
---|
| 267 | DO i = nxlg, nxrg |
---|
| 268 | DO j = nysg, nyng |
---|
| 269 | DO k = nzb, nzt+1 |
---|
[1322] | 270 | qc_av(k,j,i) = qc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1115] | 271 | ENDDO |
---|
| 272 | ENDDO |
---|
| 273 | ENDDO |
---|
| 274 | |
---|
[1] | 275 | CASE ( 'ql' ) |
---|
[667] | 276 | DO i = nxlg, nxrg |
---|
| 277 | DO j = nysg, nyng |
---|
[1] | 278 | DO k = nzb, nzt+1 |
---|
[1322] | 279 | ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 280 | ENDDO |
---|
| 281 | ENDDO |
---|
| 282 | ENDDO |
---|
| 283 | |
---|
| 284 | CASE ( 'ql_c' ) |
---|
[667] | 285 | DO i = nxlg, nxrg |
---|
| 286 | DO j = nysg, nyng |
---|
[1] | 287 | DO k = nzb, nzt+1 |
---|
[1322] | 288 | ql_c_av(k,j,i) = ql_c_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 289 | ENDDO |
---|
| 290 | ENDDO |
---|
| 291 | ENDDO |
---|
| 292 | |
---|
| 293 | CASE ( 'ql_v' ) |
---|
[667] | 294 | DO i = nxlg, nxrg |
---|
| 295 | DO j = nysg, nyng |
---|
[1] | 296 | DO k = nzb, nzt+1 |
---|
[1322] | 297 | ql_v_av(k,j,i) = ql_v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 298 | ENDDO |
---|
| 299 | ENDDO |
---|
| 300 | ENDDO |
---|
| 301 | |
---|
| 302 | CASE ( 'ql_vp' ) |
---|
[667] | 303 | DO i = nxlg, nxrg |
---|
| 304 | DO j = nysg, nyng |
---|
[1] | 305 | DO k = nzb, nzt+1 |
---|
[1320] | 306 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) / & |
---|
[1322] | 307 | REAL( average_count_3d, KIND=wp ) |
---|
[1] | 308 | ENDDO |
---|
| 309 | ENDDO |
---|
| 310 | ENDDO |
---|
| 311 | |
---|
[1053] | 312 | CASE ( 'qr' ) |
---|
| 313 | DO i = nxlg, nxrg |
---|
| 314 | DO j = nysg, nyng |
---|
| 315 | DO k = nzb, nzt+1 |
---|
[1322] | 316 | qr_av(k,j,i) = qr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1053] | 317 | ENDDO |
---|
| 318 | ENDDO |
---|
| 319 | ENDDO |
---|
| 320 | |
---|
[1] | 321 | CASE ( 'qv' ) |
---|
[667] | 322 | DO i = nxlg, nxrg |
---|
| 323 | DO j = nysg, nyng |
---|
[1] | 324 | DO k = nzb, nzt+1 |
---|
[1322] | 325 | qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 326 | ENDDO |
---|
| 327 | ENDDO |
---|
| 328 | ENDDO |
---|
[367] | 329 | |
---|
[2031] | 330 | CASE ( 'rho_ocean' ) |
---|
[667] | 331 | DO i = nxlg, nxrg |
---|
| 332 | DO j = nysg, nyng |
---|
[96] | 333 | DO k = nzb, nzt+1 |
---|
[2031] | 334 | rho_ocean_av(k,j,i) = rho_ocean_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[96] | 335 | ENDDO |
---|
| 336 | ENDDO |
---|
| 337 | ENDDO |
---|
[367] | 338 | |
---|
[1] | 339 | CASE ( 's' ) |
---|
[667] | 340 | DO i = nxlg, nxrg |
---|
| 341 | DO j = nysg, nyng |
---|
[1] | 342 | DO k = nzb, nzt+1 |
---|
[1322] | 343 | s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 344 | ENDDO |
---|
| 345 | ENDDO |
---|
| 346 | ENDDO |
---|
[367] | 347 | |
---|
[96] | 348 | CASE ( 'sa' ) |
---|
[667] | 349 | DO i = nxlg, nxrg |
---|
| 350 | DO j = nysg, nyng |
---|
[96] | 351 | DO k = nzb, nzt+1 |
---|
[1322] | 352 | sa_av(k,j,i) = sa_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[96] | 353 | ENDDO |
---|
| 354 | ENDDO |
---|
| 355 | ENDDO |
---|
[367] | 356 | |
---|
[354] | 357 | CASE ( 'shf*' ) |
---|
[667] | 358 | DO i = nxlg, nxrg |
---|
| 359 | DO j = nysg, nyng |
---|
[1322] | 360 | shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[354] | 361 | ENDDO |
---|
| 362 | ENDDO |
---|
[2232] | 363 | CALL exchange_horiz_2d( shf_av, nbgp ) |
---|
[367] | 364 | |
---|
[1960] | 365 | CASE ( 'ssws*' ) |
---|
| 366 | DO i = nxlg, nxrg |
---|
| 367 | DO j = nysg, nyng |
---|
| 368 | ssws_av(j,i) = ssws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 369 | ENDDO |
---|
| 370 | ENDDO |
---|
[2232] | 371 | CALL exchange_horiz_2d( ssws_av, nbgp ) |
---|
[1960] | 372 | |
---|
[1] | 373 | CASE ( 't*' ) |
---|
[667] | 374 | DO i = nxlg, nxrg |
---|
| 375 | DO j = nysg, nyng |
---|
[1322] | 376 | ts_av(j,i) = ts_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 377 | ENDDO |
---|
| 378 | ENDDO |
---|
[2232] | 379 | CALL exchange_horiz_2d( ts_av, nbgp ) |
---|
[1] | 380 | |
---|
| 381 | CASE ( 'u' ) |
---|
[667] | 382 | DO i = nxlg, nxrg |
---|
| 383 | DO j = nysg, nyng |
---|
[1] | 384 | DO k = nzb, nzt+1 |
---|
[1322] | 385 | u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 386 | ENDDO |
---|
| 387 | ENDDO |
---|
| 388 | ENDDO |
---|
| 389 | |
---|
| 390 | CASE ( 'u*' ) |
---|
[667] | 391 | DO i = nxlg, nxrg |
---|
| 392 | DO j = nysg, nyng |
---|
[1322] | 393 | us_av(j,i) = us_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 394 | ENDDO |
---|
| 395 | ENDDO |
---|
[2232] | 396 | CALL exchange_horiz_2d( us_av, nbgp ) |
---|
[1] | 397 | |
---|
| 398 | CASE ( 'v' ) |
---|
[667] | 399 | DO i = nxlg, nxrg |
---|
| 400 | DO j = nysg, nyng |
---|
[1] | 401 | DO k = nzb, nzt+1 |
---|
[1322] | 402 | v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 403 | ENDDO |
---|
| 404 | ENDDO |
---|
| 405 | ENDDO |
---|
| 406 | |
---|
| 407 | CASE ( 'vpt' ) |
---|
[667] | 408 | DO i = nxlg, nxrg |
---|
| 409 | DO j = nysg, nyng |
---|
[1] | 410 | DO k = nzb, nzt+1 |
---|
[1322] | 411 | vpt_av(k,j,i) = vpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 412 | ENDDO |
---|
| 413 | ENDDO |
---|
| 414 | ENDDO |
---|
| 415 | |
---|
| 416 | CASE ( 'w' ) |
---|
[667] | 417 | DO i = nxlg, nxrg |
---|
| 418 | DO j = nysg, nyng |
---|
[1] | 419 | DO k = nzb, nzt+1 |
---|
[1322] | 420 | w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 421 | ENDDO |
---|
| 422 | ENDDO |
---|
| 423 | ENDDO |
---|
| 424 | |
---|
[72] | 425 | CASE ( 'z0*' ) |
---|
[667] | 426 | DO i = nxlg, nxrg |
---|
| 427 | DO j = nysg, nyng |
---|
[1322] | 428 | z0_av(j,i) = z0_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[72] | 429 | ENDDO |
---|
| 430 | ENDDO |
---|
[2232] | 431 | CALL exchange_horiz_2d( z0_av, nbgp ) |
---|
[72] | 432 | |
---|
[978] | 433 | CASE ( 'z0h*' ) |
---|
| 434 | DO i = nxlg, nxrg |
---|
| 435 | DO j = nysg, nyng |
---|
[1322] | 436 | z0h_av(j,i) = z0h_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[978] | 437 | ENDDO |
---|
| 438 | ENDDO |
---|
[2232] | 439 | CALL exchange_horiz_2d( z0h_av, nbgp ) |
---|
[2007] | 440 | ! |
---|
| 441 | !-- Block of urban surface model outputs |
---|
| 442 | CASE ( 'usm_output' ) |
---|
| 443 | CALL usm_average_3d_data( 'average', doav(ii) ) |
---|
[978] | 444 | |
---|
[1] | 445 | CASE DEFAULT |
---|
| 446 | ! |
---|
[1972] | 447 | !-- Land surface quantity |
---|
| 448 | IF ( land_surface ) THEN |
---|
| 449 | CALL lsm_3d_data_averaging( 'average', doav(ii) ) |
---|
| 450 | ENDIF |
---|
| 451 | |
---|
| 452 | ! |
---|
[1976] | 453 | !-- Radiation quantity |
---|
| 454 | IF ( radiation ) THEN |
---|
| 455 | CALL radiation_3d_data_averaging( 'average', doav(ii) ) |
---|
| 456 | ENDIF |
---|
| 457 | |
---|
| 458 | ! |
---|
[1] | 459 | !-- User-defined quantity |
---|
| 460 | CALL user_3d_data_averaging( 'average', doav(ii) ) |
---|
| 461 | |
---|
| 462 | END SELECT |
---|
| 463 | |
---|
| 464 | ENDDO |
---|
| 465 | |
---|
| 466 | ! |
---|
| 467 | !-- Reset the counter |
---|
| 468 | average_count_3d = 0.0 |
---|
| 469 | |
---|
[1318] | 470 | CALL cpu_log( log_point(35), 'average_3d_data', 'stop' ) |
---|
[1] | 471 | |
---|
| 472 | |
---|
| 473 | END SUBROUTINE average_3d_data |
---|