source: trunk/LMDZ.GENERIC/libf/phystd/iniaerosol.F @ 2613

Last change on this file since 2613 was 2297, checked in by jvatant, 5 years ago

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 size: 2.5 KB
Line 
1      SUBROUTINE iniaerosol()
2
3
4      use radinc_h, only: naerkind
5      use aerosol_mod
6      use callkeys_mod, only: aeroco2,aeroh2o,dusttau,aeroh2so4,
7     &          aeroback2lay,aeronh3, nlayaero, aeronlay, aeroaurora
8
9      IMPLICIT NONE
10c=======================================================================
11c   subject:
12c   --------
13c   Initialization related to aerosols
14c   (CO2 aerosols, dust, water, chemical species, ice...)   
15c
16c   author: Laura Kerber, S. Guerlet
17c   ------
18c       
19c=======================================================================
20
21      integer i, ia
22
23      ! Special case, dyn. allocation for n-layer depending on callphys.def
24      IF(.NOT.ALLOCATED(iaero_nlay)) ALLOCATE(iaero_nlay(nlayaero))
25      iaero_nlay(:) = 0
26
27      ia=0
28      if (aeroco2) then
29         ia=ia+1
30         iaero_co2=ia
31      endif
32      write(*,*) '--- CO2 aerosol = ', iaero_co2
33 
34      if (aeroh2o) then
35         ia=ia+1
36         iaero_h2o=ia
37      endif
38      write(*,*) '--- H2O aerosol = ', iaero_h2o
39
40      if (dusttau.gt.0) then
41         ia=ia+1
42         iaero_dust=ia
43      endif
44      write(*,*) '--- Dust aerosol = ', iaero_dust
45
46      if (aeroh2so4) then
47         ia=ia+1
48         iaero_h2so4=ia
49      endif
50      write(*,*) '--- H2SO4 aerosol = ', iaero_h2so4
51     
52      if (aeroback2lay) then
53         ia=ia+1
54         iaero_back2lay=ia
55      endif
56      write(*,*) '--- Two-layer aerosol = ', iaero_back2lay
57
58      if (aeronh3) then
59         ia=ia+1
60         iaero_nh3=ia
61      endif
62      write(*,*) '--- NH3 Cloud = ', iaero_nh3
63
64      if (aeronlay) then
65         do i=1,nlayaero
66           ia=ia+1
67           iaero_nlay(i)=ia
68         enddo
69      endif
70      write(*,*) '--- N-layer aerosol = ', iaero_nlay
71
72      if (aeroaurora) then
73         ia=ia+1
74         iaero_aurora=ia
75      endif
76      write(*,*) '--- Auroral aerosols = ', iaero_aurora
77
78      write(*,*) '=== Number of aerosols= ', ia
79     
80! For the zero aerosol case, we currently make a dummy co2 aerosol which is zero everywhere.
81! (See aeropacity.F90 for how this works). A better solution would be to turn off the
82! aerosol machinery in the no aerosol case, but this would be complicated. LK
83
84      if (ia.eq.0) then  !For the zero aerosol case.
85         ia = 1
86         noaero = .true.
87         iaero_co2=ia
88      endif
89
90      if (ia.ne.naerkind) then
91          print*, 'Aerosols counted not equal to naerkind'
92          print*, 'Compile with tag -s',ia,'to run'
93          print*, 'or change options in callphys.def'
94          print*, 'Abort in iniaerosol.F'
95          call abort
96      endif
97
98      end
Note: See TracBrowser for help on using the repository browser.