Changeset 1667 for trunk/LMDZ.VENUS/libf


Ignore:
Timestamp:
Feb 17, 2017, 3:04:05 PM (8 years ago)
Author:
slebonnois
Message:

SL: an other round of bug corrections for Venus clouds

Location:
trunk/LMDZ.VENUS/libf/phyvenus
Files:
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/cloudvenus/mad_muphy.F90

    r1664 r1667  
    122122  IF (SEDIM .and. MERGE) THEN
    123123     redge = (r1*r2)**0.5D0 ! Edge radius of mode 1
    124      write(*,*)'The intersection size or virtual bonduary', redge
     124!     write(*,*)'The intersection size or virtual bonduary', redge
    125125
    126126     IF (r1 .EQ. redge) THEN
    127         write(*,*)'Mode 1 merge to mode 2', redge, r1
     127!        write(*,*)'Mode 1 merge to mode 2', redge, r1
    128128        CALL MERGING(r1,N1,sigma1,sigma2,dM0_merge_m1,dM3_merge_m1, &
    129129             &   dM0_merge_m2,dM3_merge_m2)
     
    143143
    144144     IF (r2 .EQ. redge) THEN
    145         write(*,*)'Mode 2 merge to mode 1',redge,r2
     145!        write(*,*)'Mode 2 merge to mode 1',redge,r2
    146146        CALL MERGING(r2,N2,sigma2,sigma1,dM0_merge_m2,dM3_merge_m2, &
    147147             &   dM0_merge_m1,dM3_merge_m1)
     
    325325  M3_m2(3) = M3_m2(3) + dM3_m2_ccn
    326326  !------------------------------------!
    327   write(*,*)'l.653: after up', M3_m1(1),M3_m1(2),M3_m1(3),dM3_m1_SA,dM3_m1_WV,dM3_m1_ccn
    328   write(*,*)'l.654: after up', M0_m1(1),M0_m1(2),dM0_m1_drop
     327!  write(*,*)'l.653: after up', M3_m1(1),M3_m1(2),M3_m1(3),dM3_m1_SA,dM3_m1_WV,dM3_m1_ccn
     328!  write(*,*)'l.654: after up', M0_m1(1),M0_m1(2),dM0_m1_drop
    329329!-----------------------------------------------------------------------
    330330  ! To controle/check the mass conservation !
     
    375375        N1 = 0.D0
    376376     ENDIF
    377      write(*,*)'rmean not ZERO',r1,N1,M0_m1(1),M3_m1(1),WSA
     377!     write(*,*)'rmean not ZERO',r1,N1,M0_m1(1),M3_m1(1),WSA
    378378  ENDIF
    379379 
     
    408408  frac_ccn_m2 = M0_m2(2)/(M0_m2(1)+M0_m2(2))
    409409
    410   write(*,*)'rmean',r1,'NTOT',N1, 'SH2SO4', SH2SO4
     410!  write(*,*)'rmean',r1,'NTOT',N1, 'SH2SO4', SH2SO4
    411411
    412412
     
    416416  IF (MERGE) THEN
    417417     redge = (r1*r2)**0.5D0 ! Edge radius of mode 1
    418      write(*,*)'The intersection size or virtual bonduary', redge
     418!     write(*,*)'The intersection size or virtual bonduary', redge
    419419
    420420     IF (r1 .EQ. redge) THEN
    421         write(*,*)'Mode 1 merge to mode 2', redge, r1
     421!        write(*,*)'Mode 1 merge to mode 2', redge, r1
    422422        CALL MERGING(r1,N1,sigma1,sigma2,dM0_merge_m1,dM3_merge_m1, &
    423423             &   dM0_merge_m2,dM3_merge_m2)
     
    437437
    438438     IF (r2 .EQ. redge) THEN
    439         write(*,*)'Mode 2 merge to mode 1',redge,r2
     439!        write(*,*)'Mode 2 merge to mode 1',redge,r2
    440440        CALL MERGING(r2,N2,sigma2,sigma1,dM0_merge_m2,dM3_merge_m2, &
    441441             &   dM0_merge_m1,dM3_merge_m1)
     
    476476!-----------------------------------------------------------------------
    477477  if (dt .eq. 1) then
    478      write(*,*) 'Ntot, rc mode 1: ', N1,r1
     478!     write(*,*) 'Ntot, rc mode 1: ', N1,r1
    479479     ! Log-normal distribution function
    480480     CALL build_radius_grid(nbin,rmin,rmax,vratio)
    481481     CALL logdist(sigma1,N1,r1,rad_cld,n_g1)
    482      DO i = 1, nbin
    483         open(888,file='ND_t3600_nuc-het-flux_dt1_1step_sssat')
    484         write(888,'(I10,2X,3(ES15.7,1X))') i, rad_cld(i), n_g1(i)
    485      ENDDO
     482!     DO i = 1, nbin
     483!        open(888,file='ND_t3600_nuc-het-flux_dt1_1step_sssat')
     484!        write(888,'(I10,2X,3(ES15.7,1X))') i, rad_cld(i), n_g1(i)
     485!     ENDDO
    486486  endif
    487487
     
    507507
    508508  MFPAIR = FPLAIR(TAIR,PAIR) ! Mean free path of air molecules
    509   write(*,*) 'MFPAIR',MFPAIR, TAIR, PAIR
     509!  write(*,*) 'MFPAIR',MFPAIR, TAIR, PAIR
    510510  Kn = MFPAIR/ri1             ! Knudsen number
    511511
     
    531531  real, intent(in) :: TAIR, PAIR, MRSA_loc
    532532  real :: ROSAS, PSASAS_ZELE,  STSAS
    533   write(*,*)'checkpoint change_wsa', ST, RHOSA, RHOsasat, PSASAS_ZELE(TAIR,WSA), TAIR, WSA
     533!  write(*,*)'checkpoint change_wsa', ST, RHOSA, RHOsasat, PSASAS_ZELE(TAIR,WSA), TAIR, WSA
    534534  ST = STSAS(TAIR,WSA)      ! Surface tension of sulfuric acid solution/vapor (N/m)
    535535
     
    539539  SH2SO4 = (PAIR*MRSA_loc)/RHOsasat    ! Saturation Ratio
    540540
    541   write(*,*)'checkpoint change_wsa', PSASAS_ZELE(TAIR,WSA)
     541!  write(*,*)'checkpoint change_wsa', PSASAS_ZELE(TAIR,WSA)
    542542
    543543END SUBROUTINE change_wsa
  • trunk/LMDZ.VENUS/libf/phyvenus/cloudvenus/new_cloud_venus.F

    r1661 r1667  
    119119!       Elle fait appel à la fct/ssrtine ITERWV()
    120120
    121         CALL BRACWV(WVMIN,WVMAX,NBRAC,RMODE,
    122      &  mrt_wv(ilon,ilev),mrt_sa(ilon,ilev),TT(ilon,ilev),
    123      &  PP(ilon,ilev),FLAG,WSAFLAG,NBROOT)
     121        CALL BRACWV(TT(ilon,ilev),PP(ilon,ilev),WVMIN,WVMAX,NBRAC,
     122     &  RMODE,mrt_wv(ilon,ilev),mrt_sa(ilon,ilev),FLAG,WSAFLAG,NBROOT)
    124123
    125124        SELECT CASE(FLAG)
     
    130129!       Elle fait appel ˆ la fct/ssrtine ITERWV()
    131130
    132           WH2SO4(ilon,ilev)=IRFRMWV(WVMIN,WVMAX,WVACC,MAXITE,RMODE,
    133      &    TT(ilon,ilev),PP(ilon,ilev),
     131          WH2SO4(ilon,ilev)=IRFRMWV(TT(ilon,ilev),PP(ilon,ilev),
     132     &    WVMIN,WVMAX,WVACC,MAXITE,RMODE,
    134133     &    mrt_wv(ilon,ilev),mrt_sa(ilon,ilev),NBROOT)
    135134
  • trunk/LMDZ.VENUS/libf/phyvenus/cloudvenus/wsa_new.F90

    r1664 r1667  
    204204  WSAMIN = 0.1D0
    205205  WSAMAX = 1.0D0
    206   LPPWV = LOG(PAIR*WV)
     206  LPPWV = DLOG(PAIR*WV)
    207207
    208208  ! Appel Bracket de KEEQ         
     
    293293        ! Si NROOT>1 on place la borne sup output ˆ la borne min du calcul en i             
    294294        IF (NROOT.GT.1) THEN
    295            XB=(1.-LOG(DBLE(I+1))/LOG(DBLE(N)))*XMAX
     295           XB=(1.-DLOG(DBLE(I+1))/DLOG(DBLE(N)))*XMAX
    296296        ENDIF
    297297
     
    314314
    315315     DO J=N-1,1,-1
    316         X=(1.-LOG(DBLE(N-J))/LOG(DBLE(N)))*XMAX
     316        X=(1.-DLOG(DBLE(N-J))/DLOG(DBLE(N)))*XMAX
    317317        !             write(*,*) 'BRACWV, bf 4th ITERWV (cas 2) '
    318318        CALL ITERWV(TAIR,PAIR,X,WVLIQ,WVEQ,WVTOT,WSAOUT,SATOT,RADIUS)
     
    365365  DX=(XB-XA)/N
    366366  X=XB
    367   FP=KEEQ(RADIUS,X,LPPWVINP)
     367  FP=KEEQ(TAIR,RADIUS,X,LPPWVINP)
    368368
    369369  DO I=N,1,-1
    370370     X=X-DX
    371371
    372      FC=KEEQ(RADIUS,X,LPPWVINP)
     372     FC=KEEQ(TAIR,RADIUS,X,LPPWVINP)
    373373
    374374     IF ((FP*FC).LE.0.) THEN
     
    752752
    753753  ! Physical constants:
    754   REAL :: MH2O, KEEQ
     754  REAL :: KEEQ
    755755
    756756  !     External functions needed:
     
    764764  REAL :: C1
    765765
    766   MH2O= MWV
    767   C1=2.0D0*MH2O/RGAS
     766  C1=2.0D0*MWV/RGAS
    768767
    769768  KEEQ=LPPWV-C1*STSAS(TAIR,WX)/(TAIR*RADIUS*ROSAS(TAIR,WX))- &
     
    818817
    819818  !pure acid satur vapor pressure
    820   lpar= -11.695D0 + LOG(pstand) ! Zeleznik
    821   acidps = 1/360.15D0 - 1.0/T + 0.38D0/545.D0*(1.0+LOG(360.15D0/T)-360.15D0/T)
     819  lpar= -11.695D0 + DLOG(pstand) ! Zeleznik
     820  acidps = 1/360.15D0 - 1.0/T + 0.38D0/545.D0*(1.0+DLOG(360.15D0/T)-360.15D0/T)
    822821  acidps = 10156.D0*acidps + lpar
    823   acidps = EXP(acidps)    !Pa
     822  acidps = DEXP(acidps)    !Pa
    824823
    825824  !acid sat.vap.PP over mixture (flat surface):
  • trunk/LMDZ.VENUS/libf/phyvenus/ini_histmth.h

    r1530 r1667  
    225225     .                "ave(X)", zsto,zout)
    226226c
    227          CALL histdef(nid_mth,"dtlwrNLTE", "LWNLTE radiation dT",
    228      .                "K/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
    229      .                "ave(X)", zsto,zout)
    230 c
    231          CALL histdef(nid_mth,"dtlwrLTE","LW_LTE radiation dT",
    232      .                "K/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
    233      .                "ave(X)", zsto,zout)
    234 c
    235          CALL histdef(nid_mth, "dteuv", "UV radiation dT", "K/s",
    236      .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
    237      .                "ave(X)", zsto,zout)
    238          CALL histdef(nid_mth, "dtcond", "Therm conduction", "K/s",
    239      .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
    240      .                "ave(X)", zsto,zout)
    241          CALL histdef(nid_mth, "dumolvis", "molec viscosity (u)"
    242      .                ,"m/s2",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
    243      .                "ave(X)", zsto,zout)
    244          CALL histdef(nid_mth, "dvmolvis", "molec viscosity (v)",
    245      .                "m/s2",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
    246      .                "ave(X)", zsto,zout)
     227c        CALL histdef(nid_mth,"dtlwrNLTE", "LWNLTE radiation dT",
     228c    .                "K/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
     229c    .                "ave(X)", zsto,zout)
     230c
     231c        CALL histdef(nid_mth,"dtlwrLTE","LW_LTE radiation dT",
     232c    .                "K/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
     233c    .                "ave(X)", zsto,zout)
     234c
     235c        CALL histdef(nid_mth, "dteuv", "UV radiation dT", "K/s",
     236c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
     237c    .                "ave(X)", zsto,zout)
     238c        CALL histdef(nid_mth, "dtcond", "Therm conduction", "K/s",
     239c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
     240c    .                "ave(X)", zsto,zout)
     241c        CALL histdef(nid_mth, "dumolvis", "molec viscosity (u)"
     242c    .                ,"m/s2",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
     243c    .                "ave(X)", zsto,zout)
     244c        CALL histdef(nid_mth, "dvmolvis", "molec viscosity (v)",
     245c    .                "m/s2",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
     246c    .                "ave(X)", zsto,zout)
    247247
    248248c
  • trunk/LMDZ.VENUS/libf/phyvenus/write_histmth.h

    r1661 r1667  
    110110      call histwrite_phy(nid_mth,.false.,"dtlwr",itau_w,dtlw)
    111111c en K/s     
    112       call histwrite_phy(nid_mth,.false.,"dtlwrNLTE",itau_w,d_t_nlte)
    113       call histwrite_phy(nid_mth,.false.,"dtlwrLTE",itau_w,-1.*cool)
    114       call histwrite_phy(nid_mth,.false.,"dteuv",itau_w,d_t_euv)
    115       call histwrite_phy(nid_mth,.false.,"dtcond",itau_w,d_t_conduc)
    116       call histwrite_phy(nid_mth,.false.,"dumolvis",itau_w,d_u_molvis)
    117       call histwrite_phy(nid_mth,.false.,"dvmolvis",itau_w,-1.*d_v_molvis)
     112c     call histwrite_phy(nid_mth,.false.,"dtlwrNLTE",itau_w,d_t_nlte)
     113c     call histwrite_phy(nid_mth,.false.,"dtlwrLTE",itau_w,-1.*cool)
     114c     call histwrite_phy(nid_mth,.false.,"dteuv",itau_w,d_t_euv)
     115c     call histwrite_phy(nid_mth,.false.,"dtcond",itau_w,d_t_conduc)
     116c     call histwrite_phy(nid_mth,.false.,"dumolvis",itau_w,d_u_molvis)
     117c     call histwrite_phy(nid_mth,.false.,"dvmolvis",itau_w,-1.*d_v_molvis)
    118118
    119119c     call histwrite_phy(nid_mth,.false.,"dtec",itau_w,d_t_ec)
Note: See TracChangeset for help on using the changeset viewer.