Ignore:
Timestamp:
Apr 26, 2020, 7:45:46 PM (5 years ago)
Author:
jvatant
Message:

Add a generic n-layer aerosol scheme to replace the former buggy 2-layer scheme as well as the hard-coded NH3 cloud.

It can be called using 'aeronlay=.true.' in callphys.def, and set the number of layers (up to 4) with 'nlayaero'.
Then, the following parameters are read as arrays of size nlayaero in callphys.def (separated by blank space)


*aeronlay_tauref (Optical depth of aerosol layer at ref wavelenght)
*aeronlay_lamref (Ref wavelenght (m))
*aeronlay_choice (Choice for vertical profile - 1:tau follows atm scale height btwn top and bottom - 2:tau follows it own scale height)
*aeronlay_pbot (Bottom pressure (Pa))
*aeronlay_ptop (Top pressure (Pa) - useful only if choice=1)
*aeronlay_sclhght (Ratio of aerosol layer scale height / atmospheric scale height - useful only if choice=2 )
*aeronlay_size (Particle size (m))
*optprop_aeronlay_vis File for VIS opt properties.
*optprop_aeronlay_ir File for IR opt properties.

+Extra info :

+ In addition of solving the bug from 2-layer it enables different optical properties.
+ The former scheme are left for retrocompatibility (for now) but you should use the new one.
+ See aeropacity.F90 for the calculations

+ Each layer can have different optical properties, size of particle ...
+ You have different choices for vertical profile of the aerosol layers :

  • aeronlay_choice = 1 : Layer tau is spread between ptop and pbot following atm scale height.
  • aeronlay_choice = 2 : Layer tau follows its own scale height above cloud deck (pbot).

In this case ptop is dummy and sclhght gives the ratio H_cl/H_atm.

+ The reference wavelenght for input optical depth is now read as input (aeronlay_lamref)
+ Following the last point some comment is added in suaer_corrk about the 'not-really-dummy'ness of IR lamref..

File:
1 edited

Legend:

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

    r2283 r2297  
    554554     call getin_p("aeroh2so4",aeroh2so4)
    555555     write(*,*)" aeroh2so4 = ",aeroh2so4
    556          
     556 
     557     write(*,*)"Radiatively active auroral aerosols?"
     558     aeroaurora=.false.     ! default value
     559     call getin_p("aeroaurora",aeroaurora)
     560     write(*,*)" aeroaurora = ",aeroaurora
     561
    557562!=================================
     563! TWOLAY scheme and NH3 cloudare left for retrocompatibility only,
     564! You should now use N-LAYER scheme (see below).
    558565
    559566     write(*,*)"Radiatively active two-layer aerosols?"
     
    562569     write(*,*)" aeroback2lay = ",aeroback2lay
    563570
     571     if (aeroback2lay) then
     572       print*,'Warning : The TWOLAY AEROSOL scheme is deprecated and buggy...'
     573       print*,'You should use the generic n-layer scheme (see aeronlay).'
     574     endif
     575
    564576     write(*,*)"Radiatively active ammonia cloud?"
    565577     aeronh3=.false.     ! default value
     
    567579     write(*,*)" aeronh3 = ",aeronh3
    568580
    569      write(*,*)"Radiatively active auroral aerosols?"
    570      aeroaurora=.false.     ! default value
    571      call getin_p("aeroaurora",aeroaurora)
    572      write(*,*)" aeroaurora = ",aeroaurora
     581     if (aeronh3) then
     582       print*,'Warning : You are using specific NH3 cloud scheme ...'
     583       print*,'You should use the generic n-layer scheme (see aeronlay).'
     584     endif
    573585
    574586     write(*,*)"TWOLAY AEROSOL: total optical depth ", &
     
    613625       print*,'Error : TWOLAY AEROSOL, Please ensure that in callphys.def'
    614626       print*,'you have pres_top_tropo > pres_bottom_strato !'
    615        stop
     627       call abort
    616628     endif
    617629
     
    647659     call getin_p("size_nh3_cloud",size_nh3_cloud)
    648660     write(*,*)" size_nh3_cloud = ",size_nh3_cloud
     661
     662!=================================
     663! Generic N-LAYER aerosol scheme
     664
     665     write(*,*)"Radiatively active generic n-layer aerosols?"
     666     aeronlay=.false.     ! default value
     667     call getin_p("aeronlay",aeronlay)
     668     write(*,*)" aeronlay = ",aeronlay
     669
     670     write(*,*)"Number of generic aerosols layers?"
     671     nlayaero=1     ! default value
     672     call getin_p("nlayaero",nlayaero)
     673     ! Avoid to allocate arrays of size 0
     674     if (aeronlay .and. nlayaero.lt.1) then
     675       print*, " You are trying to set no generic aerosols..."
     676       print*, " Set aeronlay=.false. instead ! I abort."
     677       call abort
     678     endif
     679     if (.not. aeronlay) nlayaero=1
     680     write(*,*)" nlayaero = ",nlayaero
     681
     682     ! This is necessary, we just set the number of aerosol layers
     683     IF(.NOT.ALLOCATED(aeronlay_tauref))      ALLOCATE(aeronlay_tauref(nlayaero))     
     684     IF(.NOT.ALLOCATED(aeronlay_lamref))      ALLOCATE(aeronlay_lamref(nlayaero))     
     685     IF(.NOT.ALLOCATED(aeronlay_choice))      ALLOCATE(aeronlay_choice(nlayaero))     
     686     IF(.NOT.ALLOCATED(aeronlay_pbot))        ALLOCATE(aeronlay_pbot(nlayaero))     
     687     IF(.NOT.ALLOCATED(aeronlay_ptop))        ALLOCATE(aeronlay_ptop(nlayaero))     
     688     IF(.NOT.ALLOCATED(aeronlay_sclhght))     ALLOCATE(aeronlay_sclhght(nlayaero))     
     689     IF(.NOT.ALLOCATED(aeronlay_size))        ALLOCATE(aeronlay_size(nlayaero))     
     690     IF(.NOT.ALLOCATED(optprop_aeronlay_ir))  ALLOCATE(optprop_aeronlay_ir(nlayaero))     
     691     IF(.NOT.ALLOCATED(optprop_aeronlay_vis)) ALLOCATE(optprop_aeronlay_vis(nlayaero))     
     692
     693     write(*,*)"Generic n-layer aerosols: Optical depth at reference wavelenght"
     694     aeronlay_tauref=1.0E-1
     695     call getin_p("aeronlay_tauref",aeronlay_tauref)
     696     write(*,*)" aeronlay_tauref = ",aeronlay_tauref
     697
     698     write(*,*)"Generic n-layer aerosols: Reference wavelenght for optical depths (m)"
     699     aeronlay_lamref=0.6E-6
     700     call getin_p("aeronlay_lamref",aeronlay_lamref)
     701     write(*,*)" aeronlay_lamref = ",aeronlay_lamref
     702
     703     write(*,*)"Generic n-layer aerosols: Vertical profile choice : &
     704                     (1) Tau btwn ptop and pbot follows atm. scale height &
     705                 or  (2) Tau above pbot follows its own scale height"
     706     aeronlay_choice=1
     707     call getin_p("aeronlay_choice",aeronlay_choice)
     708     write(*,*)" aeronlay_choice = ",aeronlay_choice
     709
     710     write(*,*)"Generic n-layer aerosols: bottom pressures (Pa)"
     711     aeronlay_pbot=2000.0
     712     call getin_p("aeronlay_pbot",aeronlay_pbot)
     713     write(*,*)" aeronlay_pbot = ",aeronlay_pbot
     714
     715     write(*,*)"Generic n-layer aerosols: (if choice=1) Top pressures (Pa) "
     716     aeronlay_ptop=300000.0
     717     call getin_p("aeronlay_ptop",aeronlay_ptop)
     718     write(*,*)" aeronlay_ptop = ",aeronlay_ptop
     719
     720     write(*,*)"Generic n-layer aerosols: (if choice=2) Scale height / atm. scale height"
     721     aeronlay_ptop=0.2
     722     call getin_p("aeronlay_sclhght",aeronlay_sclhght)
     723     write(*,*)" aeronlay_sclhght = ",aeronlay_sclhght
     724
     725     write(*,*)"Generic n-layer aerosols: particles sizes (m)"
     726     aeronlay_size=1.e-6
     727     call getin_p("aeronlay_size",aeronlay_size)
     728     write(*,*)" aeronlay_size = ",aeronlay_size
     729
     730     write(*,*)"Generic n-layer aerosols: VIS optical properties file"
     731     optprop_aeronlay_vis = 'optprop_saturn_vis_n20.dat'
     732     call getin_p("optprop_aeronlay_vis",optprop_aeronlay_vis)
     733     write(*,*)" optprop_aeronlay_vis = ",optprop_aeronlay_vis
     734
     735     write(*,*)"Generic n-layer aerosols: IR optical properties file"
     736     optprop_aeronlay_ir = 'optprop_saturn_ir_n20.dat'
     737     call getin_p("optprop_aeronlay_ir",optprop_aeronlay_ir)
     738     write(*,*)" optprop_aeronlay_ir = ",optprop_aeronlay_ir
     739     
    649740
    650741!=================================
Note: See TracChangeset for help on using the changeset viewer.