Changeset 3802


Ignore:
Timestamp:
Jun 10, 2025, 11:20:19 AM (4 days ago)
Author:
debatzbr
Message:

Pluto PCM: add some sanity checks to ensure haze stability
BBT

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/aeropacity.F90

    r3585 r3802  
    122122            ! Spherical aerosols
    123123            sig = 0.2
    124             dtau_aer(:,:,1) = m0as(:,:) * QREFvis3d(:,:,1) * pi * mp2m_rc_sph(:,:)**2 * exp(2*sig**2)
     124            where ((m0as(:,:) >= 1e-8).and.(mp2m_rc_sph(:,:) >= 5e-9))
     125               dtau_aer(:,:,1) = m0as(:,:) * QREFvis3d(:,:,1) * pi * mp2m_rc_sph(:,:)**2 * exp(2*sig**2)
     126            elsewhere
     127               dtau_aer(:,:,1) = 0d0
     128            endwhere
    125129            ! Fractal aerosols
    126130            sig = 0.35
    127             dtau_aer(:,:,2) = m0af(:,:) * QREFvis3d(:,:,2) * pi * mp2m_rc_fra(:,:)**2 * exp(2*sig**2)
     131            where ((m0af(:,:) >= 1e-8).and.(mp2m_rc_fra(:,:) >= 1e-8))
     132               dtau_aer(:,:,2) = m0af(:,:) * QREFvis3d(:,:,2) * pi * mp2m_rc_fra(:,:)**2 * exp(2*sig**2)
     133            elsewhere
     134               dtau_aer(:,:,2) = 0d0
     135            endwhere
    128136           
    129137            ! write(*,*) 'dtau_as  :', MINVAL(dtau_aer(:,:,1)), '-', MAXVAL(dtau_aer(:,:,1))
  • trunk/LMDZ.PLUTO/libf/phypluto/aeroptproperties.F90

    r3642 r3802  
    3838!     ==============================================================
    3939
    40 !     Local variables
    41 !     ---------------
    42 
    43 
     40!     INPUTS
     41!     ------
     42      INTEGER :: ngrid,nlayer
     43!     Aerosol effective radius used for radiative transfer (meter)
     44      REAL :: reffrad(ngrid,nlayer,naerkind)
     45!     Aerosol effective variance used for radiative transfer (n.u.)
     46      REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind)
     47
     48!     OUTPUTS
     49!     -------
     50      REAL,INTENT(OUT) :: QVISsQREF3d(ngrid,nlayer,L_NSPECTV,naerkind)
     51      REAL,INTENT(OUT) :: omegaVIS3d(ngrid,nlayer,L_NSPECTV,naerkind)
     52      REAL,INTENT(OUT) :: gVIS3d(ngrid,nlayer,L_NSPECTV,naerkind)
     53
     54      REAL,INTENT(OUT) :: QIRsQREF3d(ngrid,nlayer,L_NSPECTI,naerkind)
     55      REAL,INTENT(OUT) :: omegaIR3d(ngrid,nlayer,L_NSPECTI,naerkind)
     56      REAL,INTENT(OUT) :: gIR3d(ngrid,nlayer,L_NSPECTI,naerkind)
     57
     58      REAL,INTENT(OUT) :: QREFvis3d(ngrid,nlayer,naerkind)
     59      REAL,INTENT(OUT) :: QREFir3d(ngrid,nlayer,naerkind)
     60
     61!      REAL :: omegaREFvis3d(ngrid,nlayer,naerkind)
     62!      REAL :: omegaREFir3d(ngrid,nlayer,naerkind)
    4463
    4564!     =============================================================
     
    4867
    4968!     Min. and max radius of the interpolation grid (in METERS)
    50       REAL, PARAMETER :: refftabmin = 2e-8 !2e-8
     69      REAL, PARAMETER :: refftabmin = 4e-9 !2e-8
    5170!      REAL, PARAMETER :: refftabmax = 35e-6
    5271      REAL, PARAMETER :: refftabmax = 1e-3
     
    95114      INTEGER :: ig,lg,chg
    96115
     116
    97117!     Local saved variables
    98118!     ---------------------
    99 
    100119!     Radius axis of the interpolation grid
    101120      REAL,SAVE :: refftab(refftabsize)
     
    170189!$OMP THREADPRIVATE(omegIRa,omegrefIRa,omegIRb,omegrefIRb,gIRa,gIRb)
    171190
     191      ! Local variables:
     192      !-----------------
    172193      REAL :: radiusm
    173194      REAL :: radiusr
    174 
    175 !     Inputs
    176 !     ------
    177 
    178       INTEGER :: ngrid,nlayer
    179 !     Aerosol effective radius used for radiative transfer (meter)
    180       REAL :: reffrad(ngrid,nlayer,naerkind)
    181 !     Aerosol effective variance used for radiative transfer (n.u.)
    182       REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind)
    183 
    184 !     Outputs
    185 !     -------
    186 
    187       REAL,INTENT(OUT) :: QVISsQREF3d(ngrid,nlayer,L_NSPECTV,naerkind)
    188       REAL,INTENT(OUT) :: omegaVIS3d(ngrid,nlayer,L_NSPECTV,naerkind)
    189       REAL,INTENT(OUT) :: gVIS3d(ngrid,nlayer,L_NSPECTV,naerkind)
    190 
    191       REAL,INTENT(OUT) :: QIRsQREF3d(ngrid,nlayer,L_NSPECTI,naerkind)
    192       REAL,INTENT(OUT) :: omegaIR3d(ngrid,nlayer,L_NSPECTI,naerkind)
    193       REAL,INTENT(OUT) :: gIR3d(ngrid,nlayer,L_NSPECTI,naerkind)
    194 
    195       REAL,INTENT(OUT) :: QREFvis3d(ngrid,nlayer,naerkind)
    196       REAL,INTENT(OUT) :: QREFir3d(ngrid,nlayer,naerkind)
    197 
    198 !      REAL :: omegaREFvis3d(ngrid,nlayer,naerkind)
    199 !      REAL :: omegaREFir3d(ngrid,nlayer,naerkind)
    200195
    201196      REAL :: minrad    ! minimal radius in table .dat radiustab (outside 0)
     
    260255      ENDIF ! of IF (first_allocate)
    261256
     257
    262258      DO iaer = 1, naerkind ! Loop on aerosol kind
     259        !==================================================================
     260        ! If there is one single particle size, optical
     261        ! properties of the considered aerosol are homogeneous
    263262        IF ( (nsize(iaer,1).EQ.1).AND.(nsize(iaer,2).EQ.1) ) THEN
    264 !==================================================================
    265 !       If there is one single particle size, optical
    266 !         properties of the considered aerosol are homogeneous
     263
    267264          DO lg = 1, nlayer
    268265            DO ig = 1, ngrid
     
    289286          endif
    290287
    291         ELSE ! Varying effective radius and variance
     288        !==================================================================
     289        ! Various particule size
     290        ! Varying effective radius and variance
     291        ELSE
     292
    292293      DO idomain = 1, 2 ! Loop on visible or infrared channel
    293 !==================================================================
    294294!     1. Creating the effective radius and variance grid
    295295!     --------------------------------------------------
     
    487487!         2.1 Effective radius index and kx calculation
    488488          var_tmp=reffrad(ig,lg,iaer)/refftabmin
    489           var_tmp=log(var_tmp)*3.
     489          if (var_tmp.GT.0.) then ! for debug
     490            var_tmp=log(var_tmp)*3.
     491          else
     492            var_tmp=0.
     493          endif
    490494          var_tmp=var_tmp/logvratgrid+1.
    491495          grid_i=floor(var_tmp)
Note: See TracChangeset for help on using the changeset viewer.