source: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/phystd/iniaerosol.F @ 1057

Last change on this file since 1057 was 313, checked in by ymipsl, 10 years ago
  • implement splitting of XIOS file for lmdz physics
  • Termination is done properly in parallel by calling MPI_ABORT instead of abort or stop

YM

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