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

Last change on this file since 1421 was 1397, checked in by milmd, 10 years ago

In LMDZ.GENERIC replacement of all phystd .h files by module files.

File size: 1.9 KB
RevLine 
[726]1      SUBROUTINE iniaerosol()
2
3
4      use radinc_h, only: naerkind
5      use aerosol_mod
[1397]6      use callkeys_mod, only: aeroco2,aeroh2o,dusttau,aeroh2so4,
7     &          aeroback2lay
[726]8
9      IMPLICIT NONE
10c=======================================================================
11c   subject:
12c   --------
13c   Initialization related to aerosols
14c   (CO2 aerosols, dust, water, chemical species, ice...)   
15c
[1026]16c   author: Laura Kerber, S. Guerlet
[726]17c   ------
18c       
19c=======================================================================
20
21      integer ia
22
23      ia=0
24      if (aeroco2) then
[741]25         ia=ia+1
26         iaero_co2=ia
[726]27      endif
[747]28      write(*,*) '--- CO2 aerosol = ', iaero_co2
[726]29 
30      if (aeroh2o) then
[741]31         ia=ia+1
32         iaero_h2o=ia
[726]33      endif
[747]34      write(*,*) '--- H2O aerosol = ', iaero_h2o
[726]35
36      if (dusttau.gt.0) then
[741]37         ia=ia+1
38         iaero_dust=ia
[726]39      endif
[747]40      write(*,*) '--- Dust aerosol = ', iaero_dust
[726]41
42      if (aeroh2so4) then
[741]43         ia=ia+1
44         iaero_h2so4=ia
[726]45      endif
[747]46      write(*,*) '--- H2SO4 aerosol = ', iaero_h2so4
[726]47     
[1026]48      if (aeroback2lay) then
49         ia=ia+1
50         iaero_back2lay=ia
51      endif
52      write(*,*) '--- Two-layer aerosol = ', iaero_back2lay
53
[747]54      write(*,*) '=== Number of aerosols= ', ia
[726]55     
[741]56! For the zero aerosol case, we currently make a dummy co2 aerosol which is zero everywhere.
57! (See aeropacity.F90 for how this works). A better solution would be to turn off the
58! aerosol machinery in the no aerosol case, but this would be complicated. LK
59
60      if (ia.eq.0) then  !For the zero aerosol case.
61         ia = 1
62         noaero = .true.
63         iaero_co2=ia
[726]64      endif
65
66      if (ia.ne.naerkind) then
67          print*, 'Aerosols counted not equal to naerkind'
68          print*, 'Compile with tag -s',ia,'to run'
69          print*, 'or change options in callphys.def'
70          print*, 'Abort in iniaerosol.F'
[741]71          call abort
[726]72      endif
73
74      end
Note: See TracBrowser for help on using the repository browser.