Changeset 3871 for palm/trunk/SOURCE/advec_ws.f90
- Timestamp:
- Apr 8, 2019 2:38:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r3870 r3871 267 267 !> the divergence is not sufficiently reduced, resulting in erroneous fluxes 268 268 !> and could lead to numerical instabilities. 269 !----------------------------------------------------------------------------- !269 !------------------------------------------------------------------------------! 270 270 MODULE advec_ws 271 271 272 USE arrays_3d, & 273 ONLY: ddzu, ddzw, tend, u, v, w, & 274 drho_air, drho_air_zw, rho_air, rho_air_zw, & 275 u_stokes_zu, v_stokes_zu, & 276 diss_l_diss, diss_l_e, diss_l_pt, diss_l_q, & 277 diss_l_s, diss_l_sa, diss_l_u, diss_l_v, diss_l_w, & 278 flux_l_diss, flux_l_e, flux_l_pt, flux_l_q, flux_l_s, & 279 flux_l_sa, flux_l_u, flux_l_v, flux_l_w, & 280 diss_s_diss, diss_s_e, diss_s_pt, diss_s_q, diss_s_s, & 281 diss_s_sa, diss_s_u, diss_s_v, diss_s_w, & 282 flux_s_diss, flux_s_e, flux_s_pt, flux_s_q, flux_s_s, & 283 flux_s_sa, flux_s_u, flux_s_v, flux_s_w 284 285 USE control_parameters, & 286 ONLY: humidity, loop_optimization, passive_scalar, ocean_mode, & 287 rans_tke_e, ws_scheme_mom, ws_scheme_sca, & 288 momentum_advec, scalar_advec, & 289 bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, & 290 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, & 291 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, & 292 u_gtrans, v_gtrans 293 294 USE indices, & 295 ONLY: nbgp, nxl, nxlg, nxlu, nxr, nxrg, nyn, nyng, nys, nysg, nysv, & 296 nzb, nzb_max, nzt, advc_flags_1, advc_flags_2, wall_flags_0 297 298 USE grid_variables, & 299 ONLY: ddx, ddy 300 301 USE pegrid, & 302 ONLY: threads_per_task 303 272 304 USE kinds 305 306 USE statistics, & 307 ONLY: sums_salsa_ws_l, sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, & 308 sums_wspts_ws_l, sums_wsqs_ws_l, sums_wsss_ws_l, & 309 sums_wssas_ws_l, sums_wsus_ws_l, sums_wsvs_ws_l, & 310 sums_wsqcs_ws_l, sums_wsqrs_ws_l, & 311 sums_wsncs_ws_l, sums_wsnrs_ws_l, & 312 hom, weight_substep 273 313 274 314 IMPLICIT NONE … … 326 366 !------------------------------------------------------------------------------! 327 367 SUBROUTINE ws_init 328 329 USE arrays_3d, &330 ONLY: diss_l_diss, diss_l_e, diss_l_pt, &331 diss_l_q, diss_l_s, diss_l_sa, &332 diss_l_u, diss_l_v, diss_l_w, flux_l_diss, flux_l_e, &333 flux_l_pt, flux_l_q, &334 flux_l_s, flux_l_sa, flux_l_u, flux_l_v, &335 flux_l_w, diss_s_diss, diss_s_e, &336 diss_s_pt, diss_s_q, diss_s_s, &337 diss_s_sa, diss_s_u, diss_s_v, diss_s_w, flux_s_diss, &338 flux_s_e, flux_s_pt, flux_s_q, &339 flux_s_s, flux_s_sa, flux_s_u, &340 flux_s_v, flux_s_w341 342 USE control_parameters, &343 ONLY: humidity, loop_optimization, passive_scalar, ocean_mode, &344 rans_tke_e, ws_scheme_mom, ws_scheme_sca, salsa345 346 USE indices, &347 ONLY: nyn, nys, nzb, nzt348 349 USE kinds350 351 USE pegrid352 353 USE salsa_util_mod, &354 ONLY: sums_salsa_ws_l355 356 USE statistics, &357 ONLY: sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l,&358 sums_wspts_ws_l, &359 sums_wsqs_ws_l, sums_wsss_ws_l, &360 sums_wssas_ws_l, sums_wsss_ws_l, sums_wsus_ws_l, &361 sums_wsvs_ws_l362 363 368 364 369 ! … … 406 411 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) ) 407 412 sums_wssas_ws_l = 0.0_wp 408 ENDIF409 410 IF ( salsa ) THEN411 ALLOCATE( sums_salsa_ws_l(nzb:nzt+1,0:threads_per_task-1) )412 sums_salsa_ws_l = 0.0_wp413 413 ENDIF 414 414 … … 492 492 SUBROUTINE ws_init_flags 493 493 494 USE control_parameters, &495 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &496 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &497 bc_radiation_r, bc_radiation_s, momentum_advec, scalar_advec498 499 USE indices, &500 ONLY: advc_flags_1, advc_flags_2, nbgp, nxl, nxlg, nxlu, nxr, nxrg,&501 nyn, nyng, nys, nysg, nysv, nzb, nzt, wall_flags_0502 503 USE kinds504 505 IMPLICIT NONE506 494 507 495 INTEGER(iwp) :: i !< index variable along x … … 1099 1087 !------------------------------------------------------------------------------! 1100 1088 SUBROUTINE ws_statistics 1101 1102 USE control_parameters, & 1103 ONLY: humidity, passive_scalar, ocean_mode, ws_scheme_mom, & 1104 ws_scheme_sca, salsa 1105 1106 USE kinds 1107 1108 USE salsa_util_mod, & 1109 ONLY: sums_salsa_ws_l 1110 1111 USE statistics, & 1112 ONLY: sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, & 1113 sums_wspts_ws_l, & 1114 sums_wsqs_ws_l, sums_wsss_ws_l, & 1115 sums_wssas_ws_l, sums_wsus_ws_l, sums_wsvs_ws_l 1116 1117 1118 IMPLICIT NONE 1119 1120 ! 1089 1090 1091 ! 1121 1092 !-- The arrays needed for statistical evaluation are set to to 0 at the 1122 1093 !-- beginning of prognostic_equations. … … 1139 1110 IF ( passive_scalar ) sums_wsss_ws_l = 0.0_wp 1140 1111 IF ( ocean_mode ) sums_wssas_ws_l = 0.0_wp 1141 IF ( salsa ) sums_salsa_ws_l = 0.0_wp1142 1112 1143 1113 ENDIF … … 1155 1125 swap_diss_x_local, i_omp, tn ) 1156 1126 1157 USE arrays_3d, &1158 ONLY: ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v, &1159 v_stokes_zu, w1160 1161 USE control_parameters, &1162 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &1163 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &1164 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &1165 u_gtrans, v_gtrans1166 1167 USE grid_variables, &1168 ONLY: ddx, ddy1169 1170 USE indices, &1171 ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max, &1172 nzt, advc_flags_11173 1174 USE kinds1175 1176 USE pegrid1177 1178 USE salsa_util_mod, &1179 ONLY: sums_salsa_ws_l1180 1181 USE statistics, &1182 ONLY: hom, sums_wsncs_ws_l, sums_wsnrs_ws_l, sums_wspts_ws_l, &1183 sums_wsqcs_ws_l, sums_wsqrs_ws_l, sums_wsqs_ws_l, &1184 sums_wssas_ws_l, sums_wsss_ws_l, weight_substep1185 1186 1187 IMPLICIT NONE1188 1127 1189 1128 CHARACTER (LEN = *), INTENT(IN) :: sk_char !< string identifier, used for assign fluxes to the correct dimension in the analysis array … … 1821 1760 SUBROUTINE advec_u_ws_ij( i, j, i_omp, tn ) 1822 1761 1823 USE arrays_3d, &1824 ONLY: ddzw, diss_l_u, diss_s_u, flux_l_u, flux_s_u, tend, u, v, w, &1825 drho_air, rho_air_zw1826 1827 USE control_parameters, &1828 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &1829 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &1830 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &1831 u_gtrans, v_gtrans1832 1833 USE grid_variables, &1834 ONLY: ddx, ddy1835 1836 USE indices, &1837 ONLY: nyn, nys, nxl, nxlu, nxr, nzb, nzb_max, nzt, advc_flags_11838 1839 USE kinds1840 1841 USE statistics, &1842 ONLY: hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep1843 1844 IMPLICIT NONE1845 1762 1846 1763 INTEGER(iwp) :: i !< grid index along x-direction … … 2396 2313 SUBROUTINE advec_v_ws_ij( i, j, i_omp, tn ) 2397 2314 2398 USE arrays_3d, &2399 ONLY: ddzw, diss_l_v, diss_s_v, flux_l_v, flux_s_v, tend, u, v, w, &2400 drho_air, rho_air_zw2401 2402 USE control_parameters, &2403 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &2404 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &2405 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &2406 u_gtrans, v_gtrans2407 2408 USE grid_variables, &2409 ONLY: ddx, ddy2410 2411 USE indices, &2412 ONLY: nyn, nys, nysv, nxl, nxr, nzb, nzb_max, nzt, advc_flags_12413 2414 USE kinds2415 2416 USE statistics, &2417 ONLY: hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep2418 2419 IMPLICIT NONE2420 2315 2421 2316 INTEGER(iwp) :: i !< grid index along x-direction … … 2979 2874 SUBROUTINE advec_w_ws_ij( i, j, i_omp, tn ) 2980 2875 2981 USE arrays_3d, &2982 ONLY: ddzu, diss_l_w, diss_s_w, flux_l_w, flux_s_w, tend, u, v, w, &2983 drho_air_zw, rho_air2984 2985 USE control_parameters, &2986 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &2987 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &2988 bc_radiation_r, bc_radiation_s,intermediate_timestep_count, &2989 u_gtrans, v_gtrans2990 2991 USE grid_variables, &2992 ONLY: ddx, ddy2993 2994 USE indices, &2995 ONLY: nyn, nys, nxl, nxr, nzb, nzb_max, nzt, advc_flags_1, &2996 advc_flags_22997 2998 USE kinds2999 3000 USE statistics, &3001 ONLY: hom, sums_ws2_ws_l, weight_substep3002 3003 IMPLICIT NONE3004 2876 3005 2877 INTEGER(iwp) :: i !< grid index along x-direction … … 3535 3407 SUBROUTINE advec_s_ws( sk, sk_char ) 3536 3408 3537 USE arrays_3d, &3538 ONLY: ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v, &3539 v_stokes_zu, w3540 3541 USE control_parameters, &3542 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &3543 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &3544 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &3545 u_gtrans, v_gtrans3546 3547 USE grid_variables, &3548 ONLY: ddx, ddy3549 3550 USE indices, &3551 ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max, &3552 nzt, advc_flags_13553 3554 USE kinds3555 3556 USE salsa_util_mod, &3557 ONLY: sums_salsa_ws_l3558 3559 USE statistics, &3560 ONLY: hom, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l, &3561 sums_wsqcs_ws_l, sums_wsqrs_ws_l, sums_wsncs_ws_l, &3562 sums_wsnrs_ws_l, sums_wsss_ws_l, weight_substep3563 3564 3565 3566 IMPLICIT NONE3567 3409 3568 3410 CHARACTER (LEN = *), INTENT(IN) :: sk_char !< string identifier, used for assign fluxes to the correct dimension in the analysis array … … 4411 4253 SUBROUTINE advec_u_ws 4412 4254 4413 USE arrays_3d, &4414 ONLY: ddzw, drho_air, tend, u, v, w, rho_air_zw4415 4416 USE control_parameters, &4417 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &4418 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &4419 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &4420 u_gtrans, v_gtrans4421 4422 USE grid_variables, &4423 ONLY: ddx, ddy4424 4425 USE indices, &4426 ONLY: nxlu, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_14427 4428 USE kinds4429 4430 USE statistics, &4431 ONLY: hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep4432 4433 IMPLICIT NONE4434 4255 4435 4256 INTEGER(iwp) :: i !< grid index along x-direction … … 5091 4912 SUBROUTINE advec_v_ws 5092 4913 5093 USE arrays_3d, &5094 ONLY: ddzw, drho_air, tend, u, v, w, rho_air_zw5095 5096 USE control_parameters, &5097 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &5098 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &5099 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &5100 u_gtrans, v_gtrans5101 5102 USE grid_variables, &5103 ONLY: ddx, ddy5104 5105 USE indices, &5106 ONLY: nxl, nxr, nyn, nys, nysv, nzb, nzb_max, nzt, advc_flags_15107 5108 USE kinds5109 5110 USE statistics, &5111 ONLY: hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep5112 5113 IMPLICIT NONE5114 5115 4914 5116 4915 INTEGER(iwp) :: i !< grid index along x-direction … … 5777 5576 SUBROUTINE advec_w_ws 5778 5577 5779 USE arrays_3d, &5780 ONLY: ddzu, drho_air_zw, tend, u, v, w, rho_air5781 5782 USE control_parameters, &5783 ONLY: bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, &5784 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, &5785 bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &5786 u_gtrans, v_gtrans5787 5788 USE grid_variables, &5789 ONLY: ddx, ddy5790 5791 USE indices, &5792 ONLY: nxl, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_1, &5793 advc_flags_25794 5795 USE kinds5796 5797 USE statistics, &5798 ONLY: hom, sums_ws2_ws_l, weight_substep5799 5800 IMPLICIT NONE5801 5578 5802 5579 INTEGER(iwp) :: i !< grid index along x-direction
Note: See TracChangeset
for help on using the changeset viewer.