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