Changeset 1661
- Timestamp:
- Feb 8, 2017, 4:40:26 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/makelmdz
r1650 r1661 376 376 OPTIMC="${coptim}" 377 377 INCLUDEC='-I$(LIBF)/grid -I.' 378 fi 379 ######### 380 381 ######### CAS PARTICULIER NUAGES VENUS 382 if [[ "$physique" == "venus" ]] 383 then 384 src_dirs="$src_dirs phy${physique}/cloudvenus" 378 385 fi 379 386 ######### -
trunk/LMDZ.COMMON/makelmdz_fcm
r1650 r1661 59 59 COSP_PATH=$LMDGCM/.void_dir 60 60 CHEM_PATH=$LMDGCM/.void_dir 61 CLOUD_PATH=$LMDGCM/.void_dir 61 62 AERONO_PATH=$LMDGCM/.void_dir 62 63 # Path to fcm utility: … … 473 474 fi 474 475 476 # for Venus (but could be used by others as well), there is also "phyvenus/cloudvenus" 477 if [[ -d ${LIBFGCM}/phy${physique}/cloud${physique} ]] 478 then 479 CLOUD_PATH="${LIBFGCM}/phy${physique}/cloud${physique}" 480 INCLUDE="$INCLUDE -I${LIBFGCM}/phy${physique}/cloud${physique}" 481 fi 482 475 483 # for Mars (but could be used by others as well), there is also "aeronomars" 476 484 if [[ -d ${LIBFGCM}/aerono${physique} ]] … … 715 723 echo "%COSP $COSP_PATH" >> $config_fcm 716 724 echo "%CHEM $CHEM_PATH" >> $config_fcm 725 echo "%CLOUD $CLOUD_PATH" >> $config_fcm 717 726 echo "%AERONO $AERONO_PATH" >> $config_fcm 718 727 echo "%CPP_KEY $CPP_KEY" >> $config_fcm -
trunk/LMDZ.VENUS/libf/phyvenus/chemparam_mod.F90
r1621 r1661 1 1 MODULE chemparam_mod 2 2 3 !MODULE qui d éfinit les indices des traceurs et leurs masses molaires.3 !MODULE qui definit les indices des traceurs et leurs masses molaires. 4 4 ! utilise aussi pour variables communes nuages/photochimie 5 5 … … 13 13 i_cocl2, i_s, i_so, i_so2, i_so3, & 14 14 i_s2o2, i_ocs, i_hso3, i_h2so4, i_s2, & 15 i_clso2, i_oscl, i_h2oliq, i_h2so4liq, & 16 i_n2 15 i_clso2, i_oscl, i_n2 17 16 17 INTEGER, SAVE :: i_h2oliq, i_h2so4liq 18 19 INTEGER, SAVE :: i_m0_aer, i_m3_aer, & 20 i_m0_mode1drop, i_m0_mode1ccn, & 21 i_m3_mode1sa, i_m3_mode1w, i_m3_mode1ccn, & 22 i_m0_mode2drop, i_m0_mode2ccn, & 23 i_m3_mode2sa, i_m3_mode2w, i_m3_mode2ccn 24 25 INTEGER, SAVE :: nmicro ! number of microphysical tracers 26 18 27 REAL, DIMENSION(:), SAVE, ALLOCATABLE :: M_tr 19 28 20 29 21 30 !---------------------------------------------------------------------------- 31 ! DEF FOR CL_SCHEME = 1 (AURELIEN) 32 22 33 ! number of clouds mode modelized 23 34 INTEGER, PARAMETER :: nbr_mode = 3 … … 34 45 REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: WH2SO4 35 46 REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: rho_droplet 47 !---------------------------------------------------------------------------- 48 ! DEF FOR CL_SCHEME = 2 (FULL MICROPHYS) 49 36 50 !---------------------------------------------------------------------------- 37 51 … … 670 684 END SUBROUTINE cloud_ini 671 685 686 ! =========================================================== 687 672 688 SUBROUTINE chemparam_ini 673 689 USE infotrac_phy, ONLY: nqtot, tname … … 811 827 PRINT*,'oscl',i_oscl 812 828 M_tr(i_oscl)=83.517 829 CASE('n2') 830 i_n2=i 831 M_tr(i_n2)=28.013 832 ! MICROPHYSICAL TRACERS FOR CL_SCHEME=1 813 833 CASE('h2oliq') 814 834 i_h2oliq=i … … 819 839 PRINT*,'h2so4liq',i_h2so4liq 820 840 M_tr(i_h2so4liq)=98.078 821 CASE('n2') 822 i_n2=i 823 M_tr(i_n2)=28.013 841 ! MICROPHYSICAL TRACERS FOR CL_SCHEME=2 842 CASE('M0_aer') 843 i_m0_aer=i 844 PRINT*,'M0_aer',i_m0_aer 845 CASE('M3_aer') 846 i_m3_aer=i 847 PRINT*,'M3_aer',i_m3_aer 848 CASE('M0_m1drop') 849 i_m0_mode1drop=i 850 PRINT*,'M0_m1drop',i_m0_mode1drop 851 CASE('M0_m1ccn') 852 i_m0_mode1ccn=i 853 PRINT*,'M0_m1ccn',i_m0_mode1ccn 854 CASE('M3_m1sa') 855 i_m3_mode1sa=i 856 PRINT*,'M3_m1sa',i_m3_mode1sa 857 CASE('M3_m1w') 858 i_m3_mode1w=i 859 PRINT*,'M3_m1w',i_m3_mode1w 860 CASE('M3_m1ccn') 861 i_m3_mode1ccn=i 862 PRINT*,'M3_m1ccn',i_m3_mode1ccn 863 CASE('M0_m2drop') 864 i_m0_mode2drop=i 865 PRINT*,'M0_m2drop',i_m0_mode2drop 866 CASE('M0_m2ccn') 867 i_m0_mode2ccn=i 868 PRINT*,'M0_m2ccn',i_m0_mode2ccn 869 CASE('M3_m2sa') 870 i_m3_mode2sa=i 871 PRINT*,'M3_m2sa',i_m3_mode2sa 872 CASE('M3_m2w') 873 i_m3_mode2w=i 874 PRINT*,'M3_m2w',i_m3_mode2w 875 CASE('M3_m2ccn') 876 i_m3_mode2ccn=i 877 PRINT*,'M3_m2ccn',i_m3_mode2ccn 824 878 END SELECT 825 879 … … 828 882 829 883 END SUBROUTINE chemparam_ini 830 884 885 ! =========================================================== 886 887 SUBROUTINE vapors4muphy_ini(nlon,nlev,trac) 888 USE infotrac_phy, ONLY: nqtot, tname 889 IMPLICIT NONE 890 891 integer :: nlon, nlev 892 real :: trac(nlon,nlev,nqtot) ! traceur ( en vmr) 893 894 integer :: i 895 real :: trac1d(nlev,2) ! traceur lu ( en vmr) 896 897 ! lecture d'un fichier texte contenant les profils de trac1d(:1) = H2O et trac1d(:,2) = H2SO4 898 899 DO i=1,nlon 900 trac(i,:,i_h2o) = trac1d(:,1) 901 trac(i,:,i_h2so4) = trac1d(:,2) 902 ENDDO 903 904 905 END SUBROUTINE vapors4muphy_ini 906 831 907 END MODULE chemparam_mod 832 908 -
trunk/LMDZ.VENUS/libf/phyvenus/clesphys.h
r1642 r1661 15 15 INTEGER nbapp_rad, nbapp_chim, iflag_con, iflag_ajs 16 16 INTEGER lev_histins, lev_histday, lev_histmth 17 INTEGER tr_scheme 17 INTEGER tr_scheme, cl_scheme 18 18 INTEGER nircorr, nltemodel, solvarmod 19 19 REAL ecriphy … … 32 32 & iflag_con, iflag_ajs, & 33 33 & lev_histins, lev_histday, lev_histmth, tr_scheme, & 34 & nircorr, nltemodel, solvarmod, nb_mode34 & cl_scheme, nircorr, nltemodel, solvarmod, nb_mode 35 35 36 36 COMMON/clesphys_r/ ecriphy, solaire, z0, lmixmin, & -
trunk/LMDZ.VENUS/libf/phyvenus/conf_phys.F90
r1642 r1661 334 334 ok_cloud = .FALSE. 335 335 call getin('ok_cloud',ok_cloud) 336 337 ! 338 !Config Key = cl_scheme 339 !Config Desc = 340 !Config Def = 2 341 !Config Help = 342 ! 343 ! 1 = Simple microphysics (Aurelien Stolzenbach's PhD) 344 ! 2 = Full microphysics (momentum scheme, Sabrina Guilbon's PhD) 345 346 cl_scheme = 2 347 call getin('cl_scheme',cl_scheme) 336 348 337 349 ! -
trunk/LMDZ.VENUS/libf/phyvenus/ini_histins.h
r1530 r1661 141 141 . "ins(X)", zsto,zout) 142 142 c 143 if (ok_cloud ) THEN143 if (ok_cloud.and.(cl_scheme.eq.1)) THEN 144 144 145 145 if (nb_mode.GE.1) THEN … … 235 235 ENDIF 236 236 237 if (ok_sedim ) THEN237 if (ok_sedim.and.(cl_scheme.eq.1)) THEN 238 238 c 239 239 CALL histdef(nid_ins, "d_tr_sed_H2SO4", "var mmr from sedim", … … 257 257 c 258 258 ENDIF 259 259 260 ENDIF !lev_histins.GE.2 260 261 c -
trunk/LMDZ.VENUS/libf/phyvenus/new_cloud_venus.F
r1639 r1661 34 34 !---------------------------------------------------------------------------- 35 35 ! Thermodynamic functions: 36 REAL :: R HODROPLET36 REAL :: ROSAS 37 37 !---------------------------------------------------------------------------- 38 38 ! Auxilary variables: … … 134 134 & mrt_wv(ilon,ilev),mrt_sa(ilon,ilev),NBROOT) 135 135 136 rho_droplet(ilon,ilev)=RHODROPLET(WH2SO4(ilon,ilev), 137 & TT(ilon,ilev)) 136 rho_droplet(ilon,ilev)=ROSAS(TT(ilon,ilev),WH2SO4(ilon,ilev)) 138 137 139 138 ! IF (rho_droplet(ilon,ilev).LT.1100.) THEN … … 141 140 ! PRINT*,'rho_droplet',rho_droplet(ilon,ilev) 142 141 ! PRINT*,'T',TT(ilon,ilev),'WSA',WH2SO4(ilon,ilev) 143 ! PRINT*,'RHODROPLET',RHODROPLET(WH2SO4(ilon,ilev), 144 ! & TT(ilon,ilev)) 142 ! PRINT*,'RHODROPLET',ROSAS(TT(ilon,ilev),WH2SO4(ilon,ilev)) 145 143 ! PRINT*,'FLAG',FLAG,'NROOT',NBROOT 146 144 ! STOP … … 204 202 WH2SO4(ilon,ilev)=WSAFLAG 205 203 206 rho_droplet(ilon,ilev)=RHODROPLET(WH2SO4(ilon,ilev), 207 & TT(ilon,ilev)) 204 rho_droplet(ilon,ilev)=ROSAS(TT(ilon,ilev),WH2SO4(ilon,ilev)) 208 205 209 206 ! ATTENTION ce IF ne sert a rien en fait, juste a retenir une situation … … 211 208 ! incoherentes avec TT et WH2SO4 (a priori lorsque NTOT=0) 212 209 ! Juste le fait de METTRE un IF fait que rho_droplet a la bonne valeur 213 ! donne par R HODROPLET(cf test externe en Python), sinon, la valeur est trop210 ! donne par ROSAS (cf test externe en Python), sinon, la valeur est trop 214 211 ! basse (de l'ordre de 1000 kg/m3) et correspond parfois a la valeur avec 215 212 ! WSA=0.1 (pas totalement sur) … … 223 220 PRINT*,'rho_droplet',rho_droplet(ilon,ilev) 224 221 PRINT*,'T',TT(ilon,ilev),'WSA',WH2SO4(ilon,ilev) 225 PRINT*,'RHODROPLET',RHODROPLET(WH2SO4(ilon,ilev), 226 & TT(ilon,ilev)) 222 PRINT*,'RHODROPLET',ROSAS(TT(ilon,ilev),WH2SO4(ilon,ilev)) 227 223 PRINT*,'FLAG',FLAG,'NROOT',NBROOT 228 224 STOP … … 298 294 299 295 300 !*****************************************************************************301 !* SUBROUTINE ITERWV()302 SUBROUTINE ITERWV(WV,WVLIQ,WVEQOUT,WVTOT,WSAOUT,SATOT,303 + TAIR,PAIR,RADIUS)304 !*****************************************************************************305 !* Cette routine est la solution par iteration afin de trouver WSA pour un WV,306 !* et donc LPPWV, donne. Ce qui nous donne egalement le WV correspondant au307 !* WSA solution308 !* For VenusGCM by A. Stolzenbach 07/2014309 !* OUTPUT: WVEQ et WSAOUT310 311 IMPLICIT NONE312 REAL, INTENT(IN) :: WV, WVTOT, SATOT, TAIR, PAIR, RADIUS313 314 REAl, INTENT(OUT) :: WVEQOUT, WSAOUT, WVLIQ315 316 REAL :: WSAMIN, WSAMAX, WSAACC317 PARAMETER(WSAACC=0.01)318 319 REAL :: LPPWV320 321 INTEGER :: MAXITSA, NBRACSA, NBROOT322 PARAMETER(MAXITSA=20)323 PARAMETER(NBRACSA=5)324 325 LOGICAl :: FLAG1,FLAG2326 327 ! External Function328 REAl :: IRFRMSA, WVCOND329 330 IF (RADIUS.LT.1E-30) THEN331 PRINT*,'RMODE == 0 FLAG 3'332 STOP333 ENDIF334 ! Initialisation WSA=[0.1,1.0]335 WSAMIN=0.1336 WSAMAX=1.0337 338 LPPWV=DLOG(PAIR*WV)339 340 ! Appel Bracket de KEEQ341 CALL BRACWSA(WSAMIN,WSAMAX,NBRACSA,RADIUS,TAIR,342 & LPPWV,FLAG1,FLAG2,NBROOT)343 344 IF ((.NOT.FLAG1).AND.(.NOT.FLAG2).AND.(NBROOT.EQ.1)) THEN345 ! Appel Ridder's Method346 347 WSAOUT=IRFRMSA(WSAMIN,WSAMAX,WSAACC,MAXITSA,348 & RADIUS,TAIR,PAIR,LPPWV,NBROOT)349 ! IF (WSAOUT.EQ.1.0) WSAOUT=0.999999350 ! IF (WSAOUT.LT.0.1) WSAOUT=0.1351 352 ! Si BRACWSA ne trouve aucun ensemble solution KEEQ=0 on fixe WSA a 0.9999 ou 0.1353 ELSE354 IF (FLAG1.AND.(.NOT.FLAG2)) WSAOUT=0.999999355 IF (FLAG2.AND.(.NOT.FLAG1)) WSAOUT=WSAMIN356 IF (FLAG1.AND.FLAG2) THEN357 PRINT*,'FLAGs BRACWSA tous TRUE'358 STOP359 ENDIF360 ENDIF361 362 363 ! WVEQ output correspondant a WVliq lie a WSA calcule364 WVLIQ=WVCOND(WSAOUT,TAIR,PAIR,SATOT)365 WVEQOUT=(WVLIQ+WV)/WVTOT-1.0366 367 END SUBROUTINE ITERWV368 369 370 !*****************************************************************************371 !* SUBROUTINE BRACWV()372 SUBROUTINE BRACWV(XA,XB,N,RADIUS,WVTOT,SATOT,TAIR,PAIR,373 + FLAGWV,WSAFLAG,NROOT)374 !*****************************************************************************375 !* Bracket de ITERWV376 !* From Numerical Recipes377 !* Adapted for VenusGCM A. Stolzenbach 07/2014378 !* X est WVinput379 !* OUTPUT: XA et XB380 381 IMPLICIT NONE382 383 REAL, INTENT(IN) :: WVTOT,SATOT,RADIUS,TAIR,PAIR384 INTEGER, INTENT(IN) :: N385 386 REAL, INTENT(INOUT) :: XA,XB387 REAL, INTENT(OUT) :: WSAFLAG388 389 INTEGER :: I,J390 391 INTEGER, INTENT(OUT) :: NROOT392 393 REAL :: FP, FC, X, WVEQ, WVLIQ, WSAOUT394 REAL :: XMAX,XMIN,WVEQACC395 396 INTEGER, INTENT(OUT) :: FLAGWV397 398 ! WVEQACC est le seuil auquel on accorde un WSA correct meme399 ! si il ne fait pas partie d'une borne. Utile quand le modele400 ! s'approche de 0 mais ne l'atteint pas.401 WVEQACC=1.0E-3402 403 FLAGWV=1404 405 NROOT=0406 407 ! 25/11/2016408 ! On change ordre on va du max au min409 X=XB410 XMAX=XB411 XMIN=XA412 413 ! CAS 1 On borne la fonction (WVEQ=0)414 415 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSAOUT,SATOT,TAIR,PAIR,RADIUS)416 FP=WVEQ417 418 DO I=N-1,1,-1419 X=(1.-DLOG(REAL(N-I))/DLOG(REAL(N)))*XMAX420 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSAOUT,SATOT,TAIR,PAIR,RADIUS)421 FC=WVEQ422 423 IF ((FP*FC).LT.0.0) THEN424 NROOT=NROOT+1425 ! Si NROOT>1 on place la borne sup output la borne min du calcul en i426 IF (NROOT.GT.1) THEN427 XB=(1.-DLOG(REAL(I+1))/DLOG(REAL(N)))*XMAX428 ENDIF429 430 IF (I.EQ.1) THEN431 XA=XMIN432 ELSE433 XA=X434 ENDIF435 RETURN436 ENDIF437 FP=FC438 ENDDO439 440 ! CAS 2 on refait la boucle pour tester si WVEQ est proche de 0441 ! avec le seuil WVEQACC442 IF (NROOT.EQ.0) THEN443 X=XMAX444 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSAOUT,SATOT,445 + TAIR,PAIR,RADIUS)446 DO J=N-1,1,-1447 X=(1.-DLOG(REAL(N-J))/DLOG(REAL(N)))*XMAX448 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSAOUT,SATOT,449 + TAIR,PAIR,RADIUS)450 451 IF (ABS(WVEQ).LE.WVEQACC) THEN452 WSAFLAG=WSAOUT453 FLAGWV=2454 RETURN455 ENDIF456 ENDDO457 458 ! CAS 3 Pas de borne, WVEQ jamais proche de 0459 FLAGWV=3460 RETURN461 ENDIF462 463 END SUBROUTINE BRACWV464 465 !*****************************************************************************466 !* SUBROUTINE BRACWSA()467 SUBROUTINE BRACWSA(XA,XB,N,RADIUS,TAIR,LPPWVINP,FLAGH,FLAGL,468 + NROOT)469 !*****************************************************************************470 !* Bracket de KEEQ471 !* From Numerical Recipes472 !* Adapted for VenusGCM A. Stolzenbach 07/2014473 474 IMPLICIT NONE475 476 !----------------------------------------------------------------------------477 ! External functions needed:478 REAl KEEQ479 !----------------------------------------------------------------------------480 481 REAL, INTENT(IN) :: RADIUS,TAIR,LPPWVINP482 INTEGER, INTENT(IN) :: N483 484 REAL, INTENT(INOUT) :: XA,XB485 486 INTEGER, INTENT(OUT) :: NROOT487 488 INTEGER :: I, J489 490 REAL :: DX, FP, FC, X491 492 LOGICAL, INTENT(OUT) :: FLAGH,FLAGL493 494 495 FLAGL=.FALSE.496 FLAGH=.FALSE.497 NROOT=0498 DX=(XB-XA)/N499 X=XB500 FP=KEEQ(RADIUS,TAIR,X,LPPWVINP)501 502 DO I=N,1,-1503 X=X-DX504 FC=KEEQ(RADIUS,TAIR,X,LPPWVINP)505 506 IF ((FP*FC).LE.0.) THEN507 NROOT=NROOT+1508 XA=X509 XB=X+DX510 RETURN511 ! IF (NROOT.GT.1) THEN512 ! PRINT*,'On a plus d1 intervalle KEEQ=0'513 ! PRINT*,'Probleme KEEQ=0 => 1 racine en theorie'514 ! X=X-(I*DX)515 ! FP=KEEQ(RADIUS,TAIR,X,LPPWVINP)516 ! PRINT*,'KEEQ(WSA)',FP,X,TAIR517 ! DO J=1,N518 ! X=X+DX519 ! FP=KEEQ(RADIUS,TAIR,X,LPPWVINP)520 ! PRINT*,'KEEQ(WSA)',FP,X521 ! ENDDO522 ! STOP523 ! ENDIF524 ENDIF525 526 FP=FC527 ENDDO528 529 IF (NROOT.EQ.0) THEN530 ! PRINT*,'On a 0 intervalle KEEQ=0'531 ! PRINT*,'Probleme KEEQ=0 => 1 racine en theorie'532 ! PRINT*,'XA',XA,'KEEQ',KEEQ(RADIUS,TAIR,XA,LPPWVINP)533 ! PRINT*,'XB',XB,'KEEQ',KEEQ(RADIUS,TAIR,XB,LPPWVINP)534 ! PRINT*,'TT',TAIR535 ! PRINT*,'RADIUS',RADIUS536 ! PRINT*,'NBRAC',N537 ! STOP538 539 ! X=XA540 ! FP=KEEQ(RADIUS,TAIR,X,LPPWVINP)541 ! PRINT*,'KEEQ(WSA)',FP,X,TAIR542 ! DO I=1,N543 ! X=X+DX544 ! FP=KEEQ(RADIUS,TAIR,X,LPPWVINP)545 ! PRINT*,'KEEQ(WSA)',FP,X,TAIR546 ! ENDDO547 548 549 ! Test determine la tendance globale KEEQ sur [WSAMIN,WSAMAX]550 IF ((ABS(KEEQ(RADIUS,TAIR,XA,LPPWVINP))-551 & ABS(KEEQ(RADIUS,TAIR,XB,LPPWVINP))).GT.0.0) FLAGH=.TRUE.552 ! On fixe flag low TRUE pour WSA = 0.1553 IF ((ABS(KEEQ(RADIUS,TAIR,XA,LPPWVINP))-554 & ABS(KEEQ(RADIUS,TAIR,XB,LPPWVINP))).LT.0.0) FLAGL=.TRUE.555 ! STOP556 ENDIF557 558 END SUBROUTINE BRACWSA559 560 561 !*****************************************************************************562 !* REAL FUNCTION WVCOND()563 REAL FUNCTION WVCOND(WSA,T,P,SAt)564 !*****************************************************************************565 !* Condensation de H2O selon WSA, T et P et H2SO4tot566 !*567 !* Adapted for VenusGCM A. Stolzenbach 07/2014568 ! INPUT:569 ! SAt : VMR of total H2SO4570 ! WSA: aerosol H2SO4 weight fraction (fraction)571 ! T: temperature (K)572 ! P: pressure (Pa)573 ! OUTPUT:574 ! WVCOND : VMR H2O condense575 576 ! USE chemparam_mod577 578 IMPLICIT NONE579 580 REAL, INTENT(IN) :: SAt, WSA581 REAL, INTENT(IN) :: T, P582 583 ! working variables584 REAL SA, WV585 REAL DND2,pstand,lpar,acidps586 REAL x1, satpacid587 REAL , DIMENSION(2):: act588 REAL CONCM589 REAL NH2SO4590 REAL H2OCOND, H2SO4COND591 592 593 CONCM= (P)/(1.3806488E-23*T) !air number density, molec/m3? CHECK UNITS!594 595 NH2SO4=SAt*CONCM596 597 pstand=1.01325E+5 !Pa 1 atm pressure598 599 x1=(WSA/98.08)/(WSA/98.08 + ((1.-WSA)/18.0153))600 601 CALL zeleznik(x1,T,act)602 603 !pure acid satur vapor pressure604 lpar= -11.695+DLOG(pstand) ! Zeleznik605 acidps=1/360.15-1.0/T+0.38/545.606 & *(1.0+DLOG(360.15/T)-360.15/T)607 acidps = 10156.0*acidps +lpar608 acidps = DEXP(acidps) !Pa609 610 !acid sat.vap.PP over mixture (flat surface):611 satpacid=act(2)*acidps ! Pa612 613 ! Conversion from Pa to N.D #/m3614 DND2=satpacid/(1.3806488E-23*T)615 616 ! H2SO4COND N.D #/m3 condensee ssi H2SO4>H2SO4sat617 IF (NH2SO4.GT.DND2) THEN618 H2SO4COND=NH2SO4-DND2619 ! calcul de H2O cond correspondant a H2SO4 cond620 H2OCOND=H2SO4COND*98.078*(1.0-WSA)/(18.0153*WSA)621 622 ! Si on a H2SO4<H2SO4sat on ne condense rien, VMR = 1.0E-30623 ELSE624 H2OCOND=1.0E-30*CONCM625 END IF626 627 !*****************************************************628 ! ATTENTION: Ici on ne prends pas en compte629 ! si H2O en defaut!630 ! On veut la situation theorique631 ! a l'equilibre632 !*****************************************************633 ! Test si H2O en defaut H2Ocond>H2O dispo634 ! IF ((H2OCOND.GT.NH2O).AND.(NH2SO4.GE.DND2)) THEN635 636 ! On peut alors condenser tout le H2O dispo637 ! H2OCOND=NH2O638 ! On met alors egalement a jour le H2SO4 cond correspondant au H2O cond639 ! H2SO4COND=H2OCOND*18.0153*WSA/(98.078*(1.0-WSA))640 641 ! END IF642 643 ! Calcul de H2O condense VMR644 WVCOND=H2OCOND/CONCM645 646 END FUNCTION WVCOND647 648 !*****************************************************************************649 !* REAL FUNCTION IRFRMWV()650 REAL FUNCTION IRFRMWV(X1,X2,XACC,MAXIT,RADIUS,TAIR,PAIR,651 + WVTOT,SATOT,NROOT)652 !*****************************************************************************653 !* Iterative Root Finder Ridder's Method for Water Vapor calculus654 !* From Numerical Recipes655 !* Adapted for VenusGCM A. Stolzenbach 07/2014656 !*657 !* Les iterations sur [X1,X2] sont [WV1,WV2]658 !* la variable X est WV659 !* IRFRMWV sort en OUTPUT : WSALOC pour ITERWV=0 (ou WVEQ=0)660 661 IMPLICIT NONE662 663 REAL, INTENT(IN) :: X1, X2664 REAL, INTENT(IN) :: XACC665 INTEGER, INTENT(IN) :: MAXIT,NROOT666 667 ! LOCAL VARIABLES668 REAL :: XL, XH, XM, XNEW, X669 REAL :: WSALOC, WVEQ, WVLIQ670 REAL :: FL, FH, FM, FNEW671 REAL :: ANS, S, FSIGN672 INTEGER i673 674 ! External variables needed:675 REAL, INTENT(IN) :: TAIR,PAIR676 REAL, INTENT(IN) :: WVTOT,SATOT677 REAL, INTENT(IN) :: RADIUS678 679 680 ! Initialisation681 X=X1682 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,TAIR,PAIR,RADIUS)683 FL=WVEQ684 X=X2685 CALL ITERWV(X,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,TAIR,PAIR,RADIUS)686 FH=WVEQ687 688 ! Test Bracketed values689 IF (((FL.LT.0.).AND.(FH.GT.0.)).OR.690 & ((FL.GT.0.).AND.(FH.LT.0.)))691 & THEN692 XL=X1693 XH=X2694 ANS=-9.99e99695 696 DO i=1, MAXIT697 XM=0.5*(XL+XH)698 CALL ITERWV(XM,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,699 & TAIR,PAIR,RADIUS)700 FM=WVEQ701 S=SQRT(FM*FM-FL*FH)702 703 IF (S.EQ.0.0) THEN704 IRFRMWV=WSALOC705 RETURN706 ENDIF707 708 IF (FL.GT.FH) THEN709 FSIGN=1.0710 ELSE711 FSIGN=-1.0712 ENDIF713 714 XNEW=XM+(XM-XL)*(FSIGN*FM/S)715 716 IF (ABS(XNEW-ANS).LE.XACC) THEN717 IRFRMWV=WSALOC718 RETURN719 ENDIF720 721 ANS=XNEW722 CALL ITERWV(ANS,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,723 & TAIR,PAIR,RADIUS)724 FNEW=WVEQ725 726 IF (FNEW.EQ.0.0) THEN727 IRFRMWV=WSALOC728 RETURN729 ENDIF730 731 IF (SIGN(FM, FNEW).NE.FM) THEN732 XL=XM733 FL=FM734 XH=ANS735 FH=FNEW736 ELSEIF (SIGN(FL, FNEW).NE.FL) THEN737 XH=ANS738 FH=FNEW739 ELSEIF (SIGN(FH, FNEW).NE.FH) THEN740 XL=ANS741 FL=FNEW742 ELSE743 PRINT*,'PROBLEM IRFRMWV dans new_cloud_venus'744 PRINT*,'you shall not PAAAAAASS'745 STOP746 ENDIF747 ENDDO748 PRINT*,'Paaaaas bien MAXIT atteint'749 PRINT*,'PROBLEM IRFRMWV dans new_cloud_venus'750 PRINT*,'you shall not PAAAAAASS'751 XL=X1752 XH=X2753 ANS=-9.99e99754 755 DO i=1, MAXIT756 XM=0.5*(XL+XH)757 CALL ITERWV(XM,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,758 & TAIR,PAIR,RADIUS)759 FM=WVEQ760 S=SQRT(FM*FM-FL*FH)761 IF (FL.GT.FH) THEN762 FSIGN=1.0763 ELSE764 FSIGN=-1.0765 ENDIF766 767 XNEW=XM+(XM-XL)*(FSIGN*FM/S)768 769 ANS=XNEW770 CALL ITERWV(ANS,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,771 & TAIR,PAIR,RADIUS)772 FNEW=WVEQ773 PRINT*,'WVliq',WVLIQ,'WVtot',WVTOT,'WVeq',WVEQ774 PRINT*,'WSA',WSALOC,'SAtot',SATOT775 PRINT*,'T',TAIR,'P',PAIR776 777 IF (SIGN(FM, FNEW).NE.FM) THEN778 XL=XM779 FL=FM780 XH=ANS781 FH=FNEW782 ELSEIF (SIGN(FL, FNEW).NE.FL) THEN783 XH=ANS784 FH=FNEW785 ELSEIF (SIGN(FH, FNEW).NE.FH) THEN786 XL=ANS787 FL=FNEW788 ELSE789 PRINT*,'PROBLEM IRFRMWV dans new_cloud_venus'790 PRINT*,'you shall not PAAAAAASS TWIIICE???'791 STOP792 ENDIF793 ENDDO794 STOP795 ELSE796 PRINT*,'IRFRMWV must be bracketed'797 PRINT*,'NROOT de BRACWV', NROOT798 IF (ABS(FL).LT.XACC) THEN799 PRINT*,'IRFRMWV FL == 0',FL800 PRINT*,'X1',X1,'X2',X2,'FH',FH801 CALL ITERWV(X1,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,802 & TAIR,PAIR,RADIUS)803 IRFRMWV=WSALOC804 RETURN805 ENDIF806 IF (ABS(FH).LT.XACC) THEN807 PRINT*,'IRFRMWV FH == 0',FH808 PRINT*,'X1',X1,'X2',X2,'FL',FL809 CALL ITERWV(X2,WVLIQ,WVEQ,WVTOT,WSALOC,SATOT,810 & TAIR,PAIR,RADIUS)811 IRFRMWV=WSALOC812 RETURN813 ENDIF814 IF ((ABS(FL).GT.XACC).AND.(ABS(FH).GT.XACC)) THEN815 PRINT*,'STOP dans IRFRMWV avec rien == 0'816 PRINT*,'X1',X1,'X2',X2817 PRINT*,'Fcalc',FL,FH818 PRINT*,'T',TAIR,'P',PAIR,'R',RADIUS819 STOP820 ENDIF821 IF ((ABS(FL).LT.XACC).AND.(ABS(FH).LT.XACC)) THEN822 PRINT*,'STOP dans IRFRMWV Trop de solution < WVACC'823 PRINT*,FL,FH824 STOP825 ENDIF826 827 828 ENDIF829 ! FIN Test Bracketed values830 831 END FUNCTION IRFRMWV832 833 !*****************************************************************************834 !* REAL FUNCTION IRFRMSA()835 REAL FUNCTION IRFRMSA(X1,X2,XACC,MAXIT,RADIUS,TAIR,PAIR,LPPWV,836 + NB)837 !*****************************************************************************838 !* Iterative Root Finder Ridder's Method for Sulfuric Acid calculus839 !* From Numerical Recipes840 !* Adapted for VenusGCM A. Stolzenbach 07/2014841 !*842 !* Les iterations sur [X1,X2] sont [WSA1,WSA2]843 !* la variable X est WSA844 !* IRFRMSA sort en OUTPUT : WSA pour KEEQ=0845 846 IMPLICIT NONE847 848 REAL, INTENT(IN) :: X1, X2849 REAL, INTENT(IN) :: XACC850 INTEGER, INTENT(IN) :: MAXIT, NB851 852 ! LOCAL VARIABLES853 REAL XL, XH, XM, XNEW854 REAL Fl, FH, FM, FNEW855 REAL ANS, S, FSIGN856 INTEGER i857 858 ! External variables needed:859 REAL, INTENT(IN) :: TAIR,PAIR860 REAL, INTENT(IN) :: LPPWV861 REAL, INTENT(IN) :: RADIUS862 863 ! External functions needed:864 REAL KEEQ865 866 867 868 ! Initialisation869 FL=KEEQ(RADIUS,TAIR,X1,LPPWV)870 FH=KEEQ(RADIUS,TAIR,X2,LPPWV)871 872 ! Test Bracketed values873 IF (((FL.LT.0.).AND.(FH.GT.0.)).OR.((FL.GT.0.).AND.(FH.LT.0.)))874 & THEN875 XL=X1876 XH=X2877 ANS=-9.99e99878 879 DO i=1, MAXIT880 XM=0.5*(XL+XH)881 FM=KEEQ(RADIUS,TAIR,XM,LPPWV)882 S=SQRT(FM*FM-FL*FH)883 884 IF (S.EQ.0.0) THEN885 IRFRMSA=ANS886 RETURN887 ENDIF888 889 IF (FL.GT.FH) THEN890 FSIGN=1.0891 ELSE892 FSIGN=-1.0893 ENDIF894 895 XNEW=XM+(XM-XL)*(FSIGN*FM/S)896 897 IF (ABS(XNEW-ANS).LE.XACC) THEN898 IRFRMSA=ANS899 RETURN900 ENDIF901 902 ANS=XNEW903 FNEW=KEEQ(RADIUS,TAIR,ANS,LPPWV)904 905 IF (FNEW.EQ.0.0) THEN906 IRFRMSA=ANS907 RETURN908 ENDIF909 910 IF (SIGN(FM, FNEW).NE.FM) THEN911 XL=XM912 FL=FM913 XH=ANS914 FH=FNEW915 ELSEIF (SIGN(FL, FNEW).NE.FL) THEN916 XH=ANS917 FH=FNEW918 ELSEIF (SIGN(FH, FNEW).NE.FH) THEN919 XL=ANS920 FL=FNEW921 ELSE922 PRINT*,'PROBLEM IRFRMSA dans new_cloud_venus'923 PRINT*,'you shall not PAAAAAASS'924 STOP925 ENDIF926 ENDDO927 PRINT*,'Paaaaas bien MAXIT atteint'928 PRINT*,'PROBLEM IRFRMSA dans new_cloud_venus'929 PRINT*,'you shall not PAAAAAASS'930 XL=X1931 XH=X2932 PRINT*,'Borne XL',XL,'XH',XH933 ANS=-9.99e99934 935 DO i=1, MAXIT936 XM=0.5*(XL+XH)937 FM=KEEQ(RADIUS,TAIR,XM,LPPWV)938 S=SQRT(FM*FM-FL*FH)939 940 IF (FL.GT.FH) THEN941 FSIGN=1.0942 ELSE943 FSIGN=-1.0944 ENDIF945 946 XNEW=XM+(XM-XL)*(FSIGN*FM/S)947 948 ANS=XNEW949 FNEW=KEEQ(RADIUS,TAIR,ANS,LPPWV)950 PRINT*,'KEEQ result',FNEW,'T',TAIR,'R',RADIUS951 IF (SIGN(FM, FNEW).NE.FM) THEN952 XL=XM953 FL=FM954 XH=ANS955 FH=FNEW956 ELSEIF (SIGN(FL, FNEW).NE.FL) THEN957 XH=ANS958 FH=FNEW959 ELSEIF (SIGN(FH, FNEW).NE.FH) THEN960 XL=ANS961 FL=FNEW962 ELSE963 PRINT*,'PROBLEM IRFRMSA dans new_cloud_venus'964 PRINT*,'you shall not PAAAAAASS'965 STOP966 ENDIF967 ENDDO968 STOP969 ELSE970 PRINT*,'IRFRMSA must be bracketed'971 IF (FL.EQ.0.0) THEN972 PRINT*,'IRFRMSA FL == 0',Fl973 IRFRMSA=X1974 RETURN975 ENDIF976 IF (FH.EQ.0.0) THEN977 PRINT*,'IRFRMSA FH == 0',FH978 IRFRMSA=X2979 RETURN980 ENDIF981 IF ((FL.NE.0.).AND.(FH.NE.0.)) THEN982 PRINT*,'IRFRMSA FH and FL neq 0: ', FL, FH983 PRINT*,'X1',X1,'X2',X2984 PRINT*,'Kind F', KIND(FL), KIND(FH)985 PRINT*,'Kind X', KIND(X1), KIND(X2)986 PRINT*,'Logical: ',(SIGN(FL,FH).NE.FL)987 PRINT*,'Logical: ',(SIGN(FH,FL).NE.FH)988 PRINT*,'nb root BRACWSA',NB989 STOP990 ENDIF991 992 ENDIF993 ! FIN Test Bracketed values994 995 END function IRFRMSA996 997 !*****************************************************************************998 !* REAL FUNCTION KEEQ()999 REAL FUNCTION KEEQ(RADIUS,TAIR,WSA,LPPWV)1000 !*****************************************************************************1001 !* Kelvin Equation EQuality1002 !* ln(PPWV_eq) - (2Mh2o sigma)/(R T r rho) - ln(ph2osa) = 01003 !*1004 1005 IMPLICIT NONE1006 1007 REAL, INTENT(IN) :: RADIUS,TAIR,WSA,LPPWV1008 1009 ! Physical constants:1010 REAL MH2O1011 REAL RGAS1012 PARAMETER(1013 ! Molar weight of water (kg/mole)1014 + MH2O=18.0153d-3,1015 ! Universal gas constant (J/(mole K))1016 + RGAS=8.314462175d0)1017 !1018 ! External functions needed:1019 REAL PWVSAS_GV,SIGMADROPLET,RHODROPLET1020 ! PWVSAS_GV: Natural logaritm of water vapor pressure over1021 ! sulfuric acid solution1022 ! SIGMADROPLET: Surface tension of sulfuric acid solution1023 ! RHODROPLET: Density of sulfuric acid solution1024 !1025 ! Auxiliary local variables:1026 REAL C11027 1028 PARAMETER(1029 + C1=2.0d0*MH2O/RGAS)1030 1031 1032 KEEQ=LPPWV-C1*SIGMADROPLET(WSA,TAIR)/1033 & (TAIR*RADIUS*RHODROPLET(WSA,TAIR))-1034 & PWVSAS_GV(TAIR,WSA)1035 1036 END FUNCTION KEEQ1037 1038 *****************************************************************************1039 * REAL FUNCTION PWVSAS_GV(TAIR,WSA)1040 REAL FUNCTION PWVSAS_GV(TAIR,WSA)1041 *****************************************************************************1042 *1043 * Natural logaritm of saturated water vapor pressure over plane1044 * sulfuric acid solution.1045 *1046 * Source: J.I.Gmitro & T.Vermeulen: A.I.Ch.E.J. 10,740,1964.1047 * W.F.Giauque et al.: J. Amer. Chem. Soc. 82,62,1960.1048 *1049 * The formula of Gmitro & Vermeulen for saturation pressure1050 * is used:1051 * ln(p) = A ln(298/T) + B/T + C + DT1052 * with values of A,B,C and D given by Gmitro & Vermeulen,1053 * and calculated from partial molal properties given by Giauque et al.1054 *1055 *1056 *1057 * Input: TAIR: Temperature (K)1058 * WSA: Weight fraction of H2SO4 [0;1]1059 * Output: Natural logaritm of water vapor pressure1060 * over sulfuric acid solution ( ln(Pa) )1061 *1062 *1063 * External functions needed for calculation of partial molal1064 * properties of pure components at 25 ! as function of W.1065 IMPLICIT NONE1066 1067 REAL :: CPH2O,ALH2O,FFH2O,LH2O1068 * CPH2O: Partial molal heat capacity of sulfuric acid solution.1069 * ALH2O: Temparature derivative of CPH2O1070 * FFH2O: Partial molal free energy of sulfuric acid solution.1071 * LH2O: Partial molal enthalpy of sulfuric acid1072 *1073 !1074 !1075 REAL, INTENT(IN) :: TAIR,WSA1076 REAL :: ADOT,BDOT,CDOT,DDOT1077 REAL :: RGAS,MMHGPA1078 REAL :: K1,K21079 REAL :: A,B,C,D,CP,L,F,ALFA1080 ! Physical constants given by Gmitro & Vermeulen:1081 PARAMETER(1082 + ADOT=-3.67340,1083 + BDOT=-4143.5,1084 + CDOT=10.24353,1085 + DDOT=0.618943d-3)1086 PARAMETER(1087 ! Gas constant (cal/(deg mole)):1088 + RGAS=1.98726,1089 ! Natural logarith of conversion factor between atm. and Pa:1090 + MMHGPA=11.52608845,1091 + K1=298.15,1092 + K2=K1*K1/2.0)1093 !1094 INTEGER :: KLO,KHI,K,I,NPOINT1095 PARAMETER(NPOINT=110)1096 REAL, DIMENSION(NPOINT) :: WTAB(NPOINT)1097 DATA (WTAB(I),I=1,NPOINT)/1098 +0.00000,0.08932,0.09819,0.10792,0.11980,0.13461,0.15360,0.16525,1099 +0.17882,0.19482,0.21397,0.23728,0.26629,0.27999,0.29517,0.31209,1100 +0.33107,0.35251,0.36430,0.37691,0.39043,0.40495,0.42059,0.43749,1101 +0.44646,0.45580,0.46555,0.47572,0.48634,0.49745,0.50908,0.52126,1102 +0.53405,0.54747,0.56159,0.57646,0.58263,0.58893,0.59537,0.60195,1103 +0.60868,0.61557,0.62261,0.62981,0.63718,0.64472,0.65245,0.66037,1104 +0.66847,0.67678,0.68530,0.69404,0.70300,0.71220,0.72164,0.73133,1105 +0.73628,0.74129,0.74637,0.75152,0.75675,0.76204,0.76741,0.77286,1106 +0.77839,0.78399,0.78968,0.79545,0.80130,0.80724,0.81327,0.81939,1107 +0.82560,0.83191,0.83832,0.84482,0.85143,0.85814,0.86495,0.87188,1108 +0.87892,0.88607,0.89334,0.90073,0.90824,0.91588,0.92365,0.93156,1109 +0.93959,0.94777,0.95610,0.96457,0.97319,0.98196,0.99090,0.99270,1110 +0.99452,0.99634,0.99725,0.99817,0.99835,0.99853,0.99872,0.99890,1111 +0.99908,0.99927,0.99945,0.99963,0.99982,1.0000/1112 !1113 KLO=11114 KHI=NPOINT1115 1 IF(KHI-KLO.GT.1) THEN1116 K=(KHI+KLO)/21117 IF(WTAB(K).GT.MAX(WTAB(1),WSA)) THEN1118 KHI=K1119 ELSE1120 KLO=K1121 ENDIF1122 GOTO 11123 ENDIF1124 !1125 CP=CPH2O(WSA,KHI,KLO)1126 F=-FFH2O(WSA,KHI,KLO)1127 L=-LH2O(WSA,KHI,KLO)1128 ALFA=ALH2O(WSA,KHI,KLO)1129 !1130 A=ADOT+(CP-K1*ALFA)/RGAS1131 B=BDOT+(L-K1*CP+K2*ALFA)/RGAS1132 C=CDOT+(CP+(F-L)/K1)/RGAS1133 D=DDOT-ALFA/(2.0d0*RGAS)1134 !1135 ! WRITE(*,*) 'TAIR= ',TAIR,' WSA= ',WSA1136 ! WRITE(*,*) 'CPH2O(WSA)= ',CP1137 ! WRITE(*,*) 'ALFAH2O(WSA)= ',ALFA1138 ! WRITE(*,*) 'FFH2O(WSA)= ',F1139 ! WRITE(*,*) 'LH2O(WSA)= ',L1140 !1141 PWVSAS_GV=A*DLOG(K1/TAIR)+B/TAIR+C+D*TAIR+MMHGPA1142 1143 END FUNCTION PWVSAS_GV1144 *******************************************************************************1145 * REAL FUNCTION CPH2O(W)1146 REAL FUNCTION CPH2O(W,khi_in,klo_in)1147 *******************************************************************************1148 *1149 * Relative partial molal heat capacity of water (cal/(deg mole) in1150 * sulfuric acid solution, as a function of H2SO4 weight fraction [0;1],1151 * calculated by cubic spline fitting.1152 *1153 * Source: Giauque et al.: J. Amer. Chem. Soc. 82,62,1960.1154 *1155 IMPLICIT NONE1156 1157 INTEGER :: NPOINT,I1158 PARAMETER(NPOINT=109)1159 REAL, DIMENSION(NPOINT) :: WTAB(NPOINT),CPHTAB(NPOINT),1160 + Y2(NPOINT),YWORK(NPOINT)1161 REAL, INTENT(IN):: W1162 INTEGER, INTENT(IN):: khi_in,klo_in1163 INTEGER :: khi,klo1164 REAL :: CPH1165 LOGICAL :: FIRST1166 DATA (WTAB(I),I=1,NPOINT)/1167 +0.00000,0.08932,0.09819,0.10792,0.11980,0.13461,0.15360,0.16525,1168 +0.17882,0.19482,0.21397,0.23728,0.26629,0.27999,0.29517,0.31209,1169 +0.33107,0.35251,0.36430,0.37691,0.39043,0.40495,0.42059,0.43749,1170 +0.44646,0.45580,0.46555,0.47572,0.48634,0.49745,0.50908,0.52126,1171 +0.53405,0.54747,0.56159,0.57646,0.58263,0.58893,0.59537,0.60195,1172 +0.60868,0.61557,0.62261,0.62981,0.63718,0.64472,0.65245,0.66037,1173 +0.66847,0.67678,0.68530,0.69404,0.70300,0.71220,0.72164,0.73133,1174 +0.73628,0.74129,0.74637,0.75152,0.75675,0.76204,0.76741,0.77286,1175 +0.77839,0.78399,0.78968,0.79545,0.80130,0.80724,0.81327,0.81939,1176 +0.82560,0.83191,0.83832,0.84482,0.85143,0.85814,0.86495,0.87188,1177 +0.87892,0.88607,0.89334,0.90073,0.90824,0.91588,0.92365,0.93156,1178 +0.93959,0.94777,0.95610,0.96457,0.97319,0.98196,0.99090,0.99270,1179 +0.99452,0.99634,0.99725,0.99817,0.99835,0.99853,0.99872,0.99890,1180 +0.99908,0.99927,0.99945,0.99963,0.99982/1181 DATA (CPHTAB(I),I=1,NPOINT)/1182 + 17.996, 17.896, 17.875, 17.858, 17.840, 17.820, 17.800, 17.791,1183 + 17.783, 17.777, 17.771, 17.769, 17.806, 17.891, 18.057, 18.248,1184 + 18.429, 18.567, 18.613, 18.640, 18.660, 18.660, 18.642, 18.592,1185 + 18.544, 18.468, 18.348, 18.187, 17.995, 17.782, 17.562, 17.352,1186 + 17.162, 16.993, 16.829, 16.657, 16.581, 16.497, 16.405, 16.302,1187 + 16.186, 16.053, 15.901, 15.730, 15.540, 15.329, 15.101, 14.853,1188 + 14.586, 14.296, 13.980, 13.638, 13.274, 12.896, 12.507, 12.111,1189 + 11.911, 11.711, 11.514, 11.320, 11.130, 10.940, 10.760, 10.570,1190 + 10.390, 10.200, 10.000, 9.8400, 9.7600, 9.7900, 9.9500, 10.310,1191 + 10.950, 11.960, 13.370, 15.060, 16.860, 18.550, 20.000, 21.170,1192 + 22.030, 22.570, 22.800, 22.750, 22.420, 21.850, 21.120, 20.280,1193 + 19.360, 18.350, 17.220, 15.940, 14.490, 12.840, 10.800, 9.8000,1194 + 7.8000, 3.8000,0.20000,-5.4000,-7.0000,-8.8000,-10.900,-13.500,1195 +-17.000,-22.000,-29.000,-40.000,-59.000/1196 DATA FIRST/.TRUE./1197 SAVE FIRST,WTAB,CPHTAB,Y21198 !1199 IF(FIRST) THEN1200 FIRST=.FALSE.1201 CALL SPLINE(WTAB,CPHTAB,NPOINT,YWORK,Y2)1202 ENDIF1203 1204 if(khi_in.GT.NPOINT) then1205 khi=NPOINT1206 klo=NPOINT-11207 else1208 khi=khi_in1209 klo=klo_in1210 endif1211 1212 CALL SPLINT(WTAB(khi),WTAB(klo),CPHTAB(khi),CPHTAB(klo),1213 . Y2(khi),Y2(klo),W,CPH)1214 CPH2O=CPH1215 1216 END FUNCTION CPH2O1217 !1218 *******************************************************************************1219 REAL FUNCTION FFH2O(W,khi,klo)1220 * REAL FUNCTION FFH2O(W)1221 *******************************************************************************1222 *1223 * Relative partial molal free energy water (cal/mole) in1224 * sulfuric acid solution, as a function of H2SO4 weight fraction [0;1],1225 * calculated by cubic spline fitting.1226 *1227 * Source: Giauque et al.: J. Amer. Chem. Soc. 82,62,1960.1228 *1229 IMPLICIT NONE1230 1231 INTEGER :: NPOINT,I1232 PARAMETER(NPOINT=110)1233 REAL, DIMENSION(NPOINT) :: WTAB,FFTAB,Y2,YWORK1234 REAL, INTENT(IN) :: W1235 INTEGER, INTENT(IN):: khi,klo1236 REAL :: FF1237 LOGICAL :: FIRST1238 DATA (WTAB(I),I=1,NPOINT)/1239 +0.00000,0.08932,0.09819,0.10792,0.11980,0.13461,0.15360,0.16525,1240 +0.17882,0.19482,0.21397,0.23728,0.26629,0.27999,0.29517,0.31209,1241 +0.33107,0.35251,0.36430,0.37691,0.39043,0.40495,0.42059,0.43749,1242 +0.44646,0.45580,0.46555,0.47572,0.48634,0.49745,0.50908,0.52126,1243 +0.53405,0.54747,0.56159,0.57646,0.58263,0.58893,0.59537,0.60195,1244 +0.60868,0.61557,0.62261,0.62981,0.63718,0.64472,0.65245,0.66037,1245 +0.66847,0.67678,0.68530,0.69404,0.70300,0.71220,0.72164,0.73133,1246 +0.73628,0.74129,0.74637,0.75152,0.75675,0.76204,0.76741,0.77286,1247 +0.77839,0.78399,0.78968,0.79545,0.80130,0.80724,0.81327,0.81939,1248 +0.82560,0.83191,0.83832,0.84482,0.85143,0.85814,0.86495,0.87188,1249 +0.87892,0.88607,0.89334,0.90073,0.90824,0.91588,0.92365,0.93156,1250 +0.93959,0.94777,0.95610,0.96457,0.97319,0.98196,0.99090,0.99270,1251 +0.99452,0.99634,0.99725,0.99817,0.99835,0.99853,0.99872,0.99890,1252 +0.99908,0.99927,0.99945,0.99963,0.99982, 1.0000/1253 DATA (FFTAB(I),I=1,NPOINT)/1254 +0.00000, 22.840, 25.810, 29.250, 33.790, 39.970, 48.690, 54.560,1255 + 61.990, 71.790, 85.040, 103.70, 130.70, 145.20, 163.00, 184.50,1256 + 211.50, 245.60, 266.40, 290.10, 317.40, 349.00, 385.60, 428.40,1257 + 452.50, 478.80, 507.50, 538.80, 573.30, 611.60, 653.70, 700.50,1258 + 752.60, 810.60, 875.60, 948.60, 980.60, 1014.3, 1049.7, 1087.1,1259 + 1126.7, 1168.7, 1213.5, 1261.2, 1312.0, 1366.2, 1424.3, 1486.0,1260 + 1551.8, 1622.3, 1697.8, 1778.5, 1864.9, 1956.8, 2055.8, 2162.0,1261 + 2218.0, 2276.0, 2337.0, 2400.0, 2466.0, 2535.0, 2607.0, 2682.0,1262 + 2760.0, 2842.0, 2928.0, 3018.0, 3111.0, 3209.0, 3311.0, 3417.0,1263 + 3527.0, 3640.0, 3757.0, 3878.0, 4002.0, 4130.0, 4262.0, 4397.0,1264 + 4535.0, 4678.0, 4824.0, 4973.0, 5128.0, 5287.0, 5454.0, 5630.0,1265 + 5820.0, 6031.0, 6268.0, 6541.0, 6873.0, 7318.0, 8054.0, 8284.0,1266 + 8579.0, 8997.0, 9295.0, 9720.0, 9831.0, 9954.0, 10092., 10248.,1267 + 10423., 10618., 10838., 11099., 11460., 12014./1268 DATA FIRST/.TRUE./1269 SAVE FIRST,WTAB,FFTAB,Y21270 !1271 IF(FIRST) THEN1272 FIRST=.FALSE.1273 CALL SPLINE(WTAB,FFTAB,NPOINT,YWORK,Y2)1274 ENDIF1275 1276 CALL SPLINT(WTAB(khi),WTAB(klo),FFTAB(khi),FFTAB(klo),1277 . Y2(khi),Y2(klo),W,FF)1278 FFH2O=FF1279 1280 END FUNCTION FFH2O1281 !1282 *******************************************************************************1283 REAL FUNCTION LH2O(W,khi,klo)1284 * REAL FUNCTION LH2O(W)1285 *******************************************************************************1286 *1287 * Relative partial molal heat content of water (cal/mole) in1288 * sulfuric acid solution, as a function of H2SO4 weight fraction [0;1],1289 * calculated by cubic spline fitting.1290 *1291 * Source: Giauque et al.: J. Amer. Chem. Soc. 82,62,1960.1292 *1293 IMPLICIT NONE1294 1295 INTEGER :: NPOINT,I1296 PARAMETER(NPOINT=110)1297 REAL, DIMENSION(NPOINT) :: WTAB,LTAB,Y2,YWORK1298 REAL, INTENT(IN) :: W1299 INTEGER, INTENT(IN):: khi,klo1300 REAL :: L1301 LOGICAL :: FIRST1302 DATA (WTAB(I),I=1,NPOINT)/1303 +0.00000,0.08932,0.09819,0.10792,0.11980,0.13461,0.15360,0.16525,1304 +0.17882,0.19482,0.21397,0.23728,0.26629,0.27999,0.29517,0.31209,1305 +0.33107,0.35251,0.36430,0.37691,0.39043,0.40495,0.42059,0.43749,1306 +0.44646,0.45580,0.46555,0.47572,0.48634,0.49745,0.50908,0.52126,1307 +0.53405,0.54747,0.56159,0.57646,0.58263,0.58893,0.59537,0.60195,1308 +0.60868,0.61557,0.62261,0.62981,0.63718,0.64472,0.65245,0.66037,1309 +0.66847,0.67678,0.68530,0.69404,0.70300,0.71220,0.72164,0.73133,1310 +0.73628,0.74129,0.74637,0.75152,0.75675,0.76204,0.76741,0.77286,1311 +0.77839,0.78399,0.78968,0.79545,0.80130,0.80724,0.81327,0.81939,1312 +0.82560,0.83191,0.83832,0.84482,0.85143,0.85814,0.86495,0.87188,1313 +0.87892,0.88607,0.89334,0.90073,0.90824,0.91588,0.92365,0.93156,1314 +0.93959,0.94777,0.95610,0.96457,0.97319,0.98196,0.99090,0.99270,1315 +0.99452,0.99634,0.99725,0.99817,0.99835,0.99853,0.99872,0.99890,1316 +0.99908,0.99927,0.99945,0.99963,0.99982, 1.0000/1317 DATA (LTAB(I),I=1,NPOINT)/1318 +0.00000, 5.2900, 6.1000, 7.1800, 8.7800, 11.210, 15.290, 18.680,1319 + 23.700, 31.180, 42.500, 59.900, 89.200, 106.70, 128.60, 156.00,1320 + 190.40, 233.80, 260.10, 290.00, 324.00, 362.50, 406.50, 456.10,1321 + 483.20, 512.40, 543.60, 577.40, 613.80, 653.50, 696.70, 744.50,1322 + 797.20, 855.80, 921.70, 995.70, 1028.1, 1062.3, 1098.3, 1136.4,1323 + 1176.7, 1219.3, 1264.7, 1313.0, 1364.3, 1418.9, 1477.3, 1539.9,1324 + 1607.2, 1679.7, 1757.9, 1842.7, 1934.8, 2035.4, 2145.5, 2267.0,1325 + 2332.0, 2401.0, 2473.0, 2550.0, 2631.0, 2716.0, 2807.0, 2904.0,1326 + 3007.0, 3118.0, 3238.0, 3367.0, 3507.0, 3657.0, 3821.0, 3997.0,1327 + 4186.0, 4387.0, 4599.0, 4819.0, 5039.0, 5258.0, 5476.0, 5694.0,1328 + 5906.0, 6103.0, 6275.0, 6434.0, 6592.0, 6743.0, 6880.0, 7008.0,1329 + 7133.0, 7255.0, 7376.0, 7497.0, 7618.0, 7739.0, 7855.0, 7876.0,1330 + 7905.0, 7985.0, 8110.0, 8415.0, 8515.0, 8655.0, 8835.0, 9125.0,1331 + 9575.0, 10325., 11575., 13500., 15200., 16125./1332 DATA FIRST/.TRUE./1333 SAVE FIRST,WTAB,LTAB,Y21334 !1335 IF(FIRST) THEN1336 FIRST=.FALSE.1337 CALL SPLINE(WTAB,LTAB,NPOINT,YWORK,Y2)1338 ENDIF1339 1340 CALL SPLINT(WTAB(khi),WTAB(klo),LTAB(khi),LTAB(klo),1341 . Y2(khi),Y2(klo),W,L)1342 LH2O=L1343 1344 END FUNCTION LH2O1345 *******************************************************************************1346 REAL FUNCTION ALH2O(W,khi_in,klo_in)1347 * REAL FUNCTION ALH2O(W)1348 *******************************************************************************1349 *1350 * Relative partial molal temperature derivative of heat capacity (water)1351 * in sulfuric acid solution, (cal/deg**2), calculated by1352 * cubic spline fitting.1353 *1354 * Source: Giauque et al.: J. Amer. Chem. Soc. 82,62,1960.1355 *1356 IMPLICIT NONE1357 1358 INTEGER :: NPOINT,I1359 PARAMETER(NPOINT=96)1360 REAL, DIMENSION(NPOINT) :: WTAB,ATAB,Y2,YWORK1361 REAL, INTENT(IN) :: W1362 INTEGER, INTENT(IN):: khi_in,klo_in1363 INTEGER :: khi,klo1364 REAL :: A1365 LOGICAL :: FIRST1366 DATA (WTAB(I),I=1,NPOINT)/1367 +0.29517,0.31209,1368 +0.33107,0.35251,0.36430,0.37691,0.39043,0.40495,0.42059,0.43749,1369 +0.44646,0.45580,0.46555,0.47572,0.48634,0.49745,0.50908,0.52126,1370 +0.53405,0.54747,0.56159,0.57646,0.58263,0.58893,0.59537,0.60195,1371 +0.60868,0.61557,0.62261,0.62981,0.63718,0.64472,0.65245,0.66037,1372 +0.66847,0.67678,0.68530,0.69404,0.70300,0.71220,0.72164,0.73133,1373 +0.73628,0.74129,0.74637,0.75152,0.75675,0.76204,0.76741,0.77286,1374 +0.77839,0.78399,0.78968,0.79545,0.80130,0.80724,0.81327,0.81939,1375 +0.82560,0.83191,0.83832,0.84482,0.85143,0.85814,0.86495,0.87188,1376 +0.87892,0.88607,0.89334,0.90073,0.90824,0.91588,0.92365,0.93156,1377 +0.93959,0.94777,0.95610,0.96457,0.97319,0.98196,0.99090,0.99270,1378 +0.99452,0.99634,0.99725,0.99817,0.99835,0.99853,0.99872,0.99890,1379 +0.99908,0.99927,0.99945,0.99963,0.99982, 1.0000/1380 DATA (ATAB(I),I=1,NPOINT)/1381 + 0.0190, 0.0182, 0.0180, 0.0177, 0.0174, 0.0169, 0.0167, 0.0164,1382 + 0.0172, 0.0212, 0.0239, 0.0264, 0.0276, 0.0273, 0.0259, 0.0238,1383 + 0.0213, 0.0190, 0.0170, 0.0155, 0.0143, 0.0133, 0.0129, 0.0124,1384 + 0.0120, 0.0114, 0.0106, 0.0097, 0.0084, 0.0067, 0.0047, 0.0024,1385 +-0.0002,-0.0031,-0.0063,-0.0097,-0.0136,-0.0178,-0.0221,-0.0263,1386 +-0.0303,-0.0340,-0.0352,-0.0360,-0.0362,-0.0356,-0.0343,-0.0321,1387 +-0.0290,-0.0251,-0.0201,-0.0137,-0.0058, 0.0033, 0.0136, 0.0254,1388 + 0.0388, 0.0550, 0.0738, 0.0962, 0.1198, 0.1300, 0.1208, 0.0790,1389 + 0.0348, 0.0058,-0.0102,-0.0211,-0.0292,-0.0350,-0.0390,-0.0418,1390 +-0.0432,-0.0436,-0.0429,-0.0411,-0.0384,-0.0346,-0.0292,-0.0220,1391 +-0.0130,-0.0110,-0.0080,-0.0060,-0.0040,-0.0030,-0.0030,-0.0020,1392 +-0.0020,-0.0020,-0.0020,-0.0010,-0.0010, 0.0000, 0.0000, 0.0000/1393 DATA FIRST/.TRUE./1394 SAVE FIRST,WTAB,ATAB,Y21395 !1396 IF(FIRST) THEN1397 FIRST=.FALSE.1398 CALL SPLINE(WTAB,ATAB,NPOINT,YWORK,Y2)1399 ENDIF1400 1401 if(klo_in.LT.15) then1402 khi=21403 klo=11404 else1405 khi=khi_in-141406 klo=klo_in-141407 endif1408 1409 CALL SPLINT(WTAB(khi),WTAB(klo),ATAB(khi),ATAB(klo),1410 . Y2(khi),Y2(klo),W,A)1411 ALH2O=A1412 1413 END FUNCTION ALH2O1414 !******************************************************************************1415 SUBROUTINE SPLINE(X,Y,N,WORK,Y2)1416 !******************************************************************************1417 ! Routine to calculate 2.nd derivatives of tabulated function1418 ! Y(i)=Y(Xi), to be used for cubic spline calculation.1419 !1420 IMPLICIT NONE1421 1422 INTEGER, INTENT(IN) :: N1423 INTEGER :: I1424 REAL, DIMENSION(N), INTENT(IN) :: X,Y1425 REAL, DIMENSION(N), INTENT(OUT) :: Y2,WORK1426 REAL SIG,P,QN,UN,YP1,YPN1427 1428 !AM Venus: Let's check the values1429 ! write(*,*) 'In spline, N ', N1430 1431 YP1=(Y(2)-Y(1))/(X(2)-X(1))1432 YPN=(Y(N)-Y(N-1))/(X(N)-X(N-1))1433 IF(YP1.GT.99.0E+30) THEN1434 Y2(1)=0.01435 WORK(1)=0.01436 ELSE1437 Y2(1)=-0.5d01438 WORK(1)=(3.0d0/(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1)1439 ENDIF1440 DO I=2,N-11441 ! write(*,*) 'In spline, I ', I1442 SIG=(X(I)-X(I-1))/(X(I+1)-X(I-1))1443 P=SIG*Y2(I-1)+2.0d01444 Y2(I)=(SIG-1.0d0)/P1445 WORK(I)=(6.0d0*((Y(I+1)-Y(I))/(X(I+1)-X(I))-(Y(I)-Y(I-1))1446 + /(X(I)-X(I-1)))/(X(I+1)-X(I-1))-SIG*WORK(I-1))/P1447 ENDDO1448 IF(YPN.GT.99.0E+30) THEN1449 QN=0.01450 UN=0.01451 ELSE1452 QN=0.5d01453 UN=(3.0d0/(X(N)-X(N-1)))*(YPN-(Y(N)-Y(N-1))/(X(N)-X(N-1)))1454 ENDIF1455 Y2(N)=(UN-QN*WORK(N-1))/(QN*Y2(N-1)+1.0d0)1456 DO I=N-1,1,-11457 ! write(*,*) 'In spline, I ', I1458 Y2(I)=Y2(I)*Y2(I+1)+WORK(I)1459 ENDDO1460 !1461 END SUBROUTINE SPLINE1462 1463 !******************************************************************************1464 SUBROUTINE SPLINT(XAhi,XAlo,YAhi,YAlo,Y2Ahi,Y2Alo,X,Y)1465 !******************************************************************************1466 ! Cubic spline calculation1467 1468 IMPLICIT NONE1469 1470 REAL, INTENT(IN) :: XAhi,XAlo,YAhi,YAlo,Y2Ahi,Y2Alo1471 REAL, INTENT(IN) :: X1472 REAL, INTENT(OUT) :: Y1473 REAL :: H,A,B1474 !1475 H=XAhi-XAlo1476 A=(XAhi-X)/H1477 B=(X-XAlo)/H1478 Y=A*YAlo+B*YAhi+1479 + ((A**3-A)*Y2Alo+(B**3-B)*Y2Ahi)*(H**2)/6.0d01480 !1481 1482 END SUBROUTINE SPLINT1483 296 !****************************************************************** 1484 297 SUBROUTINE CALCM_SAT(H2SO4,H2O,WSA,DENSO4, … … 1593 406 END SUBROUTINE CALCM_SAT 1594 407 1595 SUBROUTINE Zeleznik(x,T,act)1596 1597 !+++++++++++++++++++++++++++++++++++++++++++++++++++1598 ! Water and sulfuric acid activities in liquid1599 ! aqueous solutions.1600 ! Frank J. Zeleznik, Thermodynnamic properties1601 ! of the aqueous sulfuric acid system to 220K-350K,1602 ! mole fraction 0,...,11603 ! J. Phys. Chem. Ref. Data, Vol. 20, No. 6,PP.1157, 19911604 !+++++++++++++++++++++++++++++++++++++++++++++++++++1605 1606 IMPLICIT NONE1607 1608 REAL, INTENT(IN) :: x,T1609 REAL :: activitya, activityw1610 REAL, INTENT(OUT), DIMENSION(2):: act1611 ! REAL x,T, activitya, activityw1612 ! REAL, DIMENSION(2):: act1613 1614 1615 ! write(*,*) 'x, T ', x, T1616 1617 act(2)=activitya(x,T)1618 act(1)=activityw(x,T)1619 1620 ! write(*,*) 'act ', act1621 1622 END SUBROUTINE Zeleznik1623 1624 !start of functions related to zeleznik activities1625 1626 REAL FUNCTION m111(T)1627 1628 REAL, INTENT(IN) :: T1629 m111=-23.524503387D01630 & +0.0406889449841D0*T1631 & -0.151369362907D-4*T**2+2961.44445015D0/T1632 & +0.492476973663D0*dlog(T)1633 END FUNCTION m1111634 1635 REAL FUNCTION m121(T)1636 1637 REAL, INTENT(IN) :: T1638 m121=1114.58541077D0-1.1833078936D0*T1639 & -0.00209946114412D0*T**2-246749.842271D0/T1640 & +34.1234558134D0*dlog(T)1641 END FUNCTION m1211642 1643 FUNCTION m221(T)1644 1645 REAL, INTENT(IN) :: T1646 m221=-80.1488100747D0-0.0116246143257D0*T1647 & +0.606767928954D-5*T**2+3092.72150882D0/T1648 & +12.7601667471D0*dlog(T)1649 END FUNCTION m2211650 1651 REAL FUNCTION m122(T)1652 1653 REAL, INTENT(IN) :: T1654 m122=888.711613784D0-2.50531359687D0*T1655 & +0.000605638824061D0*T**2-196985.296431D0/T1656 & +74.550064338D0*dlog(T)1657 END FUNCTION m1221658 1659 REAL FUNCTION e111(T)1660 1661 REAL, INTENT(IN) :: T1662 e111=2887.31663295D0-3.32602457749D0*T1663 & -0.2820472833D-2*T**2-528216.112353D0/T1664 & +0.68699743564D0*dlog(T)1665 END FUNCTION e1111666 1667 REAL FUNCTION e121(T)1668 1669 REAL, INTENT(IN) :: T1670 e121=-370.944593249D0-0.690310834523D0*T1671 & +0.56345508422D-3*T**2-3822.52997064D0/T1672 & +94.2682037574D0*dlog(T)1673 END FUNCTION e1211674 1675 REAL FUNCTION e211(T)1676 1677 REAL, INTENT(IN) :: T1678 e211=38.3025318809D0-0.0295997878789D0*T1679 & +0.120999746782D-4*T**2-3246.97498999D0/T1680 & -3.83566039532D0*dlog(T)1681 END FUNCTION e2111682 1683 REAL FUNCTION e221(T)1684 1685 REAL, INTENT(IN) :: T1686 e221=2324.76399402D0-0.141626921317D0*T1687 & -0.00626760562881D0*T**2-450590.687961D0/T1688 & -61.2339472744D0*dlog(T)1689 END FUNCTION e2211690 1691 REAL FUNCTION e122(T)1692 1693 REAL, INTENT(IN) :: T1694 e122=-1633.85547832D0-3.35344369968D0*T1695 & +0.00710978119903D0*T**2+198200.003569D0/T1696 & +246.693619189D0*dlog(T)1697 END FUNCTION e1221698 1699 REAL FUNCTION e212(T)1700 1701 REAL, INTENT(IN) :: T1702 e212=1273.75159848D0+1.03333898148D0*T1703 & +0.00341400487633D0*T**2+195290.667051D0/T1704 & -431.737442782D0*dlog(T)1705 END FUNCTION e2121706 1707 REAL FUNCTION lnAa(x1,T)1708 1709 REAL, INTENT(IN) :: T,x11710 REAL ::1711 & m111,m121,m221,m1221712 & ,e111,e121,e211,e122,e212,e2211713 lnAa=-(1714 & (2*m111(T)+e111(T)*(2*dlog(x1)+1))*x11715 & +(2*m121(T)+e211(T)*dlog(1-x1)+e121(T)*(dlog(x1)+1))*(1-x1)1716 & -(m111(T)+e111(T)*(dlog(x1)+1))*x1*x11717 & -(2*m121(T)+e121(T)*(dlog(x1)+1)+e211(T)*(dlog(1-x1)+1)1718 & -(2*m122(T)+e122(T)*dlog(x1)1719 & +e212(T)*dlog(1-x1))*(1-x1))*x1*(1-x1)1720 & -(m221(T)+e221(T)*(dlog(1-x1)+1))*(1-x1)**21721 & -x1*(1-x1)*(1722 & (6*m122(T)+e122(T)*(3*dlog(x1)+1)1723 & +e212(T)*(3*dlog(1-x1)+1)1724 & )*x1*(1-x1)1725 & -(2*m122(T)+e122(T)*(dlog(x1)+1)1726 & +e212(T)*dlog(1-x1)1727 & )*(1-x1))1728 & )1729 END FUNCTION lnAa1730 1731 REAL FUNCTION lnAw(x1,T)1732 1733 REAL, INTENT(IN) :: T,x11734 REAL ::1735 & m111,m121,m221,m1221736 & ,e111,e121,e211,e122,e212,e2211737 lnAw=-(1738 & (2*m121(T)+e121(T)*dlog(x1)+e211(T)*(dlog(1-x1)+1))*x11739 & +(2*m221(T)+e221(T)*(2*dlog(1-x1)+1))*(1-x1)1740 & -(m111(T)+e111(T)*(dlog(x1)+1))*x1*x11741 & -(2*m121(T)+e121(T)*(dlog(x1)+1)1742 & +e211(T)*(dlog(1-x1)+1))*x1*(1-x1)1743 & -(m221(T)+e221(T)*(dlog(1-x1)+1))*(1-x1)**21744 & +x1*(2*m122(T)+e122(T)*dlog(x1)+e212(T)*dlog(1-x1))*x1*(1-x1)1745 & +x1*(1-x1)*((2*m122(T)+e122(T)*dlog(x1)1746 & +e212(T)*(dlog(1-x1)+1))*x11747 & -(6*m122(T)+e122(T)*(3*dlog(x1)+1)1748 & +e212(T)*(3*dlog(1-x1)+1))*(1-x1)*x1)1749 & )1750 END FUNCTION lnAw1751 1752 REAL FUNCTION activitya(xal,T)1753 1754 REAL, INTENT(IN) :: T,xal1755 REAL :: lnAa1756 ! & ,m111,m121,m221,m122 &1757 ! & ,e111,e121,e211,e122,e212,e2211758 1759 ! write(*,*) 'in activitya ', xal, T1760 activitya=DEXP(lnAa(xal,T)-lnAa(1.D0-1.D-12,T))1761 END FUNCTION activitya1762 1763 FUNCTION activityw(xal,T)1764 1765 REAL, INTENT(IN) :: T,xal1766 REAL :: lnAw1767 1768 activityw=DEXP(lnAw(xal,T)-lnAw(1.D-12,T))1769 END FUNCTION activityw1770 1771 ! end of functions related to zeleznik activities1772 1773 1774 1775 1776 FUNCTION SIGMADROPLET(xmass,t)1777 ! calculates the surface tension of the liquid in J/m^21778 ! xmass=mass fraction of h2so4, t in kelvins1779 ! about 230-323 K , x=0,...,11780 !(valid down to the solid phase limit temp, which depends on molefraction)1781 IMPLICIT NONE1782 REAL :: SIGMADROPLET1783 REAL, INTENT(IN):: xmass, t1784 REAL :: a, b, t1, tc, xmole1785 REAL, PARAMETER :: Msa=98.0781786 REAL, PARAMETER :: Mwv=18.01531787 1788 IF (t .LT. 305.15) THEN1789 !low temperature surface tension1790 ! Hanna Vehkam‰ki and Markku Kulmala and Ismo Napari1791 ! and Kari E. J. Lehtinen and Claudia Timmreck and Madis Noppel and Ari Laaksonen, 2002,1792 ! An improved parameterization for sulfuric acid/water nucleation rates for tropospheric1793 !and stratospheric conditions, () J. Geophys. Res., 107, pp. 4622-46311794 a=0.11864+xmass*(-0.11651+xmass*(0.76852+xmass*1795 & (-2.40909+xmass*(2.95434-xmass*1.25852))))1796 b=-0.00015709+xmass*(0.00040102+xmass*(-0.00239950+xmass*1797 & (0.007611235+xmass*(-0.00937386+xmass*0.00389722))))1798 SIGMADROPLET=a+t*b1799 ELSE1800 1801 xmole = (xmass/Msa)*(1./((xmass/Msa)+(1.-xmass)/Mwv))1802 ! high temperature surface tension1803 !H. Vehkam‰ki and M. Kulmala and K.E. J. lehtinen, 2003,1804 !Modelling binary homogeneous nucleation of water-sulfuric acid vapours:1805 ! parameterisation for high temperature emissions, () Environ. Sci. Technol., 37, 3392-33981806 1807 tc= 647.15*(1.0-xmole)*(1.0-xmole)+900.0*xmole*xmole+1808 & 3156.186*xmole*(1-xmole) !critical temperature1809 t1=1.0-t/tc1810 a= 0.2358+xmole*(-0.529+xmole*(4.073+xmole*(-12.6707+xmole*1811 & (15.3552+xmole*(-6.3138)))))1812 b=-0.14738+xmole*(0.6253+xmole*(-5.4808+xmole*(17.2366+xmole*1813 & (-21.0487+xmole*(8.719)))))1814 SIGMADROPLET=(a+b*t1)*t1**(1.256)1815 END IF1816 1817 RETURN1818 END FUNCTION SIGMADROPLET1819 1820 FUNCTION RHODROPLET(xmass,t)1821 !1822 ! calculates the density of the liquid in kg/m^31823 ! xmass=mass fraction of h2so4, t in kelvins1824 ! Hanna Vehkam‰ki and Markku Kulmala and Ismo Napari1825 ! and Kari E. J. Lehtinen and Claudia Timmreck and Madis Noppel and Ari Laaksonen, 2002,1826 ! An improved parameterization for sulfuric acid/water nucleation rates for tropospheric1827 !and stratospheric conditions, () J. Geophys. Res., 107, pp. 4622-46311828 1829 ! about 220-373 K , x=0,...,11830 !(valid down to the solid phase limit temp, which depends on molefraction)1831 1832 IMPLICIT NONE1833 REAL :: RHODROPLET1834 REAL, INTENT(IN) :: xmass, t1835 REAL :: a,b,c1836 1837 1838 a=0.7681724+xmass*(2.1847140+xmass*(7.1630022+xmass*1839 & (-44.31447+xmass*1840 & (88.75606+xmass*(-75.73729+xmass*23.43228)))))1841 b=1.808225e-3+xmass*(-9.294656e-3+xmass*(-0.03742148+1842 & xmass*(0.2565321+xmass*(-0.5362872+xmass*1843 & (0.4857736-xmass*0.1629592)))))1844 c=-3.478524e-6+xmass*(1.335867e-5+xmass*1845 & (5.195706e-5+xmass*(-3.717636e-4+xmass*1846 & (7.990811e-4+xmass*(-7.458060e-4+xmass*2.58139e-4)))))1847 RHODROPLET=a+t*(b+c*t) ! g/cm^31848 RHODROPLET= RHODROPLET*1.0e3 !kg/m^31849 RETURN1850 END FUNCTION RHODROPLET -
trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F
r1642 r1661 341 341 c Variables tendance sedimentation 342 342 343 REAL :: d_tr_sed(klon,klev,2) 343 REAL :: m0_mode1(klev,2),m0_mode2(klev,2) 344 REAL :: m3_mode1(klev,3),m3_mode2 (klev,3) 345 REAL :: d_drop_sed(klev),d_ccn_sed(klev,2),d_liq_sed(klev,2) 346 REAL :: aer_flux(klev) 347 REAL :: d_tr_sed(klon,klev,nqmax) 344 348 REAL :: d_tr_ssed(klon) 345 349 c … … 640 644 c=============================================== 641 645 642 if ((nlon .EQ. 1) .AND. ok_cloud) then 646 c MICROPHY SANS CHIMIE: seulement si full microphy (cl_scheme=2) 647 648 if (ok_chem.and..not.ok_cloud) then 649 print*,"LA CHIMIE A BESOIN DE LA MICROPHYSIQUE" 650 print*,"ok_cloud doit etre = a ok_chem" 651 stop 652 endif 653 if (.not.ok_chem.and.ok_cloud.and.(cl_scheme.eq.1)) then 654 print*,"cl_scheme=1 doesnot work without chemistry" 655 stop 656 endif 657 if (.not.ok_chem.and.ok_cloud.and.(cl_scheme.eq.2)) then 658 print*,"Full microphysics without chemistry" 659 c indexation of microphys tracers 660 CALL chemparam_ini() 661 endif 662 663 c number of microphysical tracers 664 nmicro=0 665 if (ok_cloud .AND. (cl_scheme.eq.1)) nmicro=2 666 if (ok_cloud .AND. (cl_scheme.eq.2)) nmicro=8 667 668 c CAS 1D POUR MICROPHYS Aurelien 669 if ((nlon .EQ. 1) .AND. ok_cloud .AND. (cl_scheme.eq.1)) then 643 670 PRINT*,'Open profile_cloud_parameters.csv' 644 671 OPEN(66,file='profile_cloud_parameters.csv', … … 646 673 endif 647 674 648 if ((nlon .EQ. 1) .AND. ok_sedim ) then675 if ((nlon .EQ. 1) .AND. ok_sedim .AND. (cl_scheme.eq.1)) then 649 676 PRINT*,'Open profile_cloud_sedim.csv' 650 677 OPEN(77,file='profile_cloud_sedim.csv', … … 652 679 endif 653 680 654 if ((nlon .GT. 1) .AND. (ok_chem.OR.ok_cloud)) then 681 c INIT PHOTOCHEMISTRY ! includes the indexation of microphys tracers 682 if ((nlon .GT. 1) .AND. ok_chem) then 655 683 c !!! DONC 3D !!! 656 684 CALL chemparam_ini() 657 685 endif 658 686 659 if ((nlon .GT. 1) .AND. ok_cloud) then 687 c INIT MICROPHYS SCHEME 1 (AURELIEN) 688 if ((nlon .GT. 1) .AND. ok_cloud .AND. (cl_scheme.eq.1)) then 660 689 c !!! DONC 3D !!! 661 690 CALL cloud_ini(nlon,nlev) … … 889 918 c CALL WriteField_phy('SAg',tr_seri(:,:,i_h2so4),nlev) 890 919 920 C === SEDIMENTATION === 921 891 922 if (ok_sedim) then 923 924 c !! Depend on cl_scheme !! 925 926 if (cl_scheme.eq.1) then 927 c ================ 892 928 893 929 CALL new_cloud_sedim( … … 899 935 I t_seri, 900 936 I tr_seri, 901 O d_tr_sed ,937 O d_tr_sed(:,:,1:2), 902 938 O d_tr_ssed, 903 939 I nqmax, … … 933 969 934 970 Fsedim(:,klev+1) = 0. 971 972 elseif (cl_scheme.eq.2) then 973 c ==================== 974 975 d_tr_sed(:,:,:) = 0.D0 976 977 DO i=1, klon 978 979 c Mode 1 980 m0_mode1(:,1)=tr_seri(i,:,i_m0_mode1drop) 981 m0_mode1(:,2)=tr_seri(i,:,i_m0_mode1ccn) 982 m3_mode1(:,1)=tr_seri(i,:,i_m3_mode1sa) 983 m3_mode1(:,2)=tr_seri(i,:,i_m3_mode1w) 984 m3_mode1(:,3)=tr_seri(i,:,i_m3_mode1ccn) 985 986 call drop_sedimentation(dtime,klev,m0_mode1,m3_mode1, 987 & paprs(i,:),zzlev(i,:),zzlay(i,:),t_seri(i,:), 988 & 1, 989 & d_ccn_sed(:,1),d_drop_sed,d_ccn_sed(:,2),d_liq_sed) 990 991 d_tr_sed(i,:,i_m0_mode1drop)= d_tr_sed(i,:,i_m0_mode1drop) 992 & + d_drop_sed 993 d_tr_sed(i,:,i_m0_mode1ccn) = d_tr_sed(i,:,i_m0_mode1ccn) 994 & + d_ccn_sed(:,1) 995 d_tr_sed(i,:,i_m3_mode1ccn) = d_tr_sed(i,:,i_m3_mode1ccn) 996 & + d_ccn_sed(:,2) 997 d_tr_sed(i,:,i_m3_mode1sa) = d_tr_sed(i,:,i_m3_mode1sa) 998 & + d_liq_sed(:,1) 999 d_tr_sed(i,:,i_m3_mode1w) = d_tr_sed(i,:,i_m3_mode1w) 1000 & + d_liq_sed(:,2) 1001 1002 c Mode 2 1003 m0_mode2(:,1)=tr_seri(i,:,i_m0_mode2drop) 1004 m0_mode2(:,2)=tr_seri(i,:,i_m0_mode2ccn) 1005 m3_mode2(:,1)=tr_seri(i,:,i_m3_mode2sa) 1006 m3_mode2(:,2)=tr_seri(i,:,i_m3_mode2w) 1007 m3_mode2(:,3)=tr_seri(i,:,i_m3_mode2ccn) 1008 1009 call drop_sedimentation(dtime,klev,m0_mode2,m3_mode2, 1010 & paprs(i,:),zzlev(i,:),zzlay(i,:),t_seri(i,:), 1011 & 2, 1012 & d_ccn_sed(:,1),d_drop_sed,d_ccn_sed(:,2),d_liq_sed) 1013 1014 d_tr_sed(i,:,i_m0_mode2drop)= d_tr_sed(i,:,i_m0_mode2drop) 1015 & + d_drop_sed 1016 d_tr_sed(i,:,i_m0_mode2ccn) = d_tr_sed(i,:,i_m0_mode2ccn) 1017 & + d_ccn_sed(:,1) 1018 d_tr_sed(i,:,i_m3_mode2ccn) = d_tr_sed(i,:,i_m3_mode2ccn) 1019 & + d_ccn_sed(:,2) 1020 d_tr_sed(i,:,i_m3_mode2sa) = d_tr_sed(i,:,i_m3_mode2sa) 1021 & + d_liq_sed(:,1) 1022 d_tr_sed(i,:,i_m3_mode2w) = d_tr_sed(i,:,i_m3_mode2w) 1023 & + d_liq_sed(:,2) 1024 1025 c Aer 1026 call aer_sedimentation(dtime,klev,tr_seri(i,:,i_m0_aer), 1027 & tr_seri(i,:,i_m3_aer),paprs(i,:), 1028 & zzlev(i,:),zzlay(i,:),t_seri(i,:), 1029 & d_tr_sed(i,:,i_m0_aer),d_tr_sed(i,:,i_m3_aer),aer_flux) 1030 1031 END DO 1032 1033 DO iq=nqmax-nmicro+1,nqmax 1034 tr_seri(:,:,iq) = tr_seri(:,:,iq) + d_tr_sed(:,:,iq) 1035 d_tr_sed(:,:,iq) = d_tr_sed(:,:,iq) / dtime 1036 END DO 1037 1038 endif 1039 c ==================== 1040 1041 C === FIN SEDIMENTATION === 935 1042 936 1043 endif ! ok_sedim -
trunk/LMDZ.VENUS/libf/phyvenus/phytrac_chimie.F
r1530 r1661 14 14 I pdtphys, 15 15 I temp, 16 I ppl ev,16 I pplay, 17 17 O trac) 18 18 c====================================================================== … … 29 29 30 30 #include "clesphys.h" 31 c#include "temps.h"32 c#include "paramet.h"33 c#include "comcstfi.h" !me permet de recuperer mugaz et d'autres constantes comme rad,pi etc34 31 #include "YOMCST.h" 35 32 c====================================================================== … … 61 58 real trac_sav(n_lon,n_lev,nqmax) 62 59 real trac_sum(n_lon,n_lev) 63 real ppl ev(n_lon,n_lev) ! pression pour le mileu de chaque couche (en Pa)60 real pplay(n_lon,n_lev) ! pression pour le mileu de chaque couche (en Pa) 64 61 real lon_sun 65 62 … … 93 90 PRINT*,'n_lon 1D: ',n_lon 94 91 end if 95 96 c if ((n_lon .GT. 1) .AND. ok_chem) then 97 c !!! DONC 3D !!! 98 c CALL chemparam_ini() 99 c endif 100 101 c if ((n_lon .GT. 1) .AND. ok_cloud) then 102 c !!! DONC 3D !!! 103 c CALL cloud_ini(n_lon,n_lev) 104 c endif 105 92 93 c============================================================= 94 c == CASE INIT PHOTOCHEM == 95 c============================================================= 96 106 97 IF (reinit_trac) THEN 107 98 PRINT*,'REINIT MIXING RATIO TRACEURS' 108 99 109 c ============================================================= 110 c Passage de Rm à Rv 100 c Passage de Rm a Rv 111 101 c ============================================================= 112 102 c Necessaire si on reprend les start.nc qui sont en MMR 113 114 DO iq=1,nqmax 103 c SEULEMENT LES GAZ 104 DO iq=1,nqmax-nmicro 115 105 trac(:,:,iq)=trac(:,:,iq)*mmean(:,:)/M_tr(iq) 116 106 END DO 117 107 c ============================================================= 118 108 119 c=============================================================120 109 c Initialisation des profils traceurs en Rv 121 110 c============================================================= … … 146 135 c On a donc le CO2 qui est le restant d atmosphere Venus 147 136 trac_sum(:,:)=0.0 148 DO iq=2,nqmax 137 c SEULEMENT LES GAZ 138 DO iq=2,nqmax-nmicro 149 139 trac_sum(:,:)= trac_sum(:,:) + trac(:,:,iq) 150 140 END DO … … 154 144 c============================================================= 155 145 156 c =============================================================157 c Passage de Rv à Rm158 c =============================================================159 DO iq=1,nqmax 146 c Passage de Rv a Rm 147 c ============================================================= 148 c SEULEMENT LES GAZ 149 DO iq=1,nqmax-nmicro 160 150 trac(:,:,iq)=trac(:,:,iq)*M_tr(iq)/mmean(:,:) 161 151 END DO … … 164 154 ENDIF !FIN REINIT TRAC 165 155 156 c============================================================= 157 c == CASE INIT GAZ when muphy without chemistry == 158 c============================================================= 159 160 if (.not.ok_chem.and.ok_cloud.and.(cl_scheme.eq.2)) then 161 162 c Passage de Rm a Rv 163 c ============================================================= 164 c Necessaire si on reprend les start.nc qui sont en MMR 165 c SEULEMENT LES GAZ 166 DO iq=1,nqmax-nmicro 167 trac(:,:,iq)=trac(:,:,iq)*mmean(:,:)/M_tr(iq) 168 END DO 169 c ============================================================= 170 171 call vapors4muphy_ini(n_lon,n_lev,trac) 172 173 c Passage de Rv a Rm 174 c ============================================================= 175 c SEULEMENT LES GAZ 176 DO iq=1,nqmax-nmicro 177 trac(:,:,iq)=trac(:,:,iq)*M_tr(iq)/mmean(:,:) 178 END DO 179 c ============================================================= 180 181 endif 166 182 167 183 c------------- … … 172 188 173 189 c ============================================================= 174 c Passage de Rm à Rv 175 c ============================================================= 176 DO iq=1,nqmax 177 trac(:,:,iq)=MAX(trac(:,:,iq)*mmean(:,:)/M_tr(iq),1.E-30) 178 END DO 179 c ============================================================= 180 181 182 c ============================================================= 183 c Appel Microphysique (sans nucleation) 184 c Volume Mixing Ratio 185 c ============================================================= 186 187 IF (ok_cloud) THEN 188 190 c Passage de Rm a Rv 191 c DES GAZ 192 c ============================================================= 193 DO iq=1,nqmax-nmicro 194 trac(:,:,iq)=MAX(trac(:,:,iq)*mmean(:,:)/M_tr(iq),1.E-30) 195 END DO 196 c ============================================================= 197 198 199 c ============================================================= 200 c Appel Microphysique (schema simple, these Aurelien Stolzenbach) 201 c ============================================================= 202 203 IF (ok_cloud .AND. cl_scheme.eq.1) THEN 204 205 c Passage de Rm a Rv pour les liq 206 trac(:,:,i_h2so4liq)=MAX(trac(:,:,i_h2so4liq) 207 & *mmean(:,:)/M_tr(i_h2so4liq),1.E-30) 208 trac(:,:,i_h2oliq)=MAX(trac(:,:,i_h2oliq) 209 & *mmean(:,:)/M_tr(i_h2oliq),1.E-30) 210 189 211 c PRINT*,'DEBUT CLOUD' 190 212 c On remet tout le RM liq dans la partie gaz 191 c !!! On reforme un nuage àchaque fois !!!213 c !!! On reforme un nuage a chaque fois !!! 192 214 193 215 DO ilev=1, n_lev … … 203 225 204 226 CALL new_cloud_venus(n_lev, n_lon, 205 e temp,ppl ev,227 e temp,pplay, 206 228 e mrtwv,mrtsa, 207 229 e mrwv,mrsa) … … 210 232 c Actualisation des mixing ratio liq et gaz 211 233 c ========================================= 212 c Si la routine new_cloud_venus n'a pas actualis émrwv et mrsa234 c Si la routine new_cloud_venus n'a pas actualise mrwv et mrsa 213 235 c on a alors bien mr=mrt pour sa et wv, donc les parties liq sont=0 hors du nuage 214 236 c ou si on ne condense pas … … 229 251 230 252 c ============================================================= 231 c PRINT*,'FIN CLOUD' 232 ENDIF 253 c PRINT*,'FIN CLOUD, scheme 1' 254 ENDIF 255 256 c ============================================================= 257 c Appel Microphysique (schema complet, these Sabrina Guilbon) 258 c ============================================================= 259 260 IF (ok_cloud .AND. cl_scheme.eq.2) THEN 261 262 c Boucle sur grille (n_lon) et niveaux (n_lev) 263 DO ilon=1, n_lon 264 DO ilev=1, n_lev 265 266 CALL MAD_MUPHY(pdtphys, ! Timestep 267 & temp(ilon,ilev),pplay(ilon,ilev), ! Temperature and pressure 268 & trac(ilon,ilev,i_h2o),trac(ilon,ilev,i_h2so4), ! Mixing ratio of SA and W 269 & trac(ilon,ilev,i_m0_aer),trac(ilon,ilev,i_m3_aer), ! Moments of aerosols 270 & trac(ilon,ilev,i_m0_mode1drop),trac(ilon,ilev,i_m0_mode1ccn), ! Moments of mode 1 271 & trac(ilon,ilev,i_m3_mode1sa),trac(ilon,ilev,i_m3_mode1w), ! Moments of mode 1 272 & trac(ilon,ilev,i_m3_mode1ccn), ! Moments of mode 1 273 & trac(ilon,ilev,i_m0_mode2drop),trac(ilon,ilev,i_m0_mode2ccn), ! Moments of mode 2 274 & trac(ilon,ilev,i_m3_mode2sa),trac(ilon,ilev,i_m3_mode2w), ! Moments of mode 2 275 & trac(ilon,ilev,i_m3_mode2ccn)) ! Moments of mode 2 276 277 ENDDO 278 ENDDO 279 280 281 c ============================================================= 282 c PRINT*,'FIN CLOUD, scheme 2' 283 ENDIF 284 233 285 234 286 c============================================================= … … 239 291 c Ici, la longitude au midi local se deplace vers l'Ouest 240 292 c c'est le sens terrestre 241 c pour V énus on prend juste l'opposéde la longitude et on a la rotation242 c de V énus et donc le midi local qui se déplace vers l'Est293 c pour Venus on prend juste l'oppose de la longitude et on a la rotation 294 c de Venus et donc le midi local qui se deplace vers l'Est 243 295 244 296 lon_sun = (0.5 - gmtime) * 2.0 * RPI … … 246 298 lat_local = lat * RPI/180.0E+0 247 299 300 IF (ok_chem) THEN 301 302 c PRINT*,'DEBUT CHEMISTRY' 248 303 DO ilon=1, n_lon 249 304 … … 255 310 c PRINT*,'sza_local :', sza_local 256 311 257 IF (ok_chem) THEN258 c PRINT*,'DEBUT CHEMISTRY'259 312 c ============================================================= 260 313 c Appel Photochimie 261 314 c ============================================================= 262 c Pression en hPa => ppl ev/100.315 c Pression en hPa => pplay/100. 263 316 264 317 CALL new_photochemistry_venus(n_lev, n_lon, pdtphys, 265 e ppl ev(ilon,:)/100.,318 e pplay(ilon,:)/100., 266 319 e temp(ilon,:), 267 320 e trac(ilon,:,:), … … 269 322 e sza_local, nqmax) 270 323 c ============================================================= 324 325 END DO 271 326 c PRINT*,'FIN CHEMISTRY' 272 327 273 END IF 328 END IF 329 c============================================================= 330 331 c ============================================================= 332 c Passage de Rv a Rm 333 c ============================================================= 334 c DES GAZ 335 DO iq=1,nqmax-nmicro 336 trac(:,:,iq)=trac(:,:,iq)*M_tr(iq)/mmean(:,:) 274 337 275 338 END DO 276 c ============================================================= 277 c Passage de Rv à Rm 278 c ============================================================= 279 DO iq=1,nqmax 280 c trac(:,:,iq)=trac(:,:,iq)*M_tr(iq)/RMD 281 trac(:,:,iq)=trac(:,:,iq)*M_tr(iq)/mmean(:,:) 282 283 END DO 339 340 IF (ok_cloud .AND. cl_scheme.eq.1) THEN 341 c Passage de Rm a Rv pour les liq 342 trac(:,:,i_h2so4liq)=trac(:,:,i_h2so4liq)*M_tr(i_h2so4liq) 343 & /mmean(:,:) 344 trac(:,:,i_h2oliq)=trac(:,:,i_h2oliq)*M_tr(i_h2oliq) 345 & /mmean(:,:) 346 ENDIF 347 284 348 c ============================================================= 285 349 C PRINT*,'FIN PHYTRAC' -
trunk/LMDZ.VENUS/libf/phyvenus/write_histins.h
r1572 r1661 68 68 call histwrite_phy(nid_ins,.false.,"tops",itau_w,topsw) 69 69 70 IF (ok_cloud ) THEN70 IF (ok_cloud.and.(cl_scheme.eq.1)) THEN 71 71 72 72 IF (nb_mode.GE.1) THEN … … 109 109 & rho_droplet) 110 110 ENDIF 111 IF (ok_sedim) THEN 111 112 IF (ok_sedim.and.(cl_scheme.eq.1)) THEN 112 113 113 114 call histwrite_phy(nid_ins,.false.,"d_tr_sed_H2SO4",itau_w, … … 118 119 call histwrite_phy(nid_ins,.false.,"F_sedim",itau_w,Fsedim) 119 120 ENDIF 121 120 122 ENDIF !lev_histins.GE.2 121 123 -
trunk/LMDZ.VENUS/libf/phyvenus/write_histmth.h
r1572 r1661 115 115 call histwrite_phy(nid_mth,.false.,"dtcond",itau_w,d_t_conduc) 116 116 call histwrite_phy(nid_mth,.false.,"dumolvis",itau_w,d_u_molvis) 117 call histwrite_phy(nid_mth,.false.,"dvmolvis",itau_w, d_v_molvis)117 call histwrite_phy(nid_mth,.false.,"dvmolvis",itau_w,-1.*d_v_molvis) 118 118 119 119 c call histwrite_phy(nid_mth,.false.,"dtec",itau_w,d_t_ec)
Note: See TracChangeset
for help on using the changeset viewer.