- Timestamp:
- Mar 10, 2015 5:57:55 PM (10 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 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 ! -
palm/trunk/SOURCE/flow_statistics.f90
r1558 r1567 21 21 ! Current revisions: 22 22 ! ----------------- 23 ! 23 ! Reverse modifications made for monotonic limiter. 24 24 ! 25 25 ! Former revisions: … … 146 146 ONLY: average_count_pr, cloud_droplets, cloud_physics, do_sum, & 147 147 dt_3d, g, humidity, icloud_scheme, kappa, large_scale_forcing, & 148 large_scale_subsidence, max_pr_user, message_string, & 149 monotonic_adjustment, ocean, & 148 large_scale_subsidence, max_pr_user, message_string, ocean, & 150 149 passive_scalar, precipitation, simulated_time, & 151 150 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, & … … 285 284 ENDIF 286 285 287 IF ( ws_scheme_sca .AND. .NOT. monotonic_adjustment & 288 .AND. sr == 0 ) THEN 286 IF ( ws_scheme_sca .AND. sr == 0 ) THEN 289 287 290 288 DO i = 0, threads_per_task-1 … … 807 805 !-- but so far there is no other suitable place to calculate) 808 806 IF ( ocean ) THEN 809 IF( .NOT. ws_scheme_sca .OR. monotonic_adjustment .OR. & 810 sr /= 0 ) THEN 807 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 811 808 pts = 0.5_wp * ( sa(k,j,i) - hom(k,1,23,sr) + & 812 809 sa(k+1,j,i) - hom(k+1,1,23,sr) ) … … 859 856 ENDIF 860 857 ELSE 861 IF( .NOT. ws_scheme_sca .OR. monotonic_adjustment .OR. & 862 sr /= 0 ) THEN 858 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 863 859 pts = 0.5_wp * ( vpt(k,j,i) - hom(k,1,44,sr) + & 864 860 vpt(k+1,j,i) - hom(k+1,1,44,sr) ) 865 861 sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) * & 866 862 rmask(j,i,sr) 867 ELSE IF ( ws_scheme_sca .AND. .NOT. monotonic_adjustment & 868 .AND. sr == 0 ) THEN 863 ELSE IF ( ws_scheme_sca .AND. sr == 0 ) THEN 869 864 sums_l(k,46,tn) = ( 1.0_wp + 0.61_wp * & 870 865 hom(k,1,41,sr) ) * & … … 878 873 !-- Passive scalar flux 879 874 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca & 880 .OR. monotonic_adjustment .OR.sr /= 0 ) ) THEN875 .OR. sr /= 0 ) ) THEN 881 876 pts = 0.5_wp * ( q(k,j,i) - hom(k,1,41,sr) + & 882 877 q(k+1,j,i) - hom(k+1,1,41,sr) ) … … 922 917 923 918 ENDIF 924 IF ( .NOT. ws_scheme_sca .OR. monotonic_adjustment .OR.sr /= 0 ) THEN919 IF ( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 925 920 !$OMP DO 926 921 DO i = nxl, nxr … … 1533 1528 ONLY : average_count_pr, cloud_droplets, cloud_physics, do_sum, & 1534 1529 dt_3d, g, humidity, icloud_scheme, kappa, large_scale_forcing, & 1535 large_scale_subsidence, max_pr_user, message_string, & 1536 monotonic_adjustment, ocean, & 1530 large_scale_subsidence, max_pr_user, message_string, ocean, & 1537 1531 passive_scalar, precipitation, simulated_time, & 1538 1532 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, & … … 1672 1666 ENDIF 1673 1667 1674 IF ( ws_scheme_sca .AND. .NOT. monotonic_adjustment .AND.sr == 0 ) THEN1668 IF ( ws_scheme_sca .AND. sr == 0 ) THEN 1675 1669 1676 1670 DO i = 0, threads_per_task-1 … … 2495 2489 IF ( ocean ) THEN 2496 2490 2497 IF( .NOT. ws_scheme_sca .OR. monotonic_adjustment .OR.sr /= 0 ) THEN2491 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 2498 2492 2499 2493 !$acc parallel loop gang present( hom, rflags_invers, rmask, sa, sums_l, w ) create( s1 ) … … 2637 2631 ELSE 2638 2632 2639 IF( .NOT. ws_scheme_sca .OR. monotonic_adjustment.OR. sr /= 0 ) THEN2633 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 2640 2634 2641 2635 !$acc parallel loop gang present( hom, rflags_invers, rmask, sums_l, vpt, w ) create( s1 ) … … 2669 2663 ! 2670 2664 !-- Passive scalar flux 2671 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca .OR. monotonic_adjustment & 2672 .OR. sr /= 0 ) ) THEN 2665 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca .OR. sr /= 0 ) ) THEN 2673 2666 2674 2667 !$acc parallel loop gang present( hom, q, rflags_invers, rmask, sums_l, w ) create( s1 ) … … 2724 2717 ENDIF 2725 2718 2726 IF ( .NOT. ws_scheme_sca .OR. monotonic_adjustment.OR. sr /= 0 ) THEN2719 IF ( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 2727 2720 2728 2721 !$OMP DO
Note: See TracChangeset
for help on using the changeset viewer.