Changeset 1567 for palm/trunk/SOURCE/advec_ws.f90
- Timestamp:
- Mar 10, 2015 5:57:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r1563 r1567 20 20 ! Current revisions: 21 21 ! ------------------ 22 22 ! Bugfixes in monotonic limiter. 23 23 ! 24 24 ! Former revisions: … … 825 825 ! 826 826 !-- Calculate empirical limiter function (van Albada2 limiter). 827 phi_l = MIN( 1.0_wp, ( 2.0_wp * rl ) /&827 phi_l = MIN( 1.0_wp, ( 2.0_wp * ABS( rl ) ) / & 828 828 ( rl**2 + 1.0_wp ) ) 829 phi_r = MIN( 1.0_wp, ( 2.0_wp * rr ) /&829 phi_r = MIN( 1.0_wp, ( 2.0_wp * ABS( rr ) ) / & 830 830 ( rr**2 + 1.0_wp ) ) 831 phi_s = MIN( 1.0_wp, ( 2.0_wp * rs ) /&831 phi_s = MIN( 1.0_wp, ( 2.0_wp * ABS( rs ) ) / & 832 832 ( rs**2 + 1.0_wp ) ) 833 phi_n = MIN( 1.0_wp, ( 2.0_wp * rn ) /&833 phi_n = MIN( 1.0_wp, ( 2.0_wp * ABS( rn ) ) / & 834 834 ( rn**2 + 1.0_wp ) ) 835 phi_d = MIN( 1.0_wp, ( 2.0_wp * rd ) /&835 phi_d = MIN( 1.0_wp, ( 2.0_wp * ABS( rd ) ) / & 836 836 ( rd**2 + 1.0_wp ) ) 837 phi_t = MIN( 1.0_wp, ( 2.0_wp * rt ) /&837 phi_t = MIN( 1.0_wp, ( 2.0_wp * ABS( rt ) ) / & 838 838 ( rt**2 + 1.0_wp ) ) 839 839 ! … … 847 847 flux_n(k) = fn_1 - phi_n * & 848 848 ( fn_1 - flux_n(k) ) 849 flux_d = fd_1 !- phi_d * &850 !( fd_1 - flux_d )851 flux_t(k) = ft_1 !- phi_t * &852 !( ft_1 - flux_t(k) )849 flux_d = fd_1 - phi_d * & 850 ( fd_1 - flux_d ) 851 flux_t(k) = ft_1 - phi_t * & 852 ( ft_1 - flux_t(k) ) 853 853 ! 854 854 !-- Moreover, modify dissipation flux according to the limiter. … … 857 857 swap_diss_y_local(k,tn) = swap_diss_y_local(k,tn) * phi_s 858 858 diss_n(k) = diss_n(k) * phi_n 859 diss_d = 0.0 !diss_d * phi_d860 diss_t(k) = 0.0 !diss_t(k) * phi_t859 diss_d = diss_d * phi_d 860 diss_t(k) = diss_t(k) * phi_t 861 861 862 862 ENDIF … … 1054 1054 ! 1055 1055 !-- Calculate empirical limiter function (van Albada2 limiter). 1056 phi_l = MIN( 1.0_wp, ( 2.0_wp * rl ) /&1056 phi_l = MIN( 1.0_wp, ( 2.0_wp * ABS( rl ) ) / & 1057 1057 ( rl**2 + 1.0_wp ) ) 1058 phi_r = MIN( 1.0_wp, ( 2.0_wp * rr ) /&1058 phi_r = MIN( 1.0_wp, ( 2.0_wp * ABS( rr ) ) / & 1059 1059 ( rr**2 + 1.0_wp ) ) 1060 phi_s = MIN( 1.0_wp, ( 2.0_wp * rs ) /&1060 phi_s = MIN( 1.0_wp, ( 2.0_wp * ABS( rs ) ) / & 1061 1061 ( rs**2 + 1.0_wp ) ) 1062 phi_n = MIN( 1.0_wp, ( 2.0_wp * rn ) /&1062 phi_n = MIN( 1.0_wp, ( 2.0_wp * ABS( rn ) ) / & 1063 1063 ( rn**2 + 1.0_wp ) ) 1064 phi_d = MIN( 1.0_wp, ( 2.0_wp * rd ) /&1064 phi_d = MIN( 1.0_wp, ( 2.0_wp * ABS( rd ) ) / & 1065 1065 ( rd**2 + 1.0_wp ) ) 1066 phi_t = MIN( 1.0_wp, ( 2.0_wp * rt ) /&1066 phi_t = MIN( 1.0_wp, ( 2.0_wp * ABS( rt ) ) / & 1067 1067 ( rt**2 + 1.0_wp ) ) 1068 1068 ! … … 1130 1130 ( flux_t(k) + diss_t(k) ) & 1131 1131 * weight_substep(intermediate_timestep_count) 1132 ENDDO1132 ENDDO 1133 1133 1134 1134 CASE ( 'sa' ) … … 2961 2961 ! 2962 2962 !-- Calculate empirical limiter function (van Albada2 limiter). 2963 phi_l = MIN( 1.0_wp, ( 2.0_wp * rl ) /&2963 phi_l = MIN( 1.0_wp, ( 2.0_wp * ABS( rl ) ) / & 2964 2964 ( rl**2 + 1.0_wp ) ) 2965 phi_r = MIN( 1.0_wp, ( 2.0_wp * rr ) /&2965 phi_r = MIN( 1.0_wp, ( 2.0_wp * ABS( rr ) ) / & 2966 2966 ( rr**2 + 1.0_wp ) ) 2967 phi_s = MIN( 1.0_wp, ( 2.0_wp * rs ) /&2967 phi_s = MIN( 1.0_wp, ( 2.0_wp * ABS( rs ) ) / & 2968 2968 ( rs**2 + 1.0_wp ) ) 2969 phi_n = MIN( 1.0_wp, ( 2.0_wp * rn ) /&2969 phi_n = MIN( 1.0_wp, ( 2.0_wp * ABS( rn ) ) / & 2970 2970 ( rn**2 + 1.0_wp ) ) 2971 phi_d = MIN( 1.0_wp, ( 2.0_wp * rd ) /&2971 phi_d = MIN( 1.0_wp, ( 2.0_wp * ABS( rd ) ) / & 2972 2972 ( rd**2 + 1.0_wp ) ) 2973 phi_t = MIN( 1.0_wp, ( 2.0_wp * rt ) /&2973 phi_t = MIN( 1.0_wp, ( 2.0_wp * ABS( rt ) ) / & 2974 2974 ( rt**2 + 1.0_wp ) ) 2975 2975 ! … … 3186 3186 ! 3187 3187 !-- Calculate empirical limiter function (van Albada2 limiter). 3188 phi_l = MIN( 1.0_wp, ( 2.0_wp * rl ) /&3188 phi_l = MIN( 1.0_wp, ( 2.0_wp * ABS( rl ) ) / & 3189 3189 ( rl**2 + 1.0_wp ) ) 3190 phi_r = MIN( 1.0_wp, ( 2.0_wp * rr ) /&3190 phi_r = MIN( 1.0_wp, ( 2.0_wp * ABS( rr ) ) / & 3191 3191 ( rr**2 + 1.0_wp ) ) 3192 phi_s = MIN( 1.0_wp, ( 2.0_wp * rs ) /&3192 phi_s = MIN( 1.0_wp, ( 2.0_wp * ABS( rs ) ) / & 3193 3193 ( rs**2 + 1.0_wp ) ) 3194 phi_n = MIN( 1.0_wp, ( 2.0_wp * rn ) /&3194 phi_n = MIN( 1.0_wp, ( 2.0_wp * ABS( rn ) ) / & 3195 3195 ( rn**2 + 1.0_wp ) ) 3196 phi_d = MIN( 1.0_wp, ( 2.0_wp * rd ) /&3196 phi_d = MIN( 1.0_wp, ( 2.0_wp * ABS( rd ) ) / & 3197 3197 ( rd**2 + 1.0_wp ) ) 3198 phi_t = MIN( 1.0_wp, ( 2.0_wp * rt ) /&3198 phi_t = MIN( 1.0_wp, ( 2.0_wp * ABS( rt ) ) / & 3199 3199 ( rt**2 + 1.0_wp ) ) 3200 3200 ! … … 3699 3699 ! 3700 3700 !-- Calculate empirical limiter function (van Albada2 limiter). 3701 phi_l = MIN( 1.0_wp, ( 2.0_wp * rl ) /&3701 phi_l = MIN( 1.0_wp, ( 2.0_wp * ABS( rl ) ) / & 3702 3702 ( rl**2 + 1.0_wp ) ) 3703 phi_r = MIN( 1.0_wp, ( 2.0_wp * rr ) /&3703 phi_r = MIN( 1.0_wp, ( 2.0_wp * ABS( rr ) ) / & 3704 3704 ( rr**2 + 1.0_wp ) ) 3705 phi_s = MIN( 1.0_wp, ( 2.0_wp * rs ) /&3705 phi_s = MIN( 1.0_wp, ( 2.0_wp * ABS( rs ) ) / & 3706 3706 ( rs**2 + 1.0_wp ) ) 3707 phi_n = MIN( 1.0_wp, ( 2.0_wp * rn ) /&3707 phi_n = MIN( 1.0_wp, ( 2.0_wp * ABS( rn ) ) / & 3708 3708 ( rn**2 + 1.0_wp ) ) 3709 phi_d = MIN( 1.0_wp, ( 2.0_wp * rd ) /&3709 phi_d = MIN( 1.0_wp, ( 2.0_wp * ABS( rd ) ) / & 3710 3710 ( rd**2 + 1.0_wp ) ) 3711 phi_t = MIN( 1.0_wp, ( 2.0_wp * rt ) /&3711 phi_t = MIN( 1.0_wp, ( 2.0_wp * ABS( rt ) ) / & 3712 3712 ( rt**2 + 1.0_wp ) ) 3713 3713 !
Note: See TracChangeset
for help on using the changeset viewer.