Ignore:
Timestamp:
Dec 21, 2011, 10:09:07 AM (13 years ago)
Author:
rwordsworth
Message:

Variable ice timestep added for ice evolution algorithm.
Sedimentation improved to allow consistent dust (L. Kerber).
Bug linked to allocatable matrices removed from rcm1d.F.
Treatment of initial aerosol radii in callcorrk.F90 improved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/newsedim.F

    r253 r486  
    7979            PRINT*,'ngrid  =',ngrid
    8080            PRINT*,'ngridmx  =',ngridmx
    81             STOP
     81            STOP 
    8282         ENDIF
    8383         firstcall=.false.
     
    111111c     (stokes law corrected for low pressure by the Cunningham
    112112c     slip-flow correction  according to Rossow (Icarus 36, 1-50, 1978)
    113 
     113       
    114114        do  l=1,nlay
    115115          do ig=1, ngrid
     
    121121            endif 
    122122
    123 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    124 ! TEMPORARY MODIF BY RDW !!!!
    125             !rfall=5.e-6
    126             if(rfall.lt.1.e-7)then
    127                rfall=1.e-7
    128             endif
    129             !if(rfall.gt.5.e-5)then
    130             !   rfall=5.e-5
    131             !endif
    132 
    133 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    134 
    135123            vstokes(ig,l) = b * rho * rfall**2 *
    136124     &      (1 + 1.333* ( a*pt(ig,l)/pplev(ig,l) )/rfall)
     
    147135c      va traverser le niveau intercouche l : "dztop" est sa hauteur
    148136c      au dessus de l (m), "ptop" est sa pression (Pa))
    149 
    150137      do  l=1,nlay
    151138        do ig=1, ngrid
     
    154141             Ep=0
    155142             k=0
    156 
     143           w(ig,l) = 0. !! JF+AS ajout initialisation (LK MARS)
    157144c **************************************************************
    158145c            Simple Method
    159              w(ig,l) =
    160      &       (1- exp(-dztop*g/(r*pt(ig,l))))*pplev(ig,l) / g
    161 cc           write(*,*) 'OK simple method l,w =', l, w(ig,l)
    162 cc           write(*,*) 'OK simple method dztop =', dztop
    163 c **************************************************************
     146cc             w(ig,l) =
     147cc     &       (1- exp(-dztop*g/(r*pt(ig,l))))*pplev(ig,l) / g
     148cc             write(*,*) 'OK simple method l,w =', l, w(ig,l)
     149cc            write(*,*) 'OK simple method dztop =', dztop
     150           w(ig,l) = 1. - exp(-dztop*g/(r*pt(ig,l)))
     151             !!! Diagnostic: JF. Fix: AS. Date: 05/11
     152             !!! Probleme arrondi avec la quantite ci-dessus
     153             !!! ---> vaut 0 pour -dztop*g/(r*pt(ig,l)) trop petit
     154             !!! ---> dans ce cas on utilise le developpement limite !
     155             !!! ---> exp(-x) = 1 - x lorsque x --> 0 avec une erreur de x^2 / 2 
     156
     157             IF ( w(ig,l) .eq. 0. ) THEN
     158                w(ig,l) = ( dztop*g/(r*pt(ig,l)) ) * pplev(ig,l) / g
     159             ELSE
     160                w(ig,l) = w(ig,l) * pplev(ig,l) / g
     161             ENDIF
     162! LK borrowed simple method from Mars model (AS/JF)
     163
     164!**************************************************************
    164165cccc         Complex method :
    165             if (dztop.gt.epaisseur(ig,l)) then
     166           if (dztop.gt.epaisseur(ig,l)) then
    166167cccc            Cas ou on "epuise" la couche l : On calcule le flux
    167168cccc            Venant de dessus en tenant compte de la variation de Vstokes
     
    176177               enddo
    177178               Ep = Ep - epaisseur(ig,l+k)
    178              end if
    179              ptop=pplev(ig,l+k)*exp(-(dztop-Ep)*g/(r*pt(ig,l+k)))
    180              w(ig,l) = (pplev(ig,l) -Ptop)/g
     179!             ptop=pplev(ig,l+k)*exp(-(dztop-Ep)*g/(r*pt(ig,l+k)))
     180             ptop=exp(-(dztop-Ep)*g/(r*pt(ig,l+k)))
     181             IF ( ptop .eq. 1. ) THEN
     182                !PRINT*, 'newsedim: exposant trop petit ', ig, l
     183                ptop=pplev(ig,l+k) * ( 1. - (dztop-Ep)*g/(r*pt(ig,l+k)))
     184             ELSE
     185                ptop=pplev(ig,l+k) * ptop
     186             ENDIF
     187
     188             w(ig,l) = (pplev(ig,l) - ptop)/g
     189
     190            endif   !!! complex method
    181191c
    182192cc           write(*,*) 'OK new    method l,w =', l, w(ig,l)
     
    188198cc            if(l.eq.8)write(*,*)'l=8,k, w',k, w(1,l)
    189199c **************************************************************
     200
    190201        end do
    191202      end do
     
    195206c    &                wq(1,6),wq(1,7),pqi(1,6)
    196207
    197 
    198208      RETURN
    199209      END
    200 
Note: See TracChangeset for help on using the changeset viewer.