Changeset 1047 for trunk/LMDZ.MARS/libf/phymars/vlz_fi.F
- Timestamp:
- Sep 23, 2013, 9:56:47 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/vlz_fi.F
r38 r1047 1 SUBROUTINE vlz_fi(ngrid, q,pente_max,masse,w,wq)1 SUBROUTINE vlz_fi(ngrid,nlay,q,pente_max,masse,w,wq) 2 2 c 3 3 c Auteurs: P.Le Van, F.Hourdin, F.Forget … … 16 16 IMPLICIT NONE 17 17 c 18 #include "dimensions.h"19 #include "dimphys.h"18 !#include "dimensions.h" 19 !#include "dimphys.h" 20 20 21 21 c … … 23 23 c Arguments: 24 24 c ---------- 25 integer ngrid 26 real masse(ngrid,llm),pente_max 27 REAL q(ngrid,llm) 28 REAL w(ngrid,llm) 29 REAL wq(ngrid,llm+1) 25 integer,intent(in) :: ngrid ! number of atmospheric columns 26 integer,intent(in) :: nlay ! number of atmospheric layers 27 real masse(ngrid,nlay),pente_max 28 REAL q(ngrid,nlay) 29 REAL w(ngrid,nlay) 30 REAL wq(ngrid,nlay+1) 30 31 c 31 32 c Local … … 35 36 c 36 37 37 real dzq(ngrid mx,llm),dzqw(ngridmx,llm),adzqw(ngridmx,llm),dzqmax38 real dzq(ngrid,nlay),dzqw(ngrid,nlay),adzqw(ngrid,nlay),dzqmax 38 39 real newmasse 39 40 real sigw, Mtot, MQtot … … 47 48 c sens de W 48 49 49 do l=2, llm50 do l=2,nlay 50 51 do ij=1,ngrid 51 52 dzqw(ij,l)=q(ij,l-1)-q(ij,l) … … 54 55 enddo 55 56 56 do l=2, llm-157 do l=2,nlay-1 57 58 do ij=1,ngrid 58 59 #ifdef CRAY … … 73 74 do ij=1,ngrid 74 75 dzq(ij,1)=0. 75 dzq(ij, llm)=0.76 dzq(ij,nlay)=0. 76 77 enddo 77 78 c --------------------------------------------------------------- … … 83 84 c No flux at the model top: 84 85 do ij=1,ngrid 85 wq(ij, llm+1)=0.86 wq(ij,nlay+1)=0. 86 87 enddo 87 88 … … 89 90 c =============================== 90 91 91 do l = 1, llm! loop different than when w<092 do l = 1,nlay ! loop different than when w<0 92 93 do ij = 1,ngrid 93 94 … … 107 108 Mtot = masse(ij,m) 108 109 MQtot = masse(ij,m)*q(ij,m) 109 if(m.ge. llm)goto 88110 if(m.ge.nlay)goto 88 110 111 do while(w(ij,l).gt.(Mtot+masse(ij,m+1))) 111 112 m=m+1 112 113 Mtot = Mtot + masse(ij,m) 113 114 MQtot = MQtot + masse(ij,m)*q(ij,m) 114 if(m.ge. llm)goto 88115 if(m.ge.nlay)goto 88 115 116 end do 116 117 88 continue 117 if (m.lt. llm) then118 if (m.lt.nlay) then 118 119 sigw=(w(ij,l)-Mtot)/masse(ij,m+1) 119 120 wq(ij,l)=(MQtot + (w(ij,l)-Mtot)* … … 137 138 end do 138 139 139 do l = 1, llm-1 ! loop different than when w>0140 do l = 1,nlay-1 ! loop different than when w>0 140 141 do ij = 1,ngrid 141 142 if(w(ij,l+1).le.0)then … … 176 177 99 continue 177 178 178 do l=1, llm179 do l=1,nlay 179 180 do ij=1,ngrid 180 181
Note: See TracChangeset
for help on using the changeset viewer.