Changeset 1996 for palm/trunk/SOURCE
- Timestamp:
- Aug 18, 2016 11:42:29 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r1961 r1996 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Bugfix concerning calculation of turbulent of turbulent fluxes 22 22 ! 23 23 ! Former revisions: … … 916 916 917 917 USE statistics, & 918 ONLY: sums_wsnrs_ws_l, sums_wspts_ws_l, sums_wsqrs_ws_l,&918 ONLY: hom, sums_wsnrs_ws_l, sums_wspts_ws_l, sums_wsqrs_ws_l, & 919 919 sums_wsqs_ws_l, sums_wssas_ws_l, sums_wsss_ws_l, & 920 920 weight_substep … … 1649 1649 1650 1650 DO k = nzb, nzt 1651 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) + & 1652 ( flux_t(k) + diss_t(k) ) & 1653 * weight_substep(intermediate_timestep_count) 1651 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) + & 1652 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1653 * ( w(k,j,i) - hom(k,1,3,0) ) & 1654 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1655 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1656 ) * weight_substep(intermediate_timestep_count) 1654 1657 ENDDO 1655 1658 … … 1657 1660 1658 1661 DO k = nzb, nzt 1659 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) + & 1660 ( flux_t(k) + diss_t(k) ) & 1661 * weight_substep(intermediate_timestep_count) 1662 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) + & 1663 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1664 * ( w(k,j,i) - hom(k,1,3,0) ) & 1665 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1666 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1667 ) * weight_substep(intermediate_timestep_count) 1662 1668 ENDDO 1663 1669 … … 1665 1671 1666 1672 DO k = nzb, nzt 1667 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) + & 1668 ( flux_t(k) + diss_t(k) ) & 1669 * weight_substep(intermediate_timestep_count) 1673 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) + & 1674 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1675 * ( w(k,j,i) - hom(k,1,3,0) ) & 1676 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1677 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1678 ) * weight_substep(intermediate_timestep_count) 1670 1679 ENDDO 1671 1680 … … 1673 1682 1674 1683 DO k = nzb, nzt 1675 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) + & 1676 ( flux_t(k) + diss_t(k) ) & 1677 * weight_substep(intermediate_timestep_count) 1684 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) + & 1685 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1686 * ( w(k,j,i) - hom(k,1,3,0) ) & 1687 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1688 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1689 ) * weight_substep(intermediate_timestep_count) 1678 1690 ENDDO 1679 1691 … … 1681 1693 1682 1694 DO k = nzb, nzt 1683 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) + & 1684 ( flux_t(k) + diss_t(k) ) & 1685 * weight_substep(intermediate_timestep_count) 1695 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) + & 1696 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1697 * ( w(k,j,i) - hom(k,1,3,0) ) & 1698 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1699 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1700 ) * weight_substep(intermediate_timestep_count) 1686 1701 ENDDO 1687 1702 … … 1689 1704 1690 1705 DO k = nzb, nzt 1691 sums_wsss_ws_l(k,tn) = sums_wsss_ws_l(k,tn) + & 1692 ( flux_t(k) + diss_t(k) ) & 1693 * weight_substep(intermediate_timestep_count) 1706 sums_wsss_ws_l(k,tn) = sums_wsss_ws_l(k,tn) + & 1707 ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 1708 * ( w(k,j,i) - hom(k,1,3,0) ) & 1709 + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 1710 * ABS( w(k,j,i) - hom(k,1,3,0) ) & 1711 ) * weight_substep(intermediate_timestep_count) 1694 1712 ENDDO 1695 1713 … … 2049 2067 !-- Statistical Evaluation of u'u'. The factor has to be applied for 2050 2068 !-- right evaluation when gallilei_trans = .T. . 2051 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) &2052 + ( flux_r(k) *&2053 ( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&2054 / ( u_comp(k) - gu + 1.0E-20_wp )&2055 + diss_r(k) *&2056 ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&2057 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) )&2058 2069 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) & 2070 + ( flux_r(k) & 2071 * ( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 2072 / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) ) & 2073 + diss_r(k) & 2074 * ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 2075 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) & 2076 ) * weight_substep(intermediate_timestep_count) 2059 2077 ! 2060 2078 !-- Statistical Evaluation of w'u'. 2061 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 2062 + ( flux_t(k) + diss_t(k) ) & 2063 * weight_substep(intermediate_timestep_count) 2079 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 2080 + ( flux_t(k) & 2081 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2082 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 2083 + diss_t(k) & 2084 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2085 / ( ABS( w_comp ) + 1.0E-20_wp ) & 2086 ) * weight_substep(intermediate_timestep_count) 2064 2087 ENDDO 2065 2088 … … 2071 2094 - 8.0_wp * ( u(k,j,i+2) + u(k,j,i-1) ) & 2072 2095 + ( u(k,j,i+3) + u(k,j,i-2) ) ) * adv_mom_5 2073 diss_r(k) = - ABS( u_comp(k) - gu ) * (&2096 diss_r(k) = - ABS( u_comp(k) - gu ) * ( & 2074 2097 10.0_wp * ( u(k,j,i+1) - u(k,j,i) ) & 2075 2098 - 5.0_wp * ( u(k,j,i+2) - u(k,j,i-1) ) & 2076 2099 + ( u(k,j,i+3) - u(k,j,i-2) ) ) * adv_mom_5 2077 2100 2078 2079 flux_n(k) = v_comp * (&2101 v_comp = v(k,j+1,i) + v(k,j+1,i-1) - gv 2102 flux_n(k) = v_comp * ( & 2080 2103 37.0_wp * ( u(k,j+1,i) + u(k,j,i) ) & 2081 2104 - 8.0_wp * ( u(k,j+2,i) + u(k,j-1,i) ) & 2082 2105 + ( u(k,j+3,i) + u(k,j-2,i) ) ) * adv_mom_5 2083 diss_n(k) = - ABS( v_comp ) * (&2106 diss_n(k) = - ABS( v_comp ) * ( & 2084 2107 10.0_wp * ( u(k,j+1,i) - u(k,j,i) ) & 2085 2108 - 5.0_wp * ( u(k,j+2,i) - u(k,j-1,i) ) & … … 2153 2176 !-- Statistical Evaluation of u'u'. The factor has to be applied for 2154 2177 !-- right evaluation when gallilei_trans = .T. . 2155 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) &2156 + ( flux_r(k) *&2157 ( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&2158 / ( u_comp(k) - gu + 1.0E-20_wp )&2159 + diss_r(k) *&2160 ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&2161 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) )&2162 2178 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) & 2179 + ( flux_r(k) & 2180 * ( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 2181 / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) ) & 2182 + diss_r(k) & 2183 * ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 2184 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) & 2185 ) * weight_substep(intermediate_timestep_count) 2163 2186 ! 2164 2187 !-- Statistical Evaluation of w'u'. 2165 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 2166 + ( flux_t(k) + diss_t(k) ) & 2167 * weight_substep(intermediate_timestep_count) 2188 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 2189 + ( flux_t(k) & 2190 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2191 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 2192 + diss_t(k) & 2193 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2194 / ( ABS( w_comp ) + 1.0E-20_wp ) & 2195 ) * weight_substep(intermediate_timestep_count) 2168 2196 ENDDO 2169 2197 … … 2530 2558 !-- Statistical Evaluation of v'v'. The factor has to be applied for 2531 2559 !-- right evaluation when gallilei_trans = .T. . 2532 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 2533 + ( flux_n(k) & 2534 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2535 / ( v_comp(k) - gv + 1.0E-20_wp ) & 2536 + diss_n(k) & 2537 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2538 / ( ABS( v_comp(k) - gv ) +1.0E-20_wp ) ) & 2539 * weight_substep(intermediate_timestep_count) 2540 ! 2541 !-- Statistical Evaluation of w'v'. 2542 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 2543 + ( flux_t(k) + diss_t(k) ) & 2544 * weight_substep(intermediate_timestep_count) 2560 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 2561 + ( flux_n(k) & 2562 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2563 / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) ) & 2564 + diss_n(k) & 2565 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2566 / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp ) & 2567 ) * weight_substep(intermediate_timestep_count) 2568 ! 2569 !-- Statistical Evaluation of w'u'. 2570 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 2571 + ( flux_t(k) & 2572 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2573 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 2574 + diss_t(k) & 2575 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2576 / ( ABS( w_comp ) + 1.0E-20_wp ) & 2577 ) * weight_substep(intermediate_timestep_count) 2545 2578 2546 2579 ENDDO … … 2639 2672 !-- Statistical Evaluation of v'v'. The factor has to be applied for 2640 2673 !-- right evaluation when gallilei_trans = .T. . 2641 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 2642 + ( flux_n(k) & 2643 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2644 / ( v_comp(k) - gv + 1.0E-20_wp ) & 2645 + diss_n(k) & 2646 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2647 / ( ABS( v_comp(k) - gv ) +1.0E-20_wp ) ) & 2648 * weight_substep(intermediate_timestep_count) 2649 ! 2650 !-- Statistical Evaluation of w'v'. 2651 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 2652 + ( flux_t(k) + diss_t(k) ) & 2653 * weight_substep(intermediate_timestep_count) 2674 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 2675 + ( flux_n(k) & 2676 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2677 / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) ) & 2678 + diss_n(k) & 2679 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 2680 / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp ) & 2681 ) * weight_substep(intermediate_timestep_count) 2682 ! 2683 !-- Statistical Evaluation of w'u'. 2684 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 2685 + ( flux_t(k) & 2686 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2687 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 2688 + diss_t(k) & 2689 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 2690 / ( ABS( w_comp ) + 1.0E-20_wp ) & 2691 ) * weight_substep(intermediate_timestep_count) 2654 2692 2655 2693 ENDDO … … 3013 3051 diss_d = diss_t(k) 3014 3052 ! 3015 !-- 3053 !-- Statistical Evaluation of w'w'. 3016 3054 sums_ws2_ws_l(k,tn) = sums_ws2_ws_l(k,tn) & 3017 + ( flux_t(k) + diss_t(k) ) & 3018 * weight_substep(intermediate_timestep_count) 3055 + ( flux_t(k) & 3056 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 3057 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 3058 + diss_t(k) & 3059 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 3060 / ( ABS( w_comp ) + 1.0E-20_wp ) & 3061 ) * weight_substep(intermediate_timestep_count) 3019 3062 3020 3063 ENDDO … … 3109 3152 diss_d = diss_t(k) 3110 3153 ! 3111 !-- 3154 !-- Statistical Evaluation of w'w'. 3112 3155 sums_ws2_ws_l(k,tn) = sums_ws2_ws_l(k,tn) & 3113 + ( flux_t(k) + diss_t(k) ) & 3114 * weight_substep(intermediate_timestep_count) 3156 + ( flux_t(k) & 3157 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 3158 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 3159 + diss_t(k) & 3160 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 3161 / ( ABS( w_comp ) + 1.0E-20_wp ) & 3162 ) * weight_substep(intermediate_timestep_count) 3115 3163 3116 3164 ENDDO … … 3147 3195 3148 3196 USE statistics, & 3149 ONLY: sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l,&3197 ONLY: hom, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l, & 3150 3198 sums_wsqrs_ws_l, sums_wsnrs_ws_l, sums_wsss_ws_l, & 3151 3199 weight_substep … … 3867 3915 CASE ( 'pt' ) 3868 3916 DO k = nzb, nzt 3869 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) & 3870 + ( flux_t(k) + diss_t(k) ) & 3871 * weight_substep(intermediate_timestep_count) 3917 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) & 3918 + ( flux_t(k) & 3919 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3920 * ( w(k,j,i) - hom(k,1,3,0) ) & 3921 + diss_t(k) & 3922 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3923 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3924 ) * weight_substep(intermediate_timestep_count) 3872 3925 ENDDO 3873 3926 CASE ( 'sa' ) 3874 3927 DO k = nzb, nzt 3875 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) & 3876 + ( flux_t(k) + diss_t(k) ) & 3877 * weight_substep(intermediate_timestep_count) 3928 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) & 3929 + ( flux_t(k) & 3930 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3931 * ( w(k,j,i) - hom(k,1,3,0) ) & 3932 + diss_t(k) & 3933 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3934 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3935 ) * weight_substep(intermediate_timestep_count) 3878 3936 ENDDO 3879 3937 CASE ( 'q' ) 3880 3938 DO k = nzb, nzt 3881 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) & 3882 + ( flux_t(k) + diss_t(k) ) & 3883 * weight_substep(intermediate_timestep_count) 3939 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) & 3940 + ( flux_t(k) & 3941 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3942 * ( w(k,j,i) - hom(k,1,3,0) ) & 3943 + diss_t(k) & 3944 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3945 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3946 ) * weight_substep(intermediate_timestep_count) 3884 3947 ENDDO 3885 3948 CASE ( 'qr' ) 3886 3949 DO k = nzb, nzt 3887 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) & 3888 + ( flux_t(k) + diss_t(k) ) & 3889 * weight_substep(intermediate_timestep_count) 3950 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) & 3951 + ( flux_t(k) & 3952 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3953 * ( w(k,j,i) - hom(k,1,3,0) ) & 3954 + diss_t(k) & 3955 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3956 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3957 ) * weight_substep(intermediate_timestep_count) 3890 3958 ENDDO 3891 3959 CASE ( 'nr' ) 3892 3960 DO k = nzb, nzt 3893 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) & 3894 + ( flux_t(k) + diss_t(k) ) & 3895 * weight_substep(intermediate_timestep_count) 3961 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) & 3962 + ( flux_t(k) & 3963 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3964 * ( w(k,j,i) - hom(k,1,3,0) ) & 3965 + diss_t(k) & 3966 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3967 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3968 ) * weight_substep(intermediate_timestep_count) 3896 3969 ENDDO 3897 3970 CASE ( 's' ) 3898 3971 DO k = nzb, nzt 3899 sums_wsss_ws_l(k,tn) = sums_wsss_ws_l(k,tn) & 3900 + ( flux_t(k) + diss_t(k) ) & 3901 * weight_substep(intermediate_timestep_count) 3972 sums_wsss_ws_l(k,tn) = sums_wsss_ws_l(k,tn) & 3973 + ( flux_t(k) & 3974 / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) ) & 3975 * ( w(k,j,i) - hom(k,1,3,0) ) & 3976 + diss_t(k) & 3977 / ( ABS(w(k,j,i)) + 1.0E-20_wp ) & 3978 * ABS(w(k,j,i) - hom(k,1,3,0) ) & 3979 ) * weight_substep(intermediate_timestep_count) 3902 3980 ENDDO 3903 3981 … … 4772 4850 !-- Statistical Evaluation of u'u'. The factor has to be applied 4773 4851 !-- for right evaluation when gallilei_trans = .T. . 4774 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) &4775 + ( flux_r(k) *&4776 ( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&4777 / ( u_comp(k) - gu + 1.0E-20_wp )&4778 + diss_r(k) *&4779 ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) )&4780 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) )&4781 4852 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) & 4853 + ( flux_r(k) & 4854 * ( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4855 / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) ) & 4856 + diss_r(k) & 4857 * ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4858 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) & 4859 ) * weight_substep(intermediate_timestep_count) 4782 4860 ! 4783 4861 !-- Statistical Evaluation of w'u'. 4784 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 4785 + ( flux_t(k) + diss_t(k) ) & 4786 * weight_substep(intermediate_timestep_count) 4862 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 4863 + ( flux_t(k) & 4864 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 4865 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 4866 + diss_t(k) & 4867 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 4868 / ( ABS( w_comp ) + 1.0E-20_wp ) & 4869 ) * weight_substep(intermediate_timestep_count) 4870 4787 4871 ENDDO 4788 4872 … … 4859 4943 ) * 0.5_wp 4860 4944 4861 tend(k,j,i) = tend(k,j,i) - (&4945 tend(k,j,i) = tend(k,j,i) - ( & 4862 4946 ( flux_r(k) + diss_r(k) & 4863 4947 - swap_flux_x_local_u(k,j) - swap_diss_x_local_u(k,j) ) * ddx & … … 4869 4953 ) + div * u(k,j,i) 4870 4954 4871 swap_flux_x_local_u(k,j) = flux_r(k) 4872 swap_diss_x_local_u(k,j) = diss_r(k) 4873 swap_flux_y_local_u(k) = flux_n(k) 4874 swap_diss_y_local_u(k) = diss_n(k) 4875 flux_d = flux_t(k) 4876 diss_d = diss_t(k) 4877 ! 4878 !-- Statistical Evaluation of u'u'. The factor has to be applied 4879 !-- for right evaluation when gallilei_trans = .T. . 4880 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) & 4881 + ( flux_r(k) * & 4882 ( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4883 / ( u_comp(k) - gu + 1.0E-20_wp ) & 4884 + diss_r(k) * & 4885 ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4886 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) ) & 4887 * weight_substep(intermediate_timestep_count) 4888 ! 4889 !-- Statistical Evaluation of w'u'. 4890 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 4891 + ( flux_t(k) + diss_t(k) ) & 4892 * weight_substep(intermediate_timestep_count) 4893 ENDDO 4955 swap_flux_x_local_u(k,j) = flux_r(k) 4956 swap_diss_x_local_u(k,j) = diss_r(k) 4957 swap_flux_y_local_u(k) = flux_n(k) 4958 swap_diss_y_local_u(k) = diss_n(k) 4959 flux_d = flux_t(k) 4960 diss_d = diss_t(k) 4961 ! 4962 !-- Statistical Evaluation of u'u'. The factor has to be applied 4963 !-- for right evaluation when gallilei_trans = .T. . 4964 sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn) & 4965 + ( flux_r(k) & 4966 * ( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4967 / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) ) & 4968 + diss_r(k) & 4969 * ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0) ) & 4970 / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp ) & 4971 ) * weight_substep(intermediate_timestep_count) 4972 ! 4973 !-- Statistical Evaluation of w'u'. 4974 sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn) & 4975 + ( flux_t(k) & 4976 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 4977 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 4978 + diss_t(k) & 4979 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 4980 / ( ABS( w_comp ) + 1.0E-20_wp ) & 4981 ) * weight_substep(intermediate_timestep_count) 4982 ENDDO 4894 4983 ENDDO 4895 4984 ENDDO … … 5619 5708 !-- Statistical Evaluation of v'v'. The factor has to be applied 5620 5709 !-- for right evaluation when gallilei_trans = .T. . 5621 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 5622 + ( flux_n(k) & 5623 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5624 / ( v_comp(k) - gv + 1.0E-20_wp ) & 5625 + diss_n(k) & 5626 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5627 / ( ABS( v_comp(k) - gv ) +1.0E-20_wp ) ) & 5628 * weight_substep(intermediate_timestep_count) 5629 ! 5630 !-- Statistical Evaluation of w'v'. 5631 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 5632 + ( flux_t(k) + diss_t(k) ) & 5633 * weight_substep(intermediate_timestep_count) 5710 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 5711 + ( flux_n(k) & 5712 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5713 / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) ) & 5714 + diss_n(k) & 5715 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5716 / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp ) & 5717 ) * weight_substep(intermediate_timestep_count) 5718 ! 5719 !-- Statistical Evaluation of w'u'. 5720 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 5721 + ( flux_t(k) & 5722 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 5723 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 5724 + diss_t(k) & 5725 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 5726 / ( ABS( w_comp ) + 1.0E-20_wp ) & 5727 ) * weight_substep(intermediate_timestep_count) 5634 5728 5635 5729 ENDDO … … 5732 5826 !-- Statistical Evaluation of v'v'. The factor has to be applied 5733 5827 !-- for right evaluation when gallilei_trans = .T. . 5734 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) &5735 + ( flux_n(k)&5736 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) )&5737 / ( v_comp(k) - gv + 1.0E-20_wp )&5738 + diss_n(k)&5739 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) )&5740 / ( ABS( v_comp(k) - gv ) +1.0E-20_wp ) )&5741 5742 ! 5743 !-- Statistical Evaluation of w' v'.5828 sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn) & 5829 + ( flux_n(k) & 5830 * ( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5831 / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) ) & 5832 + diss_n(k) & 5833 * ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0) ) & 5834 / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp ) & 5835 ) * weight_substep(intermediate_timestep_count) 5836 ! 5837 !-- Statistical Evaluation of w'u'. 5744 5838 sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn) & 5745 + ( flux_t(k) + diss_t(k) ) & 5746 * weight_substep(intermediate_timestep_count) 5839 + ( flux_t(k) & 5840 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 5841 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 5842 + diss_t(k) & 5843 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 5844 / ( ABS( w_comp ) + 1.0E-20_wp ) & 5845 ) * weight_substep(intermediate_timestep_count) 5747 5846 5748 5847 ENDDO … … 6481 6580 6482 6581 sums_ws2_ws_l(k,tn) = sums_ws2_ws_l(k,tn) & 6483 + ( flux_t(k) + diss_t(k) ) & 6484 * weight_substep(intermediate_timestep_count) 6582 + ( flux_t(k) & 6583 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 6584 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 6585 + diss_t(k) & 6586 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 6587 / ( ABS( w_comp ) + 1.0E-20_wp ) & 6588 ) * weight_substep(intermediate_timestep_count) 6485 6589 6486 6590 ENDDO … … 6580 6684 6581 6685 sums_ws2_ws_l(k,tn) = sums_ws2_ws_l(k,tn) & 6582 + ( flux_t(k) + diss_t(k) ) & 6583 * weight_substep(intermediate_timestep_count) 6686 + ( flux_t(k) & 6687 * ( w_comp - 2.0_wp * hom(k,1,3,0) ) & 6688 / ( w_comp + SIGN( 1.0E-20_wp, w_comp ) ) & 6689 + diss_t(k) & 6690 * ABS( w_comp - 2.0_wp * hom(k,1,3,0) ) & 6691 / ( ABS( w_comp ) + 1.0E-20_wp ) & 6692 ) * weight_substep(intermediate_timestep_count) 6584 6693 6585 6694 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.