Changeset 1391 for trunk/LMDZ.COMMON/libf/dyn3d_common
- Timestamp:
- Mar 6, 2015, 3:12:12 PM (10 years ago)
- Location:
- trunk/LMDZ.COMMON/libf/dyn3d_common
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d_common/disvert.F90
r1302 r1391 27 27 !------------------------------------------------------------------------------- 28 28 ! Read in "comvert.h": 29 ! pa !--- PURE PRESSURE COORDINATE FOR P<pa (in Pascals) 29 30 ! pa !--- vertical coordinate is close to a PRESSURE COORDINATE FOR P 31 ! < 0.3 * pa (relative variation of p on a model level is < 0.1 %) 32 30 33 ! preff !--- REFERENCE PRESSURE (101325 Pa) 31 34 ! Written in "comvert.h": -
trunk/LMDZ.COMMON/libf/dyn3d_common/grid_atob.F
r1300 r1391 1 1 ! 2 ! $Id: grid_atob.F 1403 2010-07-01 09:02:53Z fairhead$2 ! $Id: grid_atob.F 2197 2015-02-09 07:13:05Z emillour $ 3 3 ! 4 4 SUBROUTINE grille_m(imdep, jmdep, xdata, ydata, entree, … … 52 52 REAL zzmin 53 53 #endif 54 include "iniprint.h" 54 55 c 55 56 IF (imar.GT.2200 .OR. jmar.GT.1100) THEN … … 118 119 sortie(i,j) = sortie(i,j) / number(i,j) 119 120 ELSE 120 PRINT*, 'probleme,i,j=', i,j121 if (prt_level >= 1) PRINT*, 'probleme,i,j=', i,j 121 122 ccc CALL ABORT_GCM("", "", 1) 122 123 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) … … 135 136 j_proche = (ij_proche-1)/imdep + 1 136 137 i_proche = ij_proche - (j_proche-1)*imdep 137 PRINT*, "solution:", ij_proche, i_proche, j_proche 138 if (prt_level >= 1) PRINT*, "solution:", ij_proche, i_proche, 139 $ j_proche 138 140 sortie(i,j) = entree(i_proche,j_proche) 139 141 ENDIF … … 258 260 PRINT*, 'Probleme grave,i,j,indx,indy=', 259 261 . i,j,indx(i,j),indy(i,j) 260 CALLabort_gcm("", "", 1)262 call abort_gcm("", "", 1) 261 263 ENDIF 262 264 ENDDO … … 449 451 REAL zzmin 450 452 #endif 453 include "iniprint.h" 451 454 c 452 455 IF (imar.GT.400 .OR. jmar.GT.400) THEN … … 512 515 sortie(i,j) = EXP(sortie(i,j)) 513 516 ELSE 514 PRINT*, 'probleme,i,j=', i,j517 if (prt_level >= 1) PRINT*, 'probleme,i,j=', i,j 515 518 ccc CALL ABORT_GCM("", "", 1) 516 519 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) … … 529 532 j_proche = (ij_proche-1)/imdep + 1 530 533 i_proche = ij_proche - (j_proche-1)*imdep 531 PRINT*, "solution:", ij_proche, i_proche, j_proche 534 if (prt_level >= 1) PRINT*, "solution:", ij_proche, i_proche, 535 $ j_proche 532 536 sortie(i,j) = entree(i_proche,j_proche) 533 537 ENDIF … … 574 578 REAL zzmin 575 579 #endif 580 include "iniprint.h" 576 581 c 577 582 IF (imar.GT.400 .OR. jmar.GT.400) THEN … … 641 646 ENDIF 642 647 ELSE 643 PRINT*, 'probleme,i,j=', i,j648 if (prt_level >= 1) PRINT*, 'probleme,i,j=', i,j 644 649 ccc CALL ABORT_GCM("", "", 1) 645 650 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) … … 658 663 j_proche = (ij_proche-1)/imdep + 1 659 664 i_proche = ij_proche - (j_proche-1)*imdep 660 PRINT*, "solution:", ij_proche, i_proche, j_proche 665 if (prt_level >= 1) PRINT*, "solution:", ij_proche, i_proche, 666 $ j_proche 661 667 IF (NINT(glace01(i_proche,j_proche)).EQ.1 ) THEN 662 668 frac_ice(i,j) = 1.0 … … 710 716 INTEGER i_proche, j_proche, ij_proche 711 717 c 718 include "iniprint.h" 719 712 720 IF (immod.GT.2200 .OR. jmmod.GT.1100) THEN 713 721 PRINT*, 'immod ou jmmod trop grand', immod, jmmod … … 874 882 rugs(i,j) = EXP(rugs(i,j)) 875 883 ELSE 876 PRINT*, 'probleme,i,j=', i,j884 if (prt_level >= 1) PRINT*, 'probleme,i,j=', i,j 877 885 ccc CALL ABORT_GCM("", "", 1) 878 886 CALL dist_sphe(xmod(i),ymod(j),xtmp,ytmp,imtmp,jmtmp,distans) … … 891 899 j_proche = (ij_proche-1)/imtmp + 1 892 900 i_proche = ij_proche - (j_proche-1)*imtmp 893 PRINT*, "solution:", ij_proche, i_proche, j_proche 901 if (prt_level >= 1) PRINT*, "solution:", ij_proche, i_proche, 902 $ j_proche 894 903 rugs(i,j) = LOG(MAX(0.001_8,cham2tmp(i_proche,j_proche))) 895 904 ENDIF … … 927 936 c 928 937 SUBROUTINE dist_sphe(rf_lon,rf_lat,rlon,rlat,im,jm,distance) 938 IMPLICIT NONE 929 939 c 930 940 c Auteur: Laurent Li (le 30 decembre 1996) … … 949 959 REAL radius 950 960 PARAMETER (radius=6371229.) 961 INTEGER i,j 951 962 c 952 963 pi = 4.0 * ATAN(1.0) -
trunk/LMDZ.COMMON/libf/dyn3d_common/infotrac.F90
r1300 r1391 5 5 ! nqtot : total number of tracers and higher order of moment, water vapor and liquid included 6 6 INTEGER, SAVE :: nqtot 7 ! CR: add number of tracers for water (for Earth model only!!) 8 INTEGER, SAVE :: nqo 7 9 8 10 ! nbtr : number of tracers not including higher order of moment or water vapor or liquid … … 27 29 28 30 CHARACTER(len=4),SAVE :: type_trac 31 CHARACTER(len=8),DIMENSION(:),ALLOCATABLE, SAVE :: solsym 29 32 30 33 CONTAINS … … 60 63 61 64 CHARACTER(len=15), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name 62 CHARACTER(len=8), ALLOCATABLE, DIMENSION(:) :: tracnam ! name from INCA63 65 CHARACTER(len=3), DIMENSION(30) :: descrq 64 66 CHARACTER(len=1), DIMENSION(3) :: txts … … 94 96 WRITE(lunout,*) 'You have choosen to couple with INCA chemestry model : type_trac=', & 95 97 type_trac,' config_inca=',config_inca 96 IF (config_inca/='aero' .AND. config_inca/=' chem') THEN98 IF (config_inca/='aero' .AND. config_inca/='aeNP' .AND. config_inca/='chem') THEN 97 99 WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def' 98 100 CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1) … … 179 181 ! 180 182 ALLOCATE(tnom_0(nqtrue), hadv(nqtrue), vadv(nqtrue)) 181 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), tracnam(nbtr))183 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), solsym(nbtr)) 182 184 conv_flg(:) = 1 ! convection activated for all tracers 183 185 pbl_flg(:) = 1 ! boundary layer activated for all tracers … … 240 242 END IF 241 243 244 !CR: nombre de traceurs de l eau 245 if (tnom_0(3) == 'H2Oi') then 246 nqo=3 247 else 248 nqo=2 249 endif 250 242 251 WRITE(lunout,*) trim(modname),': Valeur de traceur.def :' 243 252 WRITE(lunout,*) trim(modname),': nombre de traceurs ',nqtrue … … 262 271 263 272 DO iq =3,nqtrue 264 tnom_0(iq)= tracnam(iq-2)273 tnom_0(iq)=solsym(iq-2) 265 274 END DO 275 nqo = 2 266 276 267 277 END IF ! type_trac … … 430 440 ! 431 441 DEALLOCATE(tnom_0, hadv, vadv) 432 DEALLOCATE(tracnam) 442 433 443 434 444 END SUBROUTINE infotrac_init -
trunk/LMDZ.COMMON/libf/dyn3d_common/iniacademic.F90
r1302 r1391 4 4 SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 5 5 6 USE filtreg_mod 6 USE filtreg_mod, ONLY: inifilr 7 7 USE infotrac, ONLY : nqtot 8 8 USE control_mod, ONLY: day_step,planet_type 9 9 #ifdef CPP_IOIPSL 10 USE IOIPSL 10 USE IOIPSL, ONLY: getin 11 11 #else 12 12 ! if not using IOIPSL, we still need to use (a local version of) getin 13 USE ioipsl_getincom 13 USE ioipsl_getincom, ONLY: getin 14 14 #endif 15 15 USE Write_Field … … 40 40 ! ---------- 41 41 42 real time_0 43 44 ! variables dynamiques 45 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 46 REAL teta(ip1jmp1,llm) ! temperature potentielle 47 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 48 REAL ps(ip1jmp1) ! pression au sol 49 REAL masse(ip1jmp1,llm) ! masse d'air 50 REAL phis(ip1jmp1) ! geopotentiel au sol 42 REAL,INTENT(OUT) :: time_0 43 44 ! fields 45 REAL,INTENT(OUT) :: vcov(ip1jm,llm) ! meridional covariant wind 46 REAL,INTENT(OUT) :: ucov(ip1jmp1,llm) ! zonal covariant wind 47 REAL,INTENT(OUT) :: teta(ip1jmp1,llm) ! potential temperature (K) 48 REAL,INTENT(OUT) :: q(ip1jmp1,llm,nqtot) ! advected tracers (.../kg_of_air) 49 REAL,INTENT(OUT) :: ps(ip1jmp1) ! surface pressure (Pa) 50 REAL,INTENT(OUT) :: masse(ip1jmp1,llm) ! air mass in grid cell (kg) 51 REAL,INTENT(OUT) :: phis(ip1jmp1) ! surface geopotential 51 52 52 53 ! Local: … … 76 77 character(len=80) :: abort_message 77 78 79 80 ! Sanity check: verify that options selected by user are not incompatible 81 if ((iflag_phys==1).and. .not. read_start) then 82 write(lunout,*) trim(modname)," error: if read_start is set to ", & 83 " false then iflag_phys should not be 1" 84 write(lunout,*) "You most likely want an aquaplanet initialisation", & 85 " (iflag_phys >= 100)" 86 call abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.false.",1) 87 endif 88 78 89 !----------------------------------------------------------------------- 79 90 ! 1. Initializations for Earth-like case -
trunk/LMDZ.COMMON/libf/dyn3d_common/interpre.F
r1300 r1391 29 29 real masse(iip1,jjp1,llm) 30 30 real massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm) 31 real w(iip1,jjp1,llm +1)31 real w(iip1,jjp1,llm) 32 32 real fluxwppm(iim,jjp1,llm) 33 33 real pbaru(iip1,jjp1,llm ) -
trunk/LMDZ.COMMON/libf/dyn3d_common/juldate.F
r1300 r1391 1 1 ! 2 ! $Id: juldate.F 1403 2010-07-01 09:02:53Z fairhead$2 ! $Id: juldate.F 2197 2015-02-09 07:13:05Z emillour $ 3 3 ! 4 4 subroutine juldate(ian,imoi,ijou,oh,om,os,tjd,tjdsec) … … 7 7 c En entree:an,mois,jour,heure,min.,sec. 8 8 c En sortie:tjd 9 implicit real (a-h,o-z) 9 IMPLICIT NONE 10 INTEGER,INTENT(IN) :: ian,imoi,ijou,oh,om,os 11 REAL,INTENT(OUT) :: tjd,tjdsec 12 13 REAL frac,year,rmon,cf,a,b 14 INTEGER ojou 15 10 16 frac=((os/60.+om)/60.+oh)/24. 11 17 ojou=dble(ijou)+frac -
trunk/LMDZ.COMMON/libf/dyn3d_common/massbar.F
r1300 r1391 3 3 ! 4 4 SUBROUTINE massbar( masse, massebx, masseby ) 5 IMPLICIT NONE 5 6 c 6 7 c ********************************************************************** … … 24 25 REAL masse( ip1jmp1,llm ), massebx( ip1jmp1,llm ) , 25 26 * masseby( ip1jm,llm ) 27 INTEGER ij,l 26 28 c 27 29 c -
trunk/LMDZ.COMMON/libf/dyn3d_common/massbarxy.F
r1300 r1391 3 3 ! 4 4 SUBROUTINE massbarxy( masse, massebxy ) 5 IMPLICIT NONE 5 6 c 6 7 c ********************************************************************** … … 23 24 c 24 25 REAL masse( ip1jmp1,llm ), massebxy( ip1jm,llm ) 26 INTEGER ij,l 25 27 c 26 28 -
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 -
trunk/LMDZ.COMMON/libf/dyn3d_common/ran1.F
r1300 r1391 1 1 ! 2 ! $Id: ran1.F 1403 2010-07-01 09:02:53Z fairhead$2 ! $Id: ran1.F 2197 2015-02-09 07:13:05Z emillour $ 3 3 ! 4 4 FUNCTION RAN1(IDUM) 5 DIMENSION R(97) 6 save r 7 save iff,ix1,ix2,ix3 8 PARAMETER (M1=259200,IA1=7141,IC1=54773,RM1=3.8580247E-6) 9 PARAMETER (M2=134456,IA2=8121,IC2=28411,RM2=7.4373773E-6) 10 PARAMETER (M3=243000,IA3=4561,IC3=51349) 11 DATA IFF /0/ 5 IMPLICIT NONE 6 REAL RAN1 7 REAL,SAVE :: R(97) 8 REAL,PARAMETER :: RM1=3.8580247E-6,RM2=7.4373773E-6 9 INTEGER,SAVE :: IFF=0 10 integer,save :: ix1,ix2,ix3 11 INTEGER,PARAMETER :: M1=259200,IA1=7141,IC1=54773 12 INTEGER,PARAMETER :: M2=134456,IA2=8121,IC2=28411 13 INTEGER,PARAMETER :: M3=243000,IA3=4561,IC3=51349 14 INTEGER :: IDUM,J 15 12 16 IF (IDUM.LT.0.OR.IFF.EQ.0) THEN 13 17 IFF=1 -
trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc.F
r1300 r1391 1 1 ! 2 ! $Id: sortvarc.F 1403 2010-07-01 09:02:53Z fairhead$2 ! $Id: sortvarc.F 2083 2014-07-09 14:43:31Z emillour $ 3 3 ! 4 4 SUBROUTINE sortvarc … … 6 6 $ vcov ) 7 7 8 use control_mod,only:resetvarc8 USE control_mod, ONLY: resetvarc 9 9 IMPLICIT NONE 10 10 11 11 12 c======================================================================= … … 24 25 c ------------- 25 26 26 #include "dimensions.h" 27 #include "paramet.h" 28 #include "comconst.h" 29 #include "comvert.h" 30 #include "comgeom.h" 31 #include "ener.h" 32 #include "logic.h" 33 #include "temps.h" 27 INCLUDE "dimensions.h" 28 INCLUDE "paramet.h" 29 INCLUDE "comconst.h" 30 INCLUDE "comvert.h" 31 INCLUDE "comgeom.h" 32 INCLUDE "ener.h" 33 INCLUDE "logic.h" 34 INCLUDE "temps.h" 35 INCLUDE "iniprint.h" 34 36 35 37 c Arguments: 36 38 c ---------- 37 39 38 INTEGER itau 39 REAL ucov(ip1jmp1,llm),teta(ip1jmp1,llm),masse(ip1jmp1,llm) 40 REAL vcov(ip1jm,llm) 41 REAL ps(ip1jmp1),phis(ip1jmp1) 42 REAL vorpot(ip1jm,llm) 43 REAL phi(ip1jmp1,llm),bern(ip1jmp1,llm) 44 REAL dp(ip1jmp1) 45 REAL time 46 REAL pk(ip1jmp1,llm) 40 INTEGER,INTENT(IN) :: itau 41 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) 42 REAL,INTENT(IN) :: teta(ip1jmp1,llm) 43 REAL,INTENT(IN) :: masse(ip1jmp1,llm) 44 REAL,INTENT(IN) :: vcov(ip1jm,llm) 45 REAL,INTENT(IN) :: ps(ip1jmp1) 46 REAL,INTENT(IN) :: phis(ip1jmp1) 47 REAL,INTENT(IN) :: vorpot(ip1jm,llm) 48 REAL,INTENT(IN) :: phi(ip1jmp1,llm) 49 REAL,INTENT(IN) :: bern(ip1jmp1,llm) 50 REAL,INTENT(IN) :: dp(ip1jmp1) 51 REAL,INTENT(IN) :: time 52 REAL,INTENT(IN) :: pk(ip1jmp1,llm) 47 53 48 54 c Local: … … 57 63 58 64 REAL SSUM 59 60 logical firstcal 61 data firstcal/.true./ 62 save firstcal 65 LOGICAL,SAVE :: firstcal=.true. 66 CHARACTER(LEN=*),PARAMETER :: modname="sortvarc" 63 67 64 68 c----------------------------------------------------------------------- … … 143 147 144 148 IF (firstcal.and.resetvarc) then 145 PRINT 3500, itau, rjour, heure,time 146 PRINT*,'WARNING!!! On recalcule les valeurs initiales de :' 147 PRINT*,'ptot,rmsdpdt,etot,ztot,stot,rmsv,ang' 148 PRINT *, ptot,rmsdpdt,etot,ztot,stot,rmsv,ang 149 WRITE(lunout,3500) itau, rjour, heure, time 150 WRITE(lunout,*) trim(modname), 151 & ' WARNING!!! Recomputing initial values of : ' 152 WRITE(lunout,*) 'ptot,rmsdpdt,etot,ztot,stot,rmsv,ang' 153 WRITE(lunout,*) ptot,rmsdpdt,etot,ztot,stot,rmsv,ang 149 154 etot0 = etot 150 155 ptot0 = ptot … … 185 190 firstcal = .false. 186 191 187 PRINT 3500, itau, rjour, heure, time 188 PRINT 4000, ptot,rmsdpdt,etot,ztot,stot,rmsv,ang 189 190 RETURN 192 WRITE(lunout,3500) itau, rjour, heure, time 193 WRITE(lunout,4000) ptot,rmsdpdt,etot,ztot,stot,rmsv,ang 191 194 192 195 3500 FORMAT(10("*"),4x,'pas',i7,5x,'jour',f9.0,'heure',f5.1,4x
Note: See TracChangeset
for help on using the changeset viewer.