Ignore:
Timestamp:
Oct 19, 2022, 11:24:43 AM (2 years ago)
Author:
aslmd
Message:

Initialisation of Radiative Generic Condensable Aerosols

We can activate the scheme by putting aerogeneric = # of aerosols in callphys.def. This is the only needed thing for activating the radiative effects. They must be tracer in modern tracer.def

Commented out the abort if we use more than 4 aerosols

Added reading of optprop files for Radiative Generic Condensable Aerosols

We use the same file for IR and VI channel. For now, only MnS, Cr,Fe and Mg2SiO4 can be read. If you want to add another specie, check the code, it is explained how to quickly do that (right above the Initializations)

Added radii calculation for Radiative Generic Condensable aerosols

Changed the hardcoded size of the totalemit array

The hardcoded size is now 1900 instead of 100 so we don't exceed the array size when working at high spectral resolution (very rare case)

Added opacity computation for Radiative Generic Condensable aerosols

We do this computation in the same fashion as what's performed on water and dust.

switch iniaerosol and initracer order, to prepare for the RGCS scheme

Needed to switch the order of initialization so we can use the RGCS scheme without the assumption that ice and vap tracer of the same specie are following each other in the traceur.def file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90

    r2297 r2803  
    44       use radinc_h, only : L_TAUMAX,naerkind
    55       use aerosol_mod
    6        USE tracer_h, only: noms,rho_co2,rho_ice
    7        use comcstfi_mod, only: g, pi
     6       USE tracer_h, only: noms,rho_co2,rho_ice,rho_q,mmol
     7       use comcstfi_mod, only: g, pi, mugaz, avocado
    88       use geometry_mod, only: latitude
    99       use callkeys_mod, only: aerofixco2,aerofixh2o,kastprof,cloudlvl, &
     
    1313                tau_nh3_cloud, pres_nh3_cloud,                          &
    1414                nlayaero, aeronlay_tauref, aeronlay_choice,             &
    15                 aeronlay_pbot, aeronlay_ptop, aeronlay_sclhght
    16                  
     15                aeronlay_pbot, aeronlay_ptop, aeronlay_sclhght,         &
     16                aerogeneric
     17        use generic_tracer_index_mod, only: generic_tracer_index
    1718       implicit none
    1819
     
    3031!     dust removal, simplification by Robin Wordsworth (2009)
    3132!     Generic n-layer aerosol - J. Vatant d'Ollone (2020)
     33!     Radiative Generic Condensable aerosols - Lucas Teinturier (2022)
    3234!
    3335!     Input
     
    9092
    9193      real CLFtot
    92 
     94      integer igen_ice,igen_vap ! to store the index of generic tracer
     95      logical dummy_bool ! dummy boolean just in case we need one
    9396      ! identify tracers
    9497      IF (firstcall) THEN
     
    141144          print*,'iaero_aurora= ',iaero_aurora
    142145        endif
    143 
     146        if (iaero_generic(1) .ne. 0) then
     147          print*,"iaero_generic= ",iaero_generic(:)
     148        endif
    144149        firstcall=.false.
    145150      ENDIF ! of IF (firstcall)
     
    362367            ENDDO
    363368         ENDDO
    364 
     369         
    365370! 1/700. is assuming a "sulfurtau" of 1
    366371! Sulfur aerosol routine to be improved.
     
    645650
    646651      end if ! if Auroral aerosols 
    647 
     652!===========================================================================
     653!    Radiative Generic Condensable aerosols scheme
     654!    Only used when we give aerogeneric != 0 in callphys.def
     655!    Computes the generic aerosols' opacity in the same fashion as water of
     656!    dust, using the QREFvis3d of the concerned specie
     657!    Lucas Teinturier (2022)
     658!===========================================================================
     659      if (iaero_generic(1) .ne. 0) then ! we enter the scheme
     660        do ia=1,aerogeneric
     661          iaer = iaero_generic(ia)
     662          ! Initialization
     663          aerosol(1:ngrid,1:nlayer,iaer) = 0.D0
     664          igen_ice = -1
     665          igen_vap = -1
     666          ! Get index of the ice tracer (for pq, mol, rho_q)
     667          call generic_tracer_index(nq,2*iaer,igen_vap,igen_ice,dummy_bool)
     668          if (igen_ice .eq. -1) then
     669            !if igen_ice not changed by generic_tracer_index, it means it's an ice tracer => igen_ice=2*iaer
     670            igen_ice = 2*iaer
     671          endif
     672          ! Let's loop on the horizontal and vertical grid
     673          do ig=1,ngrid
     674            do l=1,nlayer
     675              aerosol(ig,l,iaer) = ( 0.75*QREFvis3d(ig,l,iaer)  / &
     676                                  (rho_q(igen_ice) * reffrad(ig,l,iaer)) ) * &
     677                                  (pq(ig,l,igen_ice)+1E-9 ) *                &
     678                                  (pplev(ig,l) - pplev(ig,l+1)) /g
     679            enddo !l=1,nlayer
     680          enddo !ig=1,ngrid
     681        enddo !ia=1,aerogeneric
     682      endif !iaergo_generic(1) .ne. 0
    648683
    649684! --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.