Changeset 2757 for LMDZ5/trunk/libf/phylmd/wake.F90
- Timestamp:
- Jan 10, 2017, 3:30:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/wake.F90
r2671 r2757 171 171 !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, crep_upper, crep_sol) 172 172 173 LOGICAL, SAVE :: flag_wk_check_trgl 174 !$OMP THREADPRIVATE(flag_wk_check_trgl) 175 173 176 REAL :: delta_t_min 174 177 INTEGER :: nsub … … 200 203 REAL, DIMENSION (klon) :: z, dz, hw0 201 204 INTEGER, DIMENSION (klon) :: ktop, kupper 205 206 ! Variables liées au test de la forme triangulaire du profil de Delta_theta 207 REAL, DIMENSION (klon) :: sum_half_dth 208 REAL, DIMENSION (klon) :: dz_half 202 209 203 210 ! Sub-timestep tendencies and related variables … … 321 328 WRITE(*,*) 'wdens_ref=', wdens_ref 322 329 WRITE(*,*) 'coefgw=', coefgw 330 331 flag_wk_check_trgl=.false. 332 CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl) 333 WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl 323 334 324 335 first=.false. … … 824 835 825 836 IF (prt_level>=10) THEN 826 PRINT *, 'wake-4, sigmaw(igout), cstar(igout), wape(igout) ', &827 sigmaw(igout), cstar(igout), wape(igout) 837 PRINT *, 'wake-4, sigmaw(igout), cstar(igout), wape(igout), ktop(igout) ', & 838 sigmaw(igout), cstar(igout), wape(igout), ktop(igout) 828 839 ENDIF 829 840 … … 846 857 END DO 847 858 IF (prt_level>=10) THEN 848 PRINT *, 'wake-4.1, isubstep,wk_adv(igout),cstar(igout),wape(igout) ', &849 isubstep,wk_adv(igout),cstar(igout),wape(igout) 859 PRINT *, 'wake-4.1, isubstep,wk_adv(igout),cstar(igout),wape(igout), ptop(igout) ', & 860 isubstep,wk_adv(igout),cstar(igout),wape(igout), ptop(igout) 850 861 ENDIF 851 862 … … 962 973 IF (prt_level>=10) THEN 963 974 PRINT *, 'wake-4.2, omg(igout,k) ', (k,omg(igout,k), k=1,klev) 964 PRINT *, 'wake-4.2, omgtop(igout) ', omgtop(igout) 975 PRINT *, 'wake-4.2, omgtop(igout), ptop(igout), ktop(igout) ', & 976 omgtop(igout), ptop(igout), ktop(igout) 965 977 ENDIF 966 978 … … 1609 1621 1610 1622 IF (prt_level>=10) THEN 1611 PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout) ', &1612 sigmaw(igout), cstar(igout), wape(igout) 1623 PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout), ptop(igout) ', & 1624 sigmaw(igout), cstar(igout), wape(igout), ptop(igout) 1613 1625 ENDIF 1614 1626 … … 1632 1644 sum_thvu(i) = 0. 1633 1645 sum_dth(i) = 0. 1646 sum_half_dth(i) = 0. 1634 1647 sum_dq(i) = 0. 1635 1648 sum_rho(i) = 0. … … 1646 1659 av_dtdwn(i) = 0. 1647 1660 av_dqdwn(i) = 0. 1661 1662 dthmin(i) = -delta_t_min 1648 1663 END IF 1649 1664 END DO … … 1685 1700 z(i) = 1. 1686 1701 dz(i) = 1. 1702 dz_half(i) = 1. 1687 1703 sum_thvu(i) = thu(i, 1)*(1.+epsim1*qu(i,1))*dz(i) 1688 1704 sum_dth(i) = 0. … … 1696 1712 ! cc 1697 1713 dz(i) = -(amax1(ph(i,k+1),ptop(i))-ph(i,k))/(rho(i,k)*rg) 1714 dz_half(i) = -(amax1(ph(i,k+1),0.5*(ptop(i)+ph(i,1)))-ph(i,k))/(rho(i,k)*rg) 1698 1715 IF (dz(i)>0) THEN 1699 1716 z(i) = z(i) + dz(i) … … 1707 1724 sum_dtdwn(i) = sum_dtdwn(i) + dtdwn(i, k)*dz(i) 1708 1725 sum_dqdwn(i) = sum_dqdwn(i) + dqdwn(i, k)*dz(i) 1726 ! 1727 dthmin(i) = min(dthmin(i), dth(i,k)) 1728 END IF 1729 IF (dz_half(i)>0) THEN 1730 sum_half_dth(i) = sum_half_dth(i) + dth(i, k)*dz_half(i) 1709 1731 END IF 1710 1732 END IF … … 1750 1772 1751 1773 ! Filter out bad wakes 1774 1775 IF (flag_wk_check_trgl) THEN 1776 ! Check triangular shape of dth profile 1777 DO i = 1, klon 1778 IF (ok_qx_qw(i)) THEN 1779 !! print *,'wake, hw0(i), dthmin(i) ', hw0(i), dthmin(i) 1780 !! print *,'wake, 2.*sum_dth(i)/(hw0(i)*dthmin(i)) ', & 1781 !! 2.*sum_dth(i)/(hw0(i)*dthmin(i)) 1782 !! print *,'wake, sum_half_dth(i), sum_dth(i) ', & 1783 !! sum_half_dth(i), sum_dth(i) 1784 IF ((hw0(i) < 1.) .or. (dthmin(i) >= -delta_t_min) ) THEN 1785 wape2(i) = -1. 1786 !! print *,'wake, rej 1' 1787 ELSE IF (abs(2.*sum_dth(i)/(hw0(i)*dthmin(i)) - 1.) > 0.5) THEN 1788 wape2(i) = -1. 1789 !! print *,'wake, rej 2' 1790 ELSE IF (abs(sum_half_dth(i)) < 0.5*abs(sum_dth(i)) ) THEN 1791 wape2(i) = -1. 1792 !! print *,'wake, rej 3' 1793 END IF 1794 END IF 1795 END DO 1796 END IF 1797 1752 1798 1753 1799 DO k = 1, klev
Note: See TracChangeset
for help on using the changeset viewer.