Changeset 1391 for trunk/LMDZ.COMMON/libf/dyn3d_common/ppm3d.F
- Timestamp:
- Mar 6, 2015, 3:12:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d_common/ppm3d.F
r1300 r1391 1 1 ! 2 ! $Id: ppm3d.F 1403 2010-07-01 09:02:53Z fairhead$2 ! $Id: ppm3d.F 2197 2015-02-09 07:13:05Z emillour $ 3 3 ! 4 4 … … 66 66 & JNP,j1,NLAY,AP,BP,PT,AE,fill,dum,Umax) 67 67 68 cimplicit none68 implicit none 69 69 70 70 c rajout de déclarations … … 270 270 C User modifiable parameters 271 271 C 272 parameter (Jmax = 361, kmax = 150)272 integer,parameter :: Jmax = 361, kmax = 150 273 273 C 274 274 C ****6***0*********0*********0*********0*********0*********0**********72 … … 299 299 data NDT0, NSTEP /0, 0/ 300 300 data cross /.true./ 301 REAL DTDY, DTDY5, RCAP 302 INTEGER JS0, JN0, IML, JMR, IMJM 301 303 SAVE DTDY, DTDY5, RCAP, JS0, JN0, IML, 302 304 & DTDX, DTDX5, ACOSP, COSP, COSE, DAP,DBK 303 305 C 306 INTEGER NDT0, NSTEP, j2, k,j,i,ic,l,JS,JN,IMH 307 INTEGER IU,IIU,JT,iad,jad,krd 308 REAL r23,r3,PI,DL,DP,DT,CR1,MAXDT,ZTC,D5 309 REAL sum1,sum2,ru 304 310 305 311 JMR = JNP -1 … … 756 762 subroutine FZPPM(IMR,JNP,NLAY,j1,DQ,WZ,P,DC,DQDT,AR,AL,A6, 757 763 & flux,wk1,wk2,wz2,delp,KORD) 758 parameter ( kmax = 150 ) 759 parameter ( R23 = 2./3., R3 = 1./3.) 764 implicit none 765 integer,parameter :: kmax = 150 766 real,parameter :: R23 = 2./3., R3 = 1./3. 767 integer IMR,JNP,NLAY,J1,KORD 760 768 real WZ(IMR,JNP,NLAY),P(IMR,JNP,NLAY),DC(IMR,JNP,NLAY), 761 769 & wk1(IMR,*),delp(IMR,JNP,NLAY),DQ(IMR,JNP,NLAY), … … 764 772 real AR(IMR,*),AL(IMR,*),A6(IMR,*),flux(IMR,*),wk2(IMR,*), 765 773 & wz2(IMR,*) 774 integer JMR,IMJM,NLAYM1,LMT,K,I,J 775 real c0,c1,c2,tmp,qmax,qmin,a,b,fct,a1,a2,cm,cp 766 776 C 767 777 JMR = JNP - 1 … … 922 932 subroutine xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ,Q,UC, 923 933 & fx1,xmass,IORD) 934 implicit none 935 integer IMR,JNP,IML,j1,j2,JN,JS,IORD 936 real PU,DQ,Q,UC,fx1,xmass 937 real dc,qtmp 938 integer ISAVE(IMR) 924 939 dimension UC(IMR,*),DC(-IML:IMR+IML+1),xmass(IMR,JNP) 925 940 & ,fx1(IMR+1),DQ(IMR,JNP),qtmp(-IML:IMR+1+IML) 926 dimension PU(IMR,JNP),Q(IMR,JNP),ISAVE(IMR) 941 dimension PU(IMR,JNP),Q(IMR,JNP) 942 integer jvan,j1vl,j2vl,j,i,iu,itmp,ist,imp 943 real rut 927 944 C 928 945 IMP = IMR + 1 … … 1031 1048 C 1032 1049 subroutine fxppm(IMR,IML,UT,P,DC,flux,IORD) 1033 parameter ( R3 = 1./3., R23 = 2./3. ) 1050 implicit none 1051 integer IMR,IML,IORD 1052 real UT,P,DC,flux 1053 real,parameter :: R3 = 1./3., R23 = 2./3. 1034 1054 DIMENSION UT(*),flux(*),P(-IML:IMR+IML+1),DC(-IML:IMR+IML+1) 1035 DIMENSIONAR(0:IMR),AL(0:IMR),A6(0:IMR)1036 integer LMT 1055 REAL :: AR(0:IMR),AL(0:IMR),A6(0:IMR) 1056 integer LMT,IMP,JLVL,i 1037 1057 c logical first 1038 1058 c data first /.true./ … … 1088 1108 C 1089 1109 subroutine xmist(IMR,IML,P,DC) 1090 parameter( R24 = 1./24.) 1091 dimension P(-IML:IMR+1+IML),DC(-IML:IMR+1+IML) 1110 implicit none 1111 integer IMR,IML 1112 real,parameter :: R24 = 1./24. 1113 real :: P(-IML:IMR+1+IML),DC(-IML:IMR+1+IML) 1114 integer :: i 1115 real :: tmp,pmax,pmin 1092 1116 C 1093 1117 do 10 i=1,IMR … … 1101 1125 subroutine ytp(IMR,JNP,j1,j2,acosp,RCAP,DQ,P,VC,DC2 1102 1126 & ,ymass,fx,A6,AR,AL,JORD) 1127 implicit none 1128 integer :: IMR,JNP,j1,j2,JORD 1129 real :: acosp,RCAP,DQ,P,VC,DC2,ymass,fx,A6,AR,AL 1103 1130 dimension P(IMR,JNP),VC(IMR,JNP),ymass(IMR,JNP) 1104 1131 & ,DC2(IMR,JNP),DQ(IMR,JNP),acosp(JNP) 1105 1132 C Work array 1106 1133 DIMENSION fx(IMR,JNP),AR(IMR,JNP),AL(IMR,JNP),A6(IMR,JNP) 1134 integer :: JMR,len,i,jt,j 1135 real :: sum1,sum2 1107 1136 C 1108 1137 JMR = JNP - 1 … … 1161 1190 C 1162 1191 subroutine ymist(IMR,JNP,j1,P,DC,ID) 1163 parameter ( R24 = 1./24. ) 1164 dimension P(IMR,JNP),DC(IMR,JNP) 1192 implicit none 1193 integer :: IMR,JNP,j1,ID 1194 real,parameter :: R24 = 1./24. 1195 real :: P(IMR,JNP),DC(IMR,JNP) 1196 integer :: iimh,jmr,ijm3,imh,i 1197 real :: pmax,pmin,tmp 1165 1198 C 1166 1199 IMH = IMR / 2 … … 1239 1272 C 1240 1273 subroutine fyppm(VC,P,DC,flux,IMR,JNP,j1,j2,A6,AR,AL,JORD) 1241 parameter ( R3 = 1./3., R23 = 2./3. ) 1274 implicit none 1275 integer IMR,JNP,j1,j2,JORD 1276 real,parameter :: R3 = 1./3., R23 = 2./3. 1242 1277 real VC(IMR,*),flux(IMR,*),P(IMR,*),DC(IMR,*) 1243 1278 C Local work arrays. 1244 1279 real AR(IMR,JNP),AL(IMR,JNP),A6(IMR,JNP) 1245 integer LMT 1280 integer LMT,i 1281 integer IMH,JMR,j11,IMJM1,len 1246 1282 c logical first 1247 1283 C data first /.true./ … … 1315 1351 C 1316 1352 subroutine yadv(IMR,JNP,j1,j2,p,VA,ady,wk,IAD) 1353 implicit none 1354 integer IMR,JNP,j1,j2,IAD 1317 1355 REAL p(IMR,JNP),ady(IMR,JNP),VA(IMR,JNP) 1318 1356 REAL WK(IMR,-1:JNP+2) 1357 INTEGER JMR,IMH,i,j,jp 1358 REAL rv,a1,b1,sum1,sum2 1319 1359 C 1320 1360 JMR = JNP-1 … … 1401 1441 C 1402 1442 subroutine xadv(IMR,JNP,j1,j2,p,UA,JS,JN,IML,adx,IAD) 1443 implicit none 1444 INTEGER IMR,JNP,j1,j2,JS,JN,IML,IAD 1403 1445 REAL p(IMR,JNP),adx(IMR,JNP),qtmp(-IMR:IMR+IMR),UA(IMR,JNP) 1446 INTEGER JMR,j,i,ip,iu,iiu 1447 REAL ru,a1,b1 1404 1448 C 1405 1449 JMR = JNP-1 … … 1489 1533 C 1490 1534 subroutine lmtppm(DC,A6,AR,AL,P,IM,LMT) 1535 implicit none 1491 1536 C 1492 1537 C A6 = CURVATURE OF THE TEST PARABOLA … … 1503 1548 C LMT = 2: POSITIVE-DEFINITE CONSTRAINT 1504 1549 C 1505 parameter ( R12 = 1./12. ) 1506 dimension A6(IM),AR(IM),AL(IM),P(IM),DC(IM) 1550 real,parameter :: R12 = 1./12. 1551 real :: A6(IM),AR(IM),AL(IM),P(IM),DC(IM) 1552 integer :: IM,LMT 1553 INTEGER i 1554 REAL da1,da2,a6da,fmin 1507 1555 C 1508 1556 if(LMT.eq.0) then … … 1564 1612 C 1565 1613 subroutine A2C(U,V,IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5) 1566 dimension U(IMR,*),V(IMR,*),CRX(IMR,*),CRY(IMR,*),DTDX5(*) 1614 implicit none 1615 integer IMR,JMR,j1,j2 1616 real :: U(IMR,*),V(IMR,*),CRX(IMR,*),CRY(IMR,*),DTDX5(*),DTDY5 1617 integer i,j 1567 1618 C 1568 1619 do 35 j=j1,j2 … … 1579 1630 C 1580 1631 subroutine cosa(cosp,cose,JNP,PI,DP) 1581 dimension cosp(*),cose(*) 1632 implicit none 1633 integer JNP 1634 real :: cosp(*),cose(*),PI,DP 1635 integer JMR,j,jeq 1636 real ph5 1582 1637 JMR = JNP-1 1583 1638 do 55 j=2,JNP … … 1606 1661 C 1607 1662 subroutine cosc(cosp,cose,JNP,PI,DP) 1608 dimension cosp(*),cose(*) 1663 implicit none 1664 integer JNP 1665 real :: cosp(*),cose(*),PI,DP 1666 real phi 1667 integer j 1609 1668 C 1610 1669 phi = -0.5*PI … … 1628 1687 & cross,IC,NSTEP) 1629 1688 C 1630 parameter( tiny = 1.E-60 ) 1631 DIMENSION Q(IMR,JNP,NLAY),qtmp(IMR,JNP),cosp(*),acosp(*) 1689 real,parameter :: tiny = 1.E-60 1690 INTEGER :: IMR,JNP,NLAY,j1,j2,IC,NSTEP 1691 REAL :: Q(IMR,JNP,NLAY),qtmp(IMR,JNP),cosp(*),acosp(*) 1632 1692 logical cross 1693 INTEGER :: NLAYM1,len,ip,L,icr,ipy,ipx,i 1694 real :: qup,qly,dup,sum 1633 1695 C 1634 1696 NLAYM1 = NLAY-1 … … 1730 1792 C 1731 1793 subroutine filcr(q,IMR,JNP,j1,j2,cosp,acosp,icr,tiny) 1732 dimension q(IMR,*),cosp(*),acosp(*) 1794 implicit none 1795 integer :: IMR,JNP,j1,j2,icr 1796 real :: q(IMR,*),cosp(*),acosp(*),tiny 1797 integer :: i,j 1798 real :: dq,dn,d0,d1,ds,d2 1733 1799 icr = 0 1734 1800 do 65 j=j1+1,j2-1 … … 1828 1894 C 1829 1895 subroutine filns(q,IMR,JNP,j1,j2,cosp,acosp,ipy,tiny) 1830 dimension q(IMR,*),cosp(*),acosp(*) 1896 implicit none 1897 integer :: IMR,JNP,j1,j2,ipy 1898 real :: q(IMR,*),cosp(*),acosp(*),tiny 1899 real :: DP,CAP1,dq,dn,d0,d1,ds,d2 1900 INTEGER :: i,j 1831 1901 c logical first 1832 1902 c data first /.true./ … … 1910 1980 C 1911 1981 subroutine filew(q,qtmp,IMR,JNP,j1,j2,ipx,tiny) 1912 dimension q(IMR,*),qtmp(JNP,IMR) 1982 implicit none 1983 integer :: IMR,JNP,j1,j2,ipx 1984 real :: q(IMR,*),qtmp(JNP,IMR),tiny 1985 integer :: i,j 1986 real :: d0,d1,d2 1913 1987 C 1914 1988 ipx = 0 … … 1983 2057 C 1984 2058 subroutine zflip(q,im,km,nc) 2059 implicit none 1985 2060 C This routine flip the array q (in the vertical). 2061 integer :: im,km,nc 1986 2062 real q(im,km,nc) 1987 2063 C local dynamic array 1988 2064 real qtmp(im,km) 2065 integer IC,k,i 1989 2066 C 1990 2067 do 4000 IC = 1, nc
Note: See TracChangeset
for help on using the changeset viewer.