Changeset 710 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jun 28, 2012, 10:02:21 AM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/aeronomars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/aeronomars/diffusion.h
r645 r710 10 10 11 11 parameter (Pdiff=15.) ! pressure below which diffusion is computed 12 parameter (tdiffmin= 10d0)12 parameter (tdiffmin=5d0) 13 13 parameter (dzres=2d0) ! grid resolution (km) for diffusion 14 14 -
trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90
r658 r710 97 97 integer,save :: ncompdiff 98 98 integer,dimension(:),allocatable,save :: gcmind ! array of GCM indexes 99 integer ierr 99 integer ierr,compteur 100 100 101 101 logical,save :: firstcall=.true. … … 312 312 313 313 CALL GCMGRID_P(Zraf,Praf,Qraf,Traf,Nrafk,Rrafk,qq,qint,tt,tint & 314 & ,pp,mmol,gcmind,nlraf,ncompdiff,nlayermx )314 & ,pp,mmol,gcmind,nlraf,ncompdiff,nlayermx,ig) 315 315 316 316 ! We compute the mass correction factor of each specie at each pressure level … … 554 554 555 555 CALL GCMGRID_P2(Zraf,Praf,Qraf,Traf,Nrafk,Rrafk,qq,qnew,tt,tnew,& 556 & pp,mmol,gcmind,nlraf,ncompdiff,nlayermx,FacMass )556 & pp,mmol,gcmind,nlraf,ncompdiff,nlayermx,FacMass,ig) 557 557 558 558 CALL RHOTOT(pp,tt,massemoy,qnew,RHOT,RHOK,nlayermx,ncompdiff) … … 561 561 do l=il0,nlayermx 562 562 write(*,'(i2,1x,19(e12.4,1x))') l,zz(l),tt(l),RHOK(l,1)/sum(RHOK(l,:)),RHOKINIT(l,1)/sum(RHOKINIT(l,:)),& 563 & RHOK(l,2)/sum(RHOK(l,:)),RHOKINIT(l,2)/sum(RHOKINIT(l,:)),& 564 & RHOK(l,6)/sum(RHOK(l,:)),RHOKINIT(l,6)/sum(RHOKINIT(l,:)),& 563 565 & RHOK(l,5)/sum(RHOK(l,:)),RHOKINIT(l,5)/sum(RHOKINIT(l,:)),& 564 & RHOK(l,3)/sum(RHOK(l,:)),RHOKINIT(l,3)/sum(RHOKINIT(l,:)),&565 & RHOK(l,6)/sum(RHOK(l,:)),RHOKINIT(l,6)/sum(RHOKINIT(l,:)),&566 566 & RHOK(l,7)/sum(RHOK(l,:)),RHOKINIT(l,7)/sum(RHOKINIT(l,:)) 567 567 enddo … … 1352 1352 1353 1353 SUBROUTINE GCMGRID_P(Z,P,Q,T,Nk,Rk,qq,qnew,tt,tnew, & 1354 & pp,M,gc,nl,nq,nlx )1354 & pp,M,gc,nl,nq,nlx,ig) 1355 1355 IMPLICIT NONE 1356 1356 #include "dimensions.h" 1357 INTEGER :: nl,nq,nlx,il,nn,iP 1357 INTEGER :: nl,nq,nlx,il,nn,iP,ig,compteur 1358 1358 INTEGER,DIMENSION(1) :: indP 1359 1359 INTEGER,DIMENSION(nq) :: gc … … 1412 1412 Pnew2=Pnew 1413 1413 1414 compteur=0 1414 1415 do while (pnew2 .ge. pp(il)) 1416 compteur=compteur+1 1415 1417 do nn=1,nq 1416 1418 Hi=Konst*T(nl)/dble(M(gc(nn)))/g … … 1421 1423 Znew=Znew2 1422 1424 Znew2=Znew2+Dz 1425 if (compteur .ge. 100000) then 1426 print*,'error moldiff_red infinite loop' 1427 print*,ig,il,pp(il),tt(nl),pnew2,qnew(il,:),Znew2 1428 stop 1429 endif 1423 1430 ! print*,'test',Pnew2,Znew2,Nnew(nq),pp(il) 1424 1431 enddo … … 1446 1453 1447 1454 SUBROUTINE GCMGRID_P2(Z,P,Q,T,Nk,Rk,qq,qnew,tt,tnew & 1448 & ,pp,M,gc,nl,nq,nlx,facM )1455 & ,pp,M,gc,nl,nq,nlx,facM,ig) 1449 1456 IMPLICIT NONE 1450 1457 #include "dimensions.h" 1451 INTEGER :: nl,nq,nlx,il,nn,iP 1458 INTEGER :: nl,nq,nlx,il,nn,iP,ig,compteur 1452 1459 INTEGER,DIMENSION(1) :: indP 1453 1460 INTEGER,DIMENSION(nq) :: gc … … 1505 1512 Pnew2=Pnew 1506 1513 1514 compteur=0 1507 1515 do while (pnew2 .ge. pp(il)) 1516 compteur=compteur+1 1508 1517 do nn=1,nq 1509 1518 Hi=Konst*T(nl)/dble(M(gc(nn)))/g … … 1514 1523 Znew=Znew2 1515 1524 Znew2=Znew2+Dz 1525 if (compteur .ge. 100000) then 1526 print*,'pb moldiff_red infinite loop' 1527 print*,ig,nl,T(nl),pnew2,qnew(il,:),Znew2 1528 stop 1529 endif 1530 1516 1531 ! print*,'test',Pnew2,Znew2,Nnew(nq),pp(il) 1517 1532 enddo -
trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F
r645 r710 87 87 real dnh 88 88 logical,save :: firstcall=.true. 89 logical,parameter :: outputcoeffs=.false. ! to output 'coeffs.dat' file, 90 ! set outputcoeffs=.true. 89 91 90 92 ! Initializations at first call (and some sanity checks) … … 253 255 if (noms(n) .eq. 'o') g_o=n 254 256 enddo 255 print*,' gh2',g_h2,g_h,g_o256 257 print*,'moldiffcoef : COEFF CALC'258 open(56,file='coeffs.dat',status='unknown') 257 print*,'moldiffcoeff_red: gh2',g_h2,g_h,g_o 258 259 print*,'moldiffcoeff_red: COEFF CALC' 260 259 261 do n=1,ncompdiff2 260 262 dijref=0. … … 283 285 enddo 284 286 285 do n=1,ncompdiff2 287 if (outputcoeffs) then 288 ! output coefficients in 'coeffs.dat' file 289 open(56,file='coeffs.dat',status='unknown') 290 do n=1,ncompdiff2 286 291 do nn=n,ncompdiff2 287 292 write(56,*) n,nn,dij(n,nn) !*1.e5/1.381e-23/(273**1.75) 288 293 enddo 289 enddo 290 close(56) 294 enddo 295 close(56) 296 endif 291 297 292 298
Note: See TracChangeset
for help on using the changeset viewer.