[1682] | 1 | !> @file average_3d_data.f90 |
---|
[1036] | 2 | !--------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
| 5 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 6 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 7 | ! either version 3 of the License, or (at your option) any later version. |
---|
| 8 | ! |
---|
| 9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 10 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 11 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 12 | ! |
---|
| 13 | ! You should have received a copy of the GNU General Public License along with |
---|
| 14 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 15 | ! |
---|
[1310] | 16 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1552] | 21 | ! |
---|
[1683] | 22 | ! |
---|
[1321] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: average_3d_data.f90 1683 2015-10-07 23:57:51Z knoop $ |
---|
| 26 | ! |
---|
[1683] | 27 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 28 | ! Code annotations made doxygen readable |
---|
| 29 | ! |
---|
[1586] | 30 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 31 | ! Adapted for RRTMG |
---|
| 32 | ! |
---|
[1556] | 33 | ! 1555 2015-03-04 17:44:27Z maronga |
---|
| 34 | ! Added output of r_a and r_s |
---|
| 35 | ! |
---|
[1552] | 36 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 37 | ! Added support for land surface and radiation model parameters. |
---|
| 38 | ! |
---|
[1323] | 39 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 40 | ! REAL functions provided with KIND-attribute |
---|
| 41 | ! |
---|
[1321] | 42 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 43 | ! ONLY-attribute added to USE-statements, |
---|
| 44 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 45 | ! kinds are defined in new module kinds, |
---|
| 46 | ! revision history before 2012 removed, |
---|
| 47 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 48 | ! all variable declaration statements |
---|
[772] | 49 | ! |
---|
[1319] | 50 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 51 | ! barrier argument removed from cpu_log, |
---|
| 52 | ! module interfaces removed |
---|
| 53 | ! |
---|
[1116] | 54 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 55 | ! +qc |
---|
| 56 | ! |
---|
[1054] | 57 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 58 | ! averaging of nr, qr added |
---|
| 59 | ! |
---|
[1037] | 60 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 61 | ! code put under GPL (PALM 3.9) |
---|
| 62 | ! |
---|
[979] | 63 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 64 | ! +z0h_av |
---|
[77] | 65 | ! |
---|
[1] | 66 | ! Revision 1.1 2006/02/23 09:48:58 raasch |
---|
| 67 | ! Initial revision |
---|
| 68 | ! |
---|
| 69 | ! |
---|
| 70 | ! Description: |
---|
| 71 | ! ------------ |
---|
[1682] | 72 | !> Time-averaging of 3d-data-arrays. |
---|
[1] | 73 | !------------------------------------------------------------------------------! |
---|
[1682] | 74 | SUBROUTINE average_3d_data |
---|
| 75 | |
---|
[1] | 76 | |
---|
| 77 | USE averaging |
---|
| 78 | |
---|
[1320] | 79 | USE control_parameters, & |
---|
| 80 | ONLY: average_count_3d, doav, doav_n |
---|
| 81 | |
---|
| 82 | USE cpulog, & |
---|
| 83 | ONLY: cpu_log, log_point |
---|
| 84 | |
---|
| 85 | USE indices, & |
---|
| 86 | ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
| 87 | |
---|
| 88 | USE kinds |
---|
| 89 | |
---|
[1551] | 90 | USE land_surface_model_mod, & |
---|
| 91 | ONLY: c_liq_av, c_soil_av, c_veg_av, ghf_eb_av, lai_av, m_liq_eb_av, & |
---|
| 92 | m_soil_av, nzb_soil, nzt_soil, qsws_eb_av, qsws_liq_eb_av, & |
---|
[1555] | 93 | qsws_soil_eb_av, qsws_veg_eb_av, r_a, r_a_av, r_s, r_s_av, & |
---|
| 94 | shf_eb_av, t_soil_av |
---|
[1320] | 95 | |
---|
[1551] | 96 | USE radiation_model_mod, & |
---|
[1585] | 97 | ONLY: rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, rad_lw_out, & |
---|
| 98 | rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out, & |
---|
| 99 | rad_sw_out_av |
---|
[1551] | 100 | |
---|
[1] | 101 | IMPLICIT NONE |
---|
| 102 | |
---|
[1682] | 103 | INTEGER(iwp) :: i !< |
---|
| 104 | INTEGER(iwp) :: ii !< |
---|
| 105 | INTEGER(iwp) :: j !< |
---|
| 106 | INTEGER(iwp) :: k !< |
---|
[1] | 107 | |
---|
| 108 | |
---|
| 109 | CALL cpu_log (log_point(35),'average_3d_data','start') |
---|
| 110 | |
---|
| 111 | ! |
---|
| 112 | !-- Check, if averaging is necessary |
---|
| 113 | IF ( average_count_3d <= 1 ) RETURN |
---|
| 114 | |
---|
| 115 | ! |
---|
| 116 | !-- Loop of all variables to be averaged. |
---|
| 117 | DO ii = 1, doav_n |
---|
| 118 | |
---|
| 119 | ! |
---|
| 120 | !-- Store the array chosen on the temporary array. |
---|
| 121 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
| 122 | |
---|
[1551] | 123 | CASE ( 'c_liq*' ) |
---|
| 124 | DO i = nxlg, nxrg |
---|
| 125 | DO j = nysg, nyng |
---|
| 126 | c_liq_av(j,i) = c_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 127 | ENDDO |
---|
| 128 | ENDDO |
---|
| 129 | |
---|
| 130 | CASE ( 'c_soil*' ) |
---|
| 131 | DO i = nxlg, nxrg |
---|
| 132 | DO j = nysg, nyng |
---|
| 133 | c_soil_av(j,i) = c_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 134 | ENDDO |
---|
| 135 | ENDDO |
---|
| 136 | |
---|
| 137 | CASE ( 'c_veg*' ) |
---|
| 138 | DO i = nxlg, nxrg |
---|
| 139 | DO j = nysg, nyng |
---|
| 140 | c_veg_av(j,i) = c_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 141 | ENDDO |
---|
| 142 | ENDDO |
---|
| 143 | |
---|
[1] | 144 | CASE ( 'e' ) |
---|
[667] | 145 | DO i = nxlg, nxrg |
---|
| 146 | DO j = nysg, nyng |
---|
[1] | 147 | DO k = nzb, nzt+1 |
---|
[1322] | 148 | e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 149 | ENDDO |
---|
| 150 | ENDDO |
---|
| 151 | ENDDO |
---|
| 152 | |
---|
[1551] | 153 | CASE ( 'ghf_eb*' ) |
---|
| 154 | DO i = nxlg, nxrg |
---|
| 155 | DO j = nysg, nyng |
---|
| 156 | ghf_eb_av(j,i) = ghf_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 157 | ENDDO |
---|
| 158 | ENDDO |
---|
| 159 | |
---|
[354] | 160 | CASE ( 'qsws*' ) |
---|
[667] | 161 | DO i = nxlg, nxrg |
---|
| 162 | DO j = nysg, nyng |
---|
[1322] | 163 | qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[354] | 164 | ENDDO |
---|
| 165 | ENDDO |
---|
| 166 | |
---|
[1551] | 167 | CASE ( 'lai*' ) |
---|
| 168 | DO i = nxlg, nxrg |
---|
| 169 | DO j = nysg, nyng |
---|
| 170 | lai_av(j,i) = lai_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 171 | ENDDO |
---|
| 172 | ENDDO |
---|
| 173 | |
---|
[771] | 174 | CASE ( 'lpt' ) |
---|
| 175 | DO i = nxlg, nxrg |
---|
| 176 | DO j = nysg, nyng |
---|
| 177 | DO k = nzb, nzt+1 |
---|
[1322] | 178 | lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[771] | 179 | ENDDO |
---|
| 180 | ENDDO |
---|
| 181 | ENDDO |
---|
| 182 | |
---|
[1] | 183 | CASE ( 'lwp*' ) |
---|
[667] | 184 | DO i = nxlg, nxrg |
---|
| 185 | DO j = nysg, nyng |
---|
[1322] | 186 | lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 187 | ENDDO |
---|
| 188 | ENDDO |
---|
| 189 | |
---|
[1551] | 190 | CASE ( 'm_liq_eb*' ) |
---|
| 191 | DO i = nxlg, nxrg |
---|
| 192 | DO j = nysg, nyng |
---|
| 193 | m_liq_eb_av(j,i) = m_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 194 | ENDDO |
---|
| 195 | ENDDO |
---|
| 196 | |
---|
| 197 | CASE ( 'm_soil' ) |
---|
| 198 | DO i = nxlg, nxrg |
---|
| 199 | DO j = nysg, nyng |
---|
| 200 | DO k = nzb_soil, nzt_soil |
---|
| 201 | m_soil_av(k,j,i) = m_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 202 | ENDDO |
---|
| 203 | ENDDO |
---|
| 204 | ENDDO |
---|
| 205 | |
---|
[1053] | 206 | CASE ( 'nr' ) |
---|
| 207 | DO i = nxlg, nxrg |
---|
| 208 | DO j = nysg, nyng |
---|
| 209 | DO k = nzb, nzt+1 |
---|
[1322] | 210 | nr_av(k,j,i) = nr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1053] | 211 | ENDDO |
---|
| 212 | ENDDO |
---|
| 213 | ENDDO |
---|
| 214 | |
---|
[1] | 215 | CASE ( 'p' ) |
---|
[667] | 216 | DO i = nxlg, nxrg |
---|
| 217 | DO j = nysg, nyng |
---|
[1] | 218 | DO k = nzb, nzt+1 |
---|
[1322] | 219 | p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 220 | ENDDO |
---|
| 221 | ENDDO |
---|
| 222 | ENDDO |
---|
| 223 | |
---|
| 224 | CASE ( 'pc' ) |
---|
| 225 | DO i = nxl, nxr |
---|
| 226 | DO j = nys, nyn |
---|
| 227 | DO k = nzb, nzt+1 |
---|
[1322] | 228 | pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 229 | ENDDO |
---|
| 230 | ENDDO |
---|
| 231 | ENDDO |
---|
| 232 | |
---|
| 233 | CASE ( 'pr' ) |
---|
| 234 | DO i = nxl, nxr |
---|
| 235 | DO j = nys, nyn |
---|
| 236 | DO k = nzb, nzt+1 |
---|
[1322] | 237 | pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 238 | ENDDO |
---|
| 239 | ENDDO |
---|
| 240 | ENDDO |
---|
| 241 | |
---|
[72] | 242 | CASE ( 'prr*' ) |
---|
[667] | 243 | DO i = nxlg, nxrg |
---|
| 244 | DO j = nysg, nyng |
---|
[1320] | 245 | precipitation_rate_av(j,i) = precipitation_rate_av(j,i) / & |
---|
[1322] | 246 | REAL( average_count_3d, KIND=wp ) |
---|
[72] | 247 | ENDDO |
---|
| 248 | ENDDO |
---|
| 249 | |
---|
[1] | 250 | CASE ( 'pt' ) |
---|
[667] | 251 | DO i = nxlg, nxrg |
---|
| 252 | DO j = nysg, nyng |
---|
[1] | 253 | DO k = nzb, nzt+1 |
---|
[1322] | 254 | pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 255 | ENDDO |
---|
| 256 | ENDDO |
---|
| 257 | ENDDO |
---|
| 258 | |
---|
| 259 | CASE ( 'q' ) |
---|
[667] | 260 | DO i = nxlg, nxrg |
---|
| 261 | DO j = nysg, nyng |
---|
[1] | 262 | DO k = nzb, nzt+1 |
---|
[1322] | 263 | q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 264 | ENDDO |
---|
| 265 | ENDDO |
---|
| 266 | ENDDO |
---|
[367] | 267 | |
---|
[1115] | 268 | CASE ( 'qc' ) |
---|
| 269 | DO i = nxlg, nxrg |
---|
| 270 | DO j = nysg, nyng |
---|
| 271 | DO k = nzb, nzt+1 |
---|
[1322] | 272 | qc_av(k,j,i) = qc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1115] | 273 | ENDDO |
---|
| 274 | ENDDO |
---|
| 275 | ENDDO |
---|
| 276 | |
---|
[1] | 277 | CASE ( 'ql' ) |
---|
[667] | 278 | DO i = nxlg, nxrg |
---|
| 279 | DO j = nysg, nyng |
---|
[1] | 280 | DO k = nzb, nzt+1 |
---|
[1322] | 281 | ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 282 | ENDDO |
---|
| 283 | ENDDO |
---|
| 284 | ENDDO |
---|
| 285 | |
---|
| 286 | CASE ( 'ql_c' ) |
---|
[667] | 287 | DO i = nxlg, nxrg |
---|
| 288 | DO j = nysg, nyng |
---|
[1] | 289 | DO k = nzb, nzt+1 |
---|
[1322] | 290 | ql_c_av(k,j,i) = ql_c_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 291 | ENDDO |
---|
| 292 | ENDDO |
---|
| 293 | ENDDO |
---|
| 294 | |
---|
| 295 | CASE ( 'ql_v' ) |
---|
[667] | 296 | DO i = nxlg, nxrg |
---|
| 297 | DO j = nysg, nyng |
---|
[1] | 298 | DO k = nzb, nzt+1 |
---|
[1322] | 299 | ql_v_av(k,j,i) = ql_v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 300 | ENDDO |
---|
| 301 | ENDDO |
---|
| 302 | ENDDO |
---|
| 303 | |
---|
| 304 | CASE ( 'ql_vp' ) |
---|
[667] | 305 | DO i = nxlg, nxrg |
---|
| 306 | DO j = nysg, nyng |
---|
[1] | 307 | DO k = nzb, nzt+1 |
---|
[1320] | 308 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) / & |
---|
[1322] | 309 | REAL( average_count_3d, KIND=wp ) |
---|
[1] | 310 | ENDDO |
---|
| 311 | ENDDO |
---|
| 312 | ENDDO |
---|
| 313 | |
---|
[1053] | 314 | CASE ( 'qr' ) |
---|
| 315 | DO i = nxlg, nxrg |
---|
| 316 | DO j = nysg, nyng |
---|
| 317 | DO k = nzb, nzt+1 |
---|
[1322] | 318 | qr_av(k,j,i) = qr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1053] | 319 | ENDDO |
---|
| 320 | ENDDO |
---|
| 321 | ENDDO |
---|
| 322 | |
---|
[1551] | 323 | CASE ( 'qsws_eb*' ) |
---|
| 324 | DO i = nxlg, nxrg |
---|
| 325 | DO j = nysg, nyng |
---|
| 326 | qsws_eb_av(j,i) = qsws_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 327 | ENDDO |
---|
| 328 | ENDDO |
---|
| 329 | |
---|
| 330 | CASE ( 'qsws_liq_eb*' ) |
---|
| 331 | DO i = nxlg, nxrg |
---|
| 332 | DO j = nysg, nyng |
---|
| 333 | qsws_liq_eb_av(j,i) = qsws_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 334 | ENDDO |
---|
| 335 | ENDDO |
---|
| 336 | |
---|
| 337 | CASE ( 'qsws_soil_eb*' ) |
---|
| 338 | DO i = nxlg, nxrg |
---|
| 339 | DO j = nysg, nyng |
---|
| 340 | qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 341 | ENDDO |
---|
| 342 | ENDDO |
---|
| 343 | |
---|
| 344 | CASE ( 'qsws_veg_eb*' ) |
---|
| 345 | DO i = nxlg, nxrg |
---|
| 346 | DO j = nysg, nyng |
---|
| 347 | qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 348 | ENDDO |
---|
| 349 | ENDDO |
---|
| 350 | |
---|
[1] | 351 | CASE ( 'qv' ) |
---|
[667] | 352 | DO i = nxlg, nxrg |
---|
| 353 | DO j = nysg, nyng |
---|
[1] | 354 | DO k = nzb, nzt+1 |
---|
[1322] | 355 | qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 356 | ENDDO |
---|
| 357 | ENDDO |
---|
| 358 | ENDDO |
---|
[367] | 359 | |
---|
[1585] | 360 | CASE ( 'rad_net*' ) |
---|
[1551] | 361 | DO i = nxlg, nxrg |
---|
| 362 | DO j = nysg, nyng |
---|
[1585] | 363 | rad_net_av(j,i) = rad_net_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1551] | 364 | ENDDO |
---|
| 365 | ENDDO |
---|
| 366 | |
---|
[1585] | 367 | CASE ( 'rad_lw_in' ) |
---|
[1551] | 368 | DO i = nxlg, nxrg |
---|
| 369 | DO j = nysg, nyng |
---|
[1585] | 370 | DO k = nzb, nzt+1 |
---|
| 371 | rad_lw_in_av(k,j,i) = rad_lw_in_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 372 | ENDDO |
---|
[1551] | 373 | ENDDO |
---|
| 374 | ENDDO |
---|
| 375 | |
---|
[1585] | 376 | CASE ( 'rad_lw_out' ) |
---|
| 377 | DO i = nxlg, nxrg |
---|
| 378 | DO j = nysg, nyng |
---|
| 379 | DO k = nzb, nzt+1 |
---|
| 380 | rad_lw_out_av(k,j,i) = rad_lw_out_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 381 | ENDDO |
---|
| 382 | ENDDO |
---|
| 383 | ENDDO |
---|
| 384 | |
---|
| 385 | CASE ( 'rad_sw_in' ) |
---|
| 386 | DO i = nxlg, nxrg |
---|
| 387 | DO j = nysg, nyng |
---|
| 388 | DO k = nzb, nzt+1 |
---|
| 389 | rad_sw_in_av(k,j,i) = rad_sw_in_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 390 | ENDDO |
---|
| 391 | ENDDO |
---|
| 392 | ENDDO |
---|
| 393 | |
---|
| 394 | CASE ( 'rad_sw_out' ) |
---|
| 395 | DO i = nxlg, nxrg |
---|
| 396 | DO j = nysg, nyng |
---|
| 397 | DO k = nzb, nzt+1 |
---|
| 398 | rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 399 | ENDDO |
---|
| 400 | ENDDO |
---|
| 401 | ENDDO |
---|
| 402 | |
---|
[1555] | 403 | CASE ( 'r_a*' ) |
---|
| 404 | DO i = nxlg, nxrg |
---|
| 405 | DO j = nysg, nyng |
---|
| 406 | r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 407 | ENDDO |
---|
| 408 | ENDDO |
---|
| 409 | |
---|
| 410 | CASE ( 'r_s*' ) |
---|
| 411 | DO i = nxlg, nxrg |
---|
| 412 | DO j = nysg, nyng |
---|
| 413 | r_s_av(j,i) = r_s_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 414 | ENDDO |
---|
| 415 | ENDDO |
---|
| 416 | |
---|
[96] | 417 | CASE ( 'rho' ) |
---|
[667] | 418 | DO i = nxlg, nxrg |
---|
| 419 | DO j = nysg, nyng |
---|
[96] | 420 | DO k = nzb, nzt+1 |
---|
[1322] | 421 | rho_av(k,j,i) = rho_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[96] | 422 | ENDDO |
---|
| 423 | ENDDO |
---|
| 424 | ENDDO |
---|
[367] | 425 | |
---|
[1] | 426 | CASE ( 's' ) |
---|
[667] | 427 | DO i = nxlg, nxrg |
---|
| 428 | DO j = nysg, nyng |
---|
[1] | 429 | DO k = nzb, nzt+1 |
---|
[1322] | 430 | s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 431 | ENDDO |
---|
| 432 | ENDDO |
---|
| 433 | ENDDO |
---|
[367] | 434 | |
---|
[96] | 435 | CASE ( 'sa' ) |
---|
[667] | 436 | DO i = nxlg, nxrg |
---|
| 437 | DO j = nysg, nyng |
---|
[96] | 438 | DO k = nzb, nzt+1 |
---|
[1322] | 439 | sa_av(k,j,i) = sa_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[96] | 440 | ENDDO |
---|
| 441 | ENDDO |
---|
| 442 | ENDDO |
---|
[367] | 443 | |
---|
[354] | 444 | CASE ( 'shf*' ) |
---|
[667] | 445 | DO i = nxlg, nxrg |
---|
| 446 | DO j = nysg, nyng |
---|
[1322] | 447 | shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[354] | 448 | ENDDO |
---|
| 449 | ENDDO |
---|
[367] | 450 | |
---|
[1] | 451 | CASE ( 't*' ) |
---|
[667] | 452 | DO i = nxlg, nxrg |
---|
| 453 | DO j = nysg, nyng |
---|
[1322] | 454 | ts_av(j,i) = ts_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 455 | ENDDO |
---|
| 456 | ENDDO |
---|
| 457 | |
---|
[1551] | 458 | CASE ( 't_soil' ) |
---|
| 459 | DO i = nxlg, nxrg |
---|
| 460 | DO j = nysg, nyng |
---|
| 461 | DO k = nzb_soil, nzt_soil |
---|
| 462 | t_soil_av(k,j,i) = t_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 463 | ENDDO |
---|
| 464 | ENDDO |
---|
| 465 | ENDDO |
---|
| 466 | |
---|
[1] | 467 | CASE ( 'u' ) |
---|
[667] | 468 | DO i = nxlg, nxrg |
---|
| 469 | DO j = nysg, nyng |
---|
[1] | 470 | DO k = nzb, nzt+1 |
---|
[1322] | 471 | u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 472 | ENDDO |
---|
| 473 | ENDDO |
---|
| 474 | ENDDO |
---|
| 475 | |
---|
| 476 | CASE ( 'u*' ) |
---|
[667] | 477 | DO i = nxlg, nxrg |
---|
| 478 | DO j = nysg, nyng |
---|
[1322] | 479 | us_av(j,i) = us_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 480 | ENDDO |
---|
| 481 | ENDDO |
---|
| 482 | |
---|
| 483 | CASE ( 'v' ) |
---|
[667] | 484 | DO i = nxlg, nxrg |
---|
| 485 | DO j = nysg, nyng |
---|
[1] | 486 | DO k = nzb, nzt+1 |
---|
[1322] | 487 | v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 488 | ENDDO |
---|
| 489 | ENDDO |
---|
| 490 | ENDDO |
---|
| 491 | |
---|
| 492 | CASE ( 'vpt' ) |
---|
[667] | 493 | DO i = nxlg, nxrg |
---|
| 494 | DO j = nysg, nyng |
---|
[1] | 495 | DO k = nzb, nzt+1 |
---|
[1322] | 496 | vpt_av(k,j,i) = vpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 497 | ENDDO |
---|
| 498 | ENDDO |
---|
| 499 | ENDDO |
---|
| 500 | |
---|
| 501 | CASE ( 'w' ) |
---|
[667] | 502 | DO i = nxlg, nxrg |
---|
| 503 | DO j = nysg, nyng |
---|
[1] | 504 | DO k = nzb, nzt+1 |
---|
[1322] | 505 | w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[1] | 506 | ENDDO |
---|
| 507 | ENDDO |
---|
| 508 | ENDDO |
---|
| 509 | |
---|
[72] | 510 | CASE ( 'z0*' ) |
---|
[667] | 511 | DO i = nxlg, nxrg |
---|
| 512 | DO j = nysg, nyng |
---|
[1322] | 513 | z0_av(j,i) = z0_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[72] | 514 | ENDDO |
---|
| 515 | ENDDO |
---|
| 516 | |
---|
[978] | 517 | CASE ( 'z0h*' ) |
---|
| 518 | DO i = nxlg, nxrg |
---|
| 519 | DO j = nysg, nyng |
---|
[1322] | 520 | z0h_av(j,i) = z0h_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[978] | 521 | ENDDO |
---|
| 522 | ENDDO |
---|
| 523 | |
---|
[1] | 524 | CASE DEFAULT |
---|
| 525 | ! |
---|
| 526 | !-- User-defined quantity |
---|
| 527 | CALL user_3d_data_averaging( 'average', doav(ii) ) |
---|
| 528 | |
---|
| 529 | END SELECT |
---|
| 530 | |
---|
| 531 | ENDDO |
---|
| 532 | |
---|
| 533 | ! |
---|
| 534 | !-- Reset the counter |
---|
| 535 | average_count_3d = 0.0 |
---|
| 536 | |
---|
[1318] | 537 | CALL cpu_log( log_point(35), 'average_3d_data', 'stop' ) |
---|
[1] | 538 | |
---|
| 539 | |
---|
| 540 | END SUBROUTINE average_3d_data |
---|