Changeset 1269 for trunk/LMDZ.MARS/libf/phymars/newcondens.F
- Timestamp:
- May 19, 2014, 11:00:18 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/newcondens.F
r1266 r1269 578 578 w(l)=-zmflux(l)*ptimestep 579 579 END DO 580 call vl1d( ztc,2.,masse,w,ztm)581 call vl1d( zu ,2.,masse,w,zum)582 call vl1d( zv ,2.,masse,w,zvm)580 call vl1d(nlayer,ztc,2.,masse,w,ztm) 581 call vl1d(nlayer,zu ,2.,masse,w,zum) 582 call vl1d(nlayer,zv ,2.,masse,w,zvm) 583 583 do iq=1,nq 584 584 do l=1,nlayer … … 586 586 enddo 587 587 zqm1(1)=zqm(1,iq) 588 call vl1d( zq1,2.,masse,w,zqm1)588 call vl1d(nlayer,zq1,2.,masse,w,zqm1) 589 589 do l=2,nlayer 590 590 zq( l,iq)=zq1(l) … … 799 799 800 800 c ***************************************************************** 801 SUBROUTINE vl1d( q,pente_max,masse,w,qm)801 SUBROUTINE vl1d(nlayer,q,pente_max,masse,w,qm) 802 802 c 803 803 c … … 813 813 IMPLICIT NONE 814 814 815 #include "dimensions.h"816 817 815 c 818 816 c … … 820 818 c Arguments: 821 819 c ---------- 822 real masse( llm),pente_max823 REAL q( llm),qm(llm+1)824 REAL w( llm+1)820 real masse(nlayer),pente_max 821 REAL q(nlayer),qm(nlayer+1) 822 REAL w(nlayer+1) 825 823 c 826 824 c Local … … 829 827 INTEGER l 830 828 c 831 real dzq( llm),dzqw(llm),adzqw(llm),dzqmax829 real dzq(nlayer),dzqw(nlayer),adzqw(nlayer),dzqmax 832 830 real sigw, Mtot, MQtot 833 831 integer m … … 838 836 c W > 0 WHEN DOWN !!!!!!!!!!!!! 839 837 840 do l=2, llm838 do l=2,nlayer 841 839 dzqw(l)=q(l-1)-q(l) 842 840 adzqw(l)=abs(dzqw(l)) 843 841 enddo 844 842 845 do l=2, llm-1843 do l=2,nlayer-1 846 844 if(dzqw(l)*dzqw(l+1).gt.0.) then 847 845 dzq(l)=0.5*(dzqw(l)+dzqw(l+1)) … … 854 852 855 853 dzq(1)=0. 856 dzq( llm)=0.857 858 do l = 1, llm-1854 dzq(nlayer)=0. 855 856 do l = 1,nlayer-1 859 857 860 858 c Regular scheme (transfered mass < layer mass) … … 873 871 Mtot = masse(m) 874 872 MQtot = masse(m)*q(m) 875 do while ((m.lt. llm).and.(w(l+1).gt.(Mtot+masse(m+1))))873 do while ((m.lt.nlayer).and.(w(l+1).gt.(Mtot+masse(m+1)))) 876 874 m=m+1 877 875 Mtot = Mtot + masse(m) 878 876 MQtot = MQtot + masse(m)*q(m) 879 877 end do 880 if (m.lt. llm) then878 if (m.lt.nlayer) then 881 879 sigw=(w(l+1)-Mtot)/masse(m+1) 882 880 qm(l+1)= (1/w(l+1))*(MQtot + (w(l+1)-Mtot)* … … 912 910 913 911 c boundary conditions (not used in newcondens !!) 914 c qm( llm+1)=0.912 c qm(nlayer+1)=0. 915 913 c if(w(1).gt.0.) then 916 914 c qm(1)=q(1)
Note: See TracChangeset
for help on using the changeset viewer.