Changeset 265 in lmdz_wrf for trunk/WRFV3/lmdz/cv3_routines.F90
- Timestamp:
- Feb 24, 2015, 3:26:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WRFV3/lmdz/cv3_routines.F90
r1 r265 1601 1601 logical lwork(nloc) 1602 1602 1603 ! L. Fita, LMD. February 2015. 1604 INTEGER :: kl,kl2 1605 CHARACTER(LEN=50) :: errmsg, fname 1606 1607 errmsg = 'ERROR -- error -- ERROR -- error' 1608 fname = 'cv3_mixing' 1609 1610 1603 1611 !c===================================================================== 1604 1612 !c --- INITIALIZE VARIOUS ARRAYS USED IN THE COMPUTATIONS … … 1694 1702 sij(il,i,j)=amin1(1.0,sij(il,i,j)) 1695 1703 endif ! new 1704 ! L. Fita, LMD. Feburary 2015, Checkings... 1705 IF (ment(il,i,j) > 10.) THEN 1706 PRINT *,TRIM(errmsg) 1707 PRINT *,' ' // TRIM(fname) // ' ** after first computation ' 1708 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,j), & 1709 ' value at ',il,', ',i,', ',j,' ! (< 10.) !!' 1710 PRINT *,' m(i) sij(i,j) anum denom h(j) hp(i) t(j) rti rr(j) __________' 1711 PRINT *,m(il,i),sij(il,i,j),anum,denom,h(il,j),hp(il,i),t(il,j),rti, & 1712 rr(il,j) 1713 END IF 1696 1714 700 continue 1697 1715 710 continue … … 1726 1744 !cMAF sij(il,i,i)=1.0 1727 1745 sij(il,i,i)=0.0 1746 ! L. Fita, LMD. Feburary 2015, Checkings... 1747 IF (ment(il,i,i) > 10.) THEN 1748 PRINT *,TRIM(errmsg) 1749 PRINT *,' ' // TRIM(fname) // ' ** after detrained flux ' 1750 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,i), ' value at ',& 1751 il,', ',i,', ',i,' ! (< 10.) !!' 1752 PRINT *,' m(i) _________________' 1753 PRINT *,m(il,i) 1754 END IF 1728 1755 end if 1729 1756 740 continue … … 1829 1856 asij(il)=asij(il)+wgh*(delp+delm) 1830 1857 ment(il,i,j)=ment(il,i,j)*(delp+delm)*wgh 1858 ! L. Fita, LMD. Feburary 2015, Checkings... 1859 IF (ment(il,i,j) > 10.) THEN 1860 PRINT *,TRIM(errmsg) 1861 PRINT *,' ' // TRIM(fname) // ' ** after first normalized ' 1862 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,j), & 1863 ' value at ',il,', ',i,', ',j,' ! (< 10.) !!' 1864 PRINT *,' delp delm wgh sjmin sjmax smid sij(i,j-1) sij(i,j) ' // & 1865 'sij(i,j+1) smax scrit _________________' 1866 PRINT *,delp,delm,wgh,sjmin,sjmax,smid,sij(il,i,j-1),sij(il,i,j), & 1867 sij(il,i,j+1),smax(il),scrit(il) 1868 END IF 1831 1869 endif 1832 1870 endif … … 1834 1872 1835 1873 175 continue 1874 1875 1876 DO il=1,ncum 1877 ! L. Fita, LMD. February 2015. Plotting vertical profile on asij(il) == 1.0e-16 1878 IF (asij(il) < 1.0e-16) THEN 1879 PRINT *,TRIM(errmsg) 1880 PRINT *,' ' // TRIM(fname) // ' ** asij= ',asij(il),' at il: ',il, & 1881 ' too small!!' 1882 PRINT *,' vertical profile i sig ph t rr rs u v _______' 1883 DO kl=1,nl 1884 PRINT *,i, sig(il,kl), ph(il,kl), t(il,kl), rr(il,kl), rs(il,kl), & 1885 u(il,kl), v(il,kl) 1886 END DO 1887 STOP 1888 END IF 1889 END DO 1836 1890 1837 1891 do il=1,ncum … … 1845 1899 enddo 1846 1900 1901 1847 1902 do 180 j=minorig,nl 1848 1903 do il=1,ncum … … 1850 1905 & .and. j.ge.(icb(il)-1) .and. j.le.inb(il) ) then 1851 1906 ment(il,i,j)=ment(il,i,j)*asij(il) 1907 ! L. Fita, LMD. Feburary 2015, Checkings... 1908 IF (ment(il,i,j) > 10.) THEN 1909 PRINT *,TRIM(errmsg) 1910 PRINT *,' ' // TRIM(fname) // ' ** after 2nd normalized ' 1911 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,j), & 1912 ' value at ',il,', ',i,', ',j,' ! (< 10.) !!' 1913 PRINT *,' asij(il) _________________' 1914 PRINT *,asij(il) 1915 END IF 1852 1916 endif 1853 1917 enddo … … 1861 1925 ment(il,i,j)=ment(il,i,j)*sig(il,j) 1862 1926 bsum(il,i)=bsum(il,i)+ment(il,i,j) 1927 ! L. Fita, LMD. Feburary 2015, Checkings... 1928 IF (ment(il,i,j) > 10.) THEN 1929 PRINT *,TRIM(errmsg) 1930 PRINT *,' ' // TRIM(fname) // ' ** after 3rd normalized ' 1931 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,j), & 1932 ' value at ',il,', ',i,', ',j,' ! (< 10.) !!' 1933 PRINT *,' sig(j) _________________' 1934 PRINT *,sig(il,j) 1935 END IF 1863 1936 endif 1864 1937 enddo … … 1877 1950 & .and. j.ge.(icb(il)-1) .and. j.le.inb(il) ) then 1878 1951 ment(il,i,j)=ment(il,i,j)*asum(il,i)*bsum(il,i) 1952 ! L. Fita, LMD. Feburary 2015, Checkings... 1953 IF (ment(il,i,j) > 10.) THEN 1954 PRINT *,TRIM(errmsg) 1955 PRINT *,' ' // TRIM(fname) // ' ** after 4th normalized ' 1956 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,j), & 1957 ' value at ',il,', ',i,', ',j,' ! (< 10.) !!' 1958 PRINT *,' asum(i) bsum(i) _________________' 1959 PRINT *,asum(il,i),bsum(il,i) 1960 END IF 1879 1961 endif 1880 1962 enddo … … 1901 1983 !cMAF sij(il,i,i)=1.0 1902 1984 sij(il,i,i)=0.0 1985 ! L. Fita, LMD. Feburary 2015, Checkings... 1986 IF (ment(il,i,i) > 10.) THEN 1987 PRINT *,TRIM(errmsg) 1988 PRINT *,' ' // TRIM(fname) // ' ** after 5th normalized ' 1989 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,i,i), & 1990 ' value at ',il,', ',i,', ',i,' ! (< 10.) !!' 1991 PRINT *,' m(i) _________________' 1992 PRINT *,m(il,i) 1993 END IF 1903 1994 endif 1904 1995 enddo ! il … … 1929 2020 if(zm(il,im).ne.0.) then 1930 2021 ment(il,im,jm)=ment(il,im,jm)*m(il,im)/zm(il,im) 2022 ! L. Fita, LMD. Feburary 2015, Checkings... 2023 IF (ment(il,im,jm) > 10.) THEN 2024 PRINT *,TRIM(errmsg) 2025 PRINT *,' ' // TRIM(fname) // ' ** after 6th normalized ' 2026 PRINT *,' ' // TRIM(fname) // ': wrong ment= ', ment(il,im,jm), & 2027 ' value at ',il,', ',im,', ',jm,' ! (< 10.) !!' 2028 PRINT *,' m(im) zm(im) _________________' 2029 PRINT *,m(il,im), zm(il,im) 2030 END IF 1931 2031 endif 1932 2032 end do … … 2168 2268 !cc---end jyg--- 2169 2269 !c 2170 !c--------retour àla formulation originale d'Emanuel.2270 !c--------retour \E0 la formulation originale d'Emanuel. 2171 2271 b6=bfac*50.*sigd(il)*(ph(il,i)-ph(il,i+1))*sigt*afac 2172 2272 c6=water(il,i+1)+bfac*wdtrain(il) & … … 2176 2276 !cjyg Dans sa formulation originale, Emanuel calcule l'evaporation par: 2177 2277 !cc evap(il,i)=sigt*afac*revap 2178 !c ce qui n'est pas correct. Dans cv_routines, la formulation a étémodifiee.2278 !c ce qui n'est pas correct. Dans cv_routines, la formulation a \E9t\E9 modifiee. 2179 2279 !c Ici,l'evaporation evap est simplement calculee par l'equation de 2180 2280 !c conservation. … … 2466 2566 real siga(nloc,nd), sax(nloc,nd), mac(nloc,nd) ! cld 2467 2567 2568 ! L. Fita, LMD. February 2015. 2569 CHARACTER(LEN=50) :: errmsg, fname 2570 2571 errmsg = 'ERROR -- error -- ERROR -- error' 2572 fname = 'cv3_yield' 2573 2468 2574 !c print*,'cv3_yield declarations 3' 2469 2575 !c------------------------------------------------------------- … … 2610 2716 endif 2611 2717 endif ! iflag 2612 enddo 2613 2718 2719 ! L. Fita, LMD. Feburary 2015, Checkings... 2720 IF (ft(il,1) > 100.) THEN 2721 PRINT *,TRIM(errmsg) 2722 PRINT *,' ' // TRIM(fname) // ' ** after Correction pour conserver l eau ' 2723 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,1),' value at ',il, & 2724 ' 1! (< 100.) !!' 2725 PRINT *,' sigd mp(2) t_wake(1) t_wake(2) b(1) work water(2) wt(1) ' // & 2726 'cpn(1) am(il) t(1) t(2) gz(1) gz(2) _________________' 2727 PRINT *,sigd(il), mp(il,2), t_wake(il,1), t_wake(il,2), b(il,1), & 2728 work(il), water(il,2), wt(il,1), cpn(il,1), am(il), t(il,1), t(il,2), & 2729 gz(il,1), gz(il,2) 2730 END IF 2731 enddo 2614 2732 2615 2733 do j=2,nl … … 2632 2750 enddo 2633 2751 ENDIF 2752 2753 ! L. Fita, LMD. Feburary 2015, Checkings... 2754 IF (ft(il,1) > 100.) THEN 2755 PRINT *,TRIM(errmsg) 2756 PRINT *,' ' // TRIM(fname) // ' ** after sature ' 2757 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,1),' value at ',il, & 2758 ' 1! (< 100.) !!' 2759 PRINT *,' work ment(',j,',1) hent(',j,',1) h(1) t(1) rr(1) Qent(',j, & 2760 ',1)_________________' 2761 PRINT *,work(il), ment(il,j,1), hent(il,j,1), h(il,1), t(il,1), rr(il,1), & 2762 Qent(il,j,1) 2763 END IF 2764 2634 2765 enddo 2635 2766 ! fin sature … … 2754 2885 endif 2755 2886 endif 2887 ! L. Fita, LMD. Feburary 2015, Checkings... 2888 IF (amp1(il) > 10.) THEN 2889 PRINT *,TRIM(errmsg) 2890 PRINT *,' ' // TRIM(fname) // ' ** amp1 1 ' 2891 PRINT *,' ' // TRIM(fname) // ': wrong amp1= ', amp1(il),' value at ',il,& 2892 '! (< 10.) !!' 2893 PRINT *,' k m(k) cbmf wghti(k) _________________' 2894 PRINT *,k,m(il,k),cbmf(il),wghti(il,k) 2895 END IF 2756 2896 441 continue 2757 2897 440 continue … … 2763 2903 amp1(il)=amp1(il)+ment(il,k,j) 2764 2904 endif 2905 ! L. Fita, LMD. Feburary 2015, Checkings... 2906 IF (amp1(il) > 10.) THEN 2907 PRINT *,TRIM(errmsg) 2908 PRINT *,' ' // TRIM(fname) // ' ** amp1 2 ' 2909 PRINT *,' ' // TRIM(fname) // ': wrong amp1= ', amp1(il),' value at ',il,& 2910 '! (< 10.) !!' 2911 PRINT *,' k j ment(k,j) _________________' 2912 PRINT *,k,j,ment(il,k,j) 2913 END IF 2765 2914 452 continue 2766 2915 451 continue … … 2802 2951 ftd(il,i)=ft(il,i) 2803 2952 ! fin precip 2953 2954 ! L. Fita, LMD. Feburary 2015, Checkings... 2955 IF (ft(il,i) > 100.) THEN 2956 PRINT *,TRIM(errmsg) 2957 PRINT *,' ' // TRIM(fname) // ' ** after precip 1 ' 2958 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ',il,i,& 2959 '! (< 100.) !!' 2960 PRINT *,' sigd lvcp(i) evap(i) evap(i+1) mp(i) mp(i+1) t_wake(i-1) ' // & 2961 't_wake(i) t_wake(i+1) b(i-1) b(i) dpinv water(i+1) _________________' 2962 PRINT *,sigd(il),lvcp(il,i),evap(il,i),evap(il,i+1),mp(il,i),mp(il,i+1), & 2963 t_wake(il,i-1),t_wake(il,i),t_wake(il,i+1),b(il,i-1),b(il,i), & 2964 dpinv, water(il,i+1) 2965 END IF 2966 2804 2967 !c 2805 2968 ! sature … … 2835 2998 endif ! cvflag_grav 2836 2999 3000 IF (ft(il,i) > 100.) THEN 3001 PRINT *,TRIM(errmsg) 3002 PRINT *,' ' // TRIM(fname) // ' ** after precip 2 sature ' 3003 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ',il,i,& 3004 '! (< 100.) !!' 3005 PRINT *,' amp1 t(i) t(i+1) gz(i) gz(i+1) ad t(i-1) t(i) gz(i-1) gz(i) '//& 3006 'ment(i,i) hp(i) h(i) rr(i) qent(i,i) mp(i) mp(i+1) t_wake(i-1) ' // & 3007 't_wake(i) b(i-1) b(i) _________________' 3008 PRINT *,amp1(il),t(il,i),t(il,i+1),gz(il,i),gz(il,i+1),ad(il),t(il,i-1), & 3009 t(il,i),gz(il,i-1),gz(il,i),ment(il,i,i),hp(il,i),h(il,i),rr(il,i), & 3010 qent(il,i,i),mp(il,i),mp(il,i+1),t_wake(il,i-1),t_wake(il,i),b(il,i-1), & 3011 b(il,i) 3012 END IF 2837 3013 2838 3014 if (cvflag_grav) then … … 2926 3102 endif !cvflag_grav 2927 3103 endif ! i 3104 3105 IF (ft(il,i) > 100.) THEN 3106 PRINT *,TRIM(errmsg) 3107 PRINT *,' ' // TRIM(fname) // ' ** after precip 3 ' 3108 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ',il,i,& 3109 '! (< 100.) !!' 3110 PRINT *,' k dpinv ment(k,i) hent(k,i) h(i) t(i) rr(i) awat Qent(k,i) & 3111 cpinv_________________' 3112 PRINT *,k,dpinv,ment(il,k,i),hent(il,k,i),h(il,i),t(il,i),rr(il,i), & 3113 awat(il),Qent(il,k,i),cpinv 3114 END IF 3115 2928 3116 enddo 2929 3117 ENDIF … … 2994 3182 endif !cvflag_grav 2995 3183 endif ! i 3184 3185 IF (ft(il,i) > 100.) THEN 3186 PRINT *,TRIM(errmsg) 3187 PRINT *,' ' // TRIM(fname) // ' ** after precip 3 ' 3188 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ',il,i,& 3189 '! (< 100.) !!' 3190 PRINT *,' k dpinv ment(k,i) hent(k,i) h(i) t(i) rr(i) awat Qent(k,i) & 3191 cpinv_________________' 3192 PRINT *,k,dpinv,ment(il,k,i),hent(il,k,i),h(il,i),t(il,i),rr(il,i), & 3193 awat(il),Qent(il,k,i),cpinv 3194 END IF 3195 2996 3196 enddo 2997 3197 ENDIF … … 3161 3361 & /(ph(il,inb(il)-1)-ph(il,inb(il))) 3162 3362 endif 3363 3364 IF (ft(il,inb(il)) > 100.) THEN 3365 PRINT *,TRIM(errmsg) 3366 PRINT *,' ' // TRIM(fname) // ' ** after Correction bug le 18-03-09 ' 3367 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,inb(il)),' value at '& 3368 ,il,inb(il),'! (< 100.) !!' 3369 PRINT *,' inb ft(inb(il)-1) ax cpn(inb) ph(inb) ph(inb+1) cpn(inb-1) ' //& 3370 'ph(inb(il)-1) ph(inb(il)) _________________' 3371 PRINT *,il,inb(il),ft(il,inb(il)-1),ax,cpn(il,inb(il)),ph(il,inb(il)), & 3372 ph(il,inb(il)+1), cpn(il,inb(il)-1), ph(il,inb(il)-1), ph(il,inb(il)) 3373 END IF 3163 3374 ENDIF !iflag 3375 3164 3376 503 continue 3165 3377 … … 3242 3454 fr(il,i)=fqd(il,i)+bsum(il)/csum(il) 3243 3455 endif 3456 3457 IF (ft(il,i) > 100.) THEN 3458 PRINT *,TRIM(errmsg) 3459 PRINT *,' ' // TRIM(fname) // ' ** after homogenize tendencies below cloud base' 3460 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ' & 3461 ,il,i,'! (< 100.) !!' 3462 PRINT *,' ftd(i) asum t(i) th(i) dsum _________________' 3463 PRINT *,ftd(il,i),asum(il),t(il,i),th(il,i),dsum(il) 3464 END IF 3465 3244 3466 enddo 3245 3467 enddo … … 3280 3502 precip(il) = precip(il)/alpha_qpos(il) 3281 3503 ENDIF 3504 ! L. Fita, LMD. Feburary 2015, Checkings... 3505 DO i=1, nl 3506 IF (ft(il,i) > 100.) THEN 3507 PRINT *,TRIM(errmsg) 3508 PRINT *,' ' // TRIM(fname) // ' ** after computing alpha_qpos' 3509 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ' & 3510 ,il,i,'! (< 100.) !!' 3511 PRINT *,' i ft(i) alpha_qpos ft(i)/aplha_qpos _________________' 3512 PRINT *,i,ft(il,i),alpha_qpos(il),ft(il,i)/alpha_qpos(il) 3513 END IF 3514 END DO 3282 3515 ENDDO 3283 3516 DO i = 1,nl … … 3294 3527 Vprecip(il,i) = Vprecip(il,i)/alpha_qpos(il) 3295 3528 ENDIF 3529 IF (ft(il,i) > 100.) THEN 3530 PRINT *,TRIM(errmsg) 3531 PRINT *,' ' // TRIM(fname) // ' ** after ensure moisture positivity' 3532 PRINT *,' ' // TRIM(fname) // ': wrong ft= ', ft(il,i),' value at ' & 3533 ,il,i,'! (< 100.) !!' 3534 PRINT *,' ft(i) alpha_qpos fr(i) s_wake rr_wake(i) s_wake rr(i) _________________' 3535 PRINT *,ft(il,i),alpha_qpos(il),fr(il,i),s_wake(il),rr_wake(il,i), & 3536 s_wake(il),rr(il,i) 3537 END IF 3538 3296 3539 ENDDO 3297 3540 ENDDO … … 3603 3846 !c 3604 3847 ! fraction deau condensee dans les melanges convertie en precip : epm 3605 ! et eau condens ée précipitée dans masse d'air saturé: l_m*dM_m/dzdz.dzdz3848 ! et eau condens\E9e pr\E9cipit\E9e dans masse d'air satur\E9 : l_m*dM_m/dzdz.dzdz 3606 3849 do j=1,na 3607 3850 do k=1,na
Note: See TracChangeset
for help on using the changeset viewer.