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

Last change on this file since 837 was 747, checked in by aslmd, 12 years ago

GENERIC: improved iniaerosol and aerosol_mod. solved bugs for ifort+parallel while keeping things OK in seq runs.

File size: 1.7 KB
RevLine 
[726]1      SUBROUTINE iniaerosol()
2
3
4      use radinc_h, only: naerkind
5      use aerosol_mod
6
7      IMPLICIT NONE
8c=======================================================================
9c   subject:
10c   --------
11c   Initialization related to aerosols
12c   (CO2 aerosols, dust, water, chemical species, ice...)   
13c
14c   author: Laura Kerber
15c   ------
16c       
17c=======================================================================
18
19
20#include "callkeys.h"
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     
[747]48      write(*,*) '=== Number of aerosols= ', ia
[726]49     
[741]50! For the zero aerosol case, we currently make a dummy co2 aerosol which is zero everywhere.
51! (See aeropacity.F90 for how this works). A better solution would be to turn off the
52! aerosol machinery in the no aerosol case, but this would be complicated. LK
53
54      if (ia.eq.0) then  !For the zero aerosol case.
55         ia = 1
56         noaero = .true.
57         iaero_co2=ia
[726]58      endif
59
60      if (ia.ne.naerkind) then
61          print*, 'Aerosols counted not equal to naerkind'
62          print*, 'Compile with tag -s',ia,'to run'
63          print*, 'or change options in callphys.def'
64          print*, 'Abort in iniaerosol.F'
[741]65          call abort
[726]66      endif
67
68      end
Note: See TracBrowser for help on using the repository browser.