Changeset 1750 for LMDZ5/branches/testing/libf/phylmd/cv3_routines.F
- Timestamp:
- Apr 25, 2013, 5:27:27 PM (12 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 1711-1716,1718,1720-1725,1727-1729,1732-1742,1744-1745
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/cv3_routines.F
r1669 r1750 1950 1950 : ,th,tv,lv,cpn,ep,sigp,clw 1951 1951 : ,m,ment,elij,delt,plcl,coef_clos 1952 o ,mp,rp,up,vp,trap,wt,water,evap,b,sigd) 1952 o ,mp,rp,up,vp,trap,wt,water,evap,b,sigd 1953 o ,wdtrainA,wdtrainM) ! RomP 1953 1954 implicit none 1954 1955 … … 1979 1980 real trap(nloc,na,ntra) 1980 1981 real b(nloc,na), sigd(nloc) 1982 ! 25/08/10 - RomP---- ajout des masses precipitantes ejectees 1983 ! lascendance adiabatique et des flux melanges Pa et Pm. 1984 ! Distinction des wdtrain 1985 ! Pa = wdtrainA Pm = wdtrainM 1986 real wdtrainA(nloc,na), wdtrainM(nloc,na) 1981 1987 1982 1988 c local variables … … 2021 2027 !AC! enddo 2022 2028 !AC! enddo 2029 !! RomP >>> 2030 do i=1,nd 2031 do il=1,ncum 2032 wdtrainA(il,i)=0.0 2033 wdtrainM(il,i)=0.0 2034 enddo 2035 enddo 2036 !! RomP <<< 2023 2037 c 2024 2038 c *** check whether ep(inb)=0, if so, skip precipitating *** … … 2065 2079 if (cvflag_grav) then 2066 2080 wdtrain(il)=grav*ep(il,i)*m(il,i)*clw(il,i) 2081 wdtrainA(il,i) = wdtrain(il)/grav ! Pa RomP 2067 2082 else 2068 2083 wdtrain(il)=10.0*ep(il,i)*m(il,i)*clw(il,i) 2084 wdtrainA(il,i) = wdtrain(il)/10. ! Pa RomP 2069 2085 endif 2070 2086 endif … … 2079 2095 if (cvflag_grav) then 2080 2096 wdtrain(il)=wdtrain(il)+grav*awat*ment(il,j,i) 2097 wdtrainM(il,i) = wdtrain(il)/grav-wdtrainA(il,i) ! Pm RomP 2081 2098 else 2082 2099 wdtrain(il)=wdtrain(il)+10.0*awat*ment(il,j,i) 2100 wdtrainM(il,i) = wdtrain(il)/10.-wdtrainA(il,i) ! Pm RomP 2083 2101 endif 2084 2102 endif … … 3540 3558 end 3541 3559 3542 !AC! 3560 !AC! et !RomP >>> 3543 3561 SUBROUTINE cv3_tracer(nloc,len,ncum,nd,na, 3544 & ment,sij,da,phi) 3562 & ment,sigij,da,phi,phi2,d1a,dam, 3563 & ep,Vprecip,elij,clw,icb,inb) 3545 3564 implicit none 3565 3566 #include "cv3param.h" 3567 3546 3568 c inputs: 3547 3569 integer ncum, nd, na, nloc,len 3548 real ment(nloc,na,na),sij(nloc,na,na) 3570 real ment(nloc,na,na),sigij(nloc,na,na) 3571 real clw(nloc,nd),elij(nloc,na,na) 3572 real ep(nloc,na) 3573 integer icb(nloc),inb(nloc) 3574 real VPrecip(nloc,nd+1) 3549 3575 c ouputs: 3550 3576 real da(nloc,na),phi(nloc,na,na) 3577 real phi2(nloc,na,na) 3578 real d1a(nloc,na),dam(nloc,na) 3579 ! variables pour tracer dans precip de l'AA et des mel 3551 3580 c local variables: 3552 3581 integer i,j,k 3553 c 3554 da(:,:)=0. 3555 c 3582 real epm(nloc,na,na) 3583 c 3584 ! variables d'Emanuel : du second indice au troisieme 3585 ! ---> tab(i,k,j) -> de l origine k a l arrivee j 3586 ! ment, sigij, elij 3587 ! variables personnelles : du troisieme au second indice 3588 ! ---> tab(i,j,k) -> de k a j 3589 ! phi, phi2 3590 ! 3591 ! initialisations 3592 c 3593 da(:,:)=0. 3594 d1a(:,:)=0. 3595 dam(:,:)=0. 3596 epm(:,:,:)=0. 3597 c 3598 ! fraction deau condensee dans les melanges convertie en precip 3599 do j=1,na 3600 do k=1,na 3601 do i=1,ncum 3602 if(k.ge.icb(i).and.k.le.inb(i).and. 3603 & j.ge.k.and.j.le.inb(i)) then 3604 epm(i,j,k)=1.-(1.-ep(i,j))*clw(i,j)/elij(i,k,j) 3605 epm(i,j,k)=max(epm(i,j,k),0.0) 3606 endif 3607 end do 3608 end do 3609 end do 3610 3611 ! matrices pour calculer la tendance des concentrations dans cvltr.F90 3556 3612 do j=1,na 3557 3613 do k=1,na 3558 3614 do i=1,ncum 3559 da(i,j)=da(i,j)+(1.-sij(i,k,j))*ment(i,k,j) 3560 phi(i,j,k)=sij(i,k,j)*ment(i,k,j) 3615 da(i,j)=da(i,j)+(1.-sigij(i,k,j))*ment(i,k,j) 3616 phi(i,j,k)=sigij(i,k,j)*ment(i,k,j) 3617 d1a(i,j)=d1a(i,j)+ment(i,k,j)*ep(i,k) 3618 & *(1.-sigij(i,k,j)) 3619 if(k.le.j) then 3620 dam(i,j)=dam(i,j)+ment(i,k,j) 3621 & *epm(i,k,j)*(1.-ep(i,k))*(1.-sigij(i,k,j)) 3622 3623 phi2(i,j,k)=phi(i,j,k)*epm(i,j,k) 3624 else 3625 dam(i,j)=0. 3626 phi2(i,j,k)=0. 3627 endif 3561 3628 end do 3562 3629 end do 3563 3630 end do 3631 3564 3632 return 3565 3633 end 3566 !AC! 3634 !AC! et !RomP <<< 3567 3635 3568 3636 SUBROUTINE cv3_uncompress(nloc,len,ncum,nd,ntra,idcum
Note: See TracChangeset
for help on using the changeset viewer.