1 | SUBROUTINE callsedim(ngrid,nlay, ptimestep, |
---|
2 | $ pplev,zlev, pt, |
---|
3 | & pq, pdqfi, pdqsed,pdqs_sed,nq,rfall) |
---|
4 | IMPLICIT NONE |
---|
5 | |
---|
6 | !================================================================== |
---|
7 | ! |
---|
8 | ! Purpose |
---|
9 | ! ------- |
---|
10 | ! Calculates sedimentation of aerosols depending on their |
---|
11 | ! density and radius. |
---|
12 | ! |
---|
13 | ! Authors |
---|
14 | ! ------- |
---|
15 | ! F. Forget (1999) |
---|
16 | ! Tracer generalisation by E. Millour (2009) |
---|
17 | ! |
---|
18 | !================================================================== |
---|
19 | |
---|
20 | c----------------------------------------------------------------------- |
---|
21 | c declarations: |
---|
22 | c ------------- |
---|
23 | |
---|
24 | #include "dimensions.h" |
---|
25 | #include "dimphys.h" |
---|
26 | #include "comcstfi.h" |
---|
27 | #include "tracer.h" |
---|
28 | #include "callkeys.h" |
---|
29 | |
---|
30 | #include "fisice.h" |
---|
31 | |
---|
32 | c arguments: |
---|
33 | c ---------- |
---|
34 | |
---|
35 | INTEGER ngrid ! number of horizontal grid points |
---|
36 | INTEGER nlay ! number of atmospheric layers |
---|
37 | REAL ptimestep ! physics time step (s) |
---|
38 | REAL pplev(ngrid,nlay+1) ! pressure at inter-layers (Pa) |
---|
39 | REAL pt(ngrid,nlay) ! temperature at mid-layer (K) |
---|
40 | REAL zlev(ngrid,nlay+1) ! altitude at layer boundaries |
---|
41 | |
---|
42 | |
---|
43 | c Traceurs : |
---|
44 | integer nq ! number of tracers |
---|
45 | real pq(ngrid,nlay,nq) ! tracers (kg/kg) |
---|
46 | real pdqfi(ngrid,nlay,nq) ! tendency before sedimentation (kg/kg.s-1) |
---|
47 | real pdqsed(ngrid,nlay,nq) ! tendency due to sedimentation (kg/kg.s-1) |
---|
48 | real pdqs_sed(ngrid,nq) ! flux at surface (kg.m-2.s-1) |
---|
49 | |
---|
50 | c local: |
---|
51 | c ------ |
---|
52 | |
---|
53 | INTEGER l,ig, iq |
---|
54 | |
---|
55 | real zqi(ngridmx,nlayermx,nqmx) ! to locally store tracers |
---|
56 | real masse (ngridmx,nlayermx) ! Layer mass (kg.m-2) |
---|
57 | real epaisseur (ngridmx,nlayermx) ! Layer thickness (m) |
---|
58 | real wq(ngridmx,nlayermx+1) ! displaced tracer mass (kg.m-2) |
---|
59 | c real dens(ngridmx,nlayermx) ! Mean density of the ice part. accounting for dust core |
---|
60 | real rfall(ngridmx,nlayermx) |
---|
61 | |
---|
62 | |
---|
63 | LOGICAL firstcall |
---|
64 | SAVE firstcall |
---|
65 | DATA firstcall/.true./ |
---|
66 | |
---|
67 | c ** un petit test de coherence |
---|
68 | c -------------------------- |
---|
69 | |
---|
70 | IF (firstcall) THEN |
---|
71 | IF(ngrid.NE.ngridmx) THEN |
---|
72 | PRINT*,'STOP dans callsedim' |
---|
73 | PRINT*,'probleme de dimensions :' |
---|
74 | PRINT*,'ngrid =',ngrid |
---|
75 | PRINT*,'ngridmx =',ngridmx |
---|
76 | STOP |
---|
77 | ENDIF |
---|
78 | |
---|
79 | firstcall=.false. |
---|
80 | ENDIF ! of IF (firstcall) |
---|
81 | |
---|
82 | !======================================================================= |
---|
83 | ! Preliminary calculation of the layer characteristics |
---|
84 | ! (mass (kg.m-2), thickness (m), etc. |
---|
85 | |
---|
86 | do l=1,nlay |
---|
87 | do ig=1, ngrid |
---|
88 | masse(ig,l)=(pplev(ig,l) - pplev(ig,l+1)) /g |
---|
89 | epaisseur(ig,l)= zlev(ig,l+1) - zlev(ig,l) |
---|
90 | end do |
---|
91 | end do |
---|
92 | |
---|
93 | !====================================================================== |
---|
94 | ! Calculate the transport due to sedimentation for each tracer |
---|
95 | ! [This has been rearranged by L. Kerber to allow the sedimentation |
---|
96 | ! of general tracers.] |
---|
97 | |
---|
98 | zqi(1:ngrid,1:nlay,1:nqmx) = 0. |
---|
99 | do iq=1,nq |
---|
100 | if((radius(iq).gt.1.e-9).and.(iq.ne.igcm_co2_ice)) then |
---|
101 | ! (no sedim for gases; co2_ice sedim is done elsewhere) |
---|
102 | |
---|
103 | ! store locally updated tracers |
---|
104 | |
---|
105 | do l=1,nlay |
---|
106 | do ig=1,ngrid |
---|
107 | zqi(ig,l,iq)=pq(ig,l,iq)+pdqfi(ig,l,iq)*ptimestep |
---|
108 | enddo |
---|
109 | enddo ! of do l=1,nlay |
---|
110 | |
---|
111 | !====================================================================== |
---|
112 | ! Sedimentation |
---|
113 | !====================================================================== |
---|
114 | ! Water |
---|
115 | if (water.and.(iq.eq.igcm_h2o_ice)) then |
---|
116 | call newsedim(ngrid,nlay,ngrid*nlay,ptimestep, |
---|
117 | & pplev,masse,epaisseur,pt,rfall,rho_q(iq),zqi,wq) |
---|
118 | |
---|
119 | ! General Case |
---|
120 | else |
---|
121 | call newsedim(ngrid,nlay,1,ptimestep, |
---|
122 | & pplev,masse,epaisseur,pt,radius(iq),rho_q(iq), |
---|
123 | & zqi,wq) |
---|
124 | endif |
---|
125 | |
---|
126 | !======================================================================= |
---|
127 | ! Calculate the tendencies |
---|
128 | !====================================================================== |
---|
129 | |
---|
130 | do ig=1,ngrid |
---|
131 | ! Ehouarn: with new way of tracking tracers by name, this is simply |
---|
132 | pdqs_sed(ig,iq) = wq(ig,1)/ptimestep |
---|
133 | end do |
---|
134 | |
---|
135 | DO l = 1, nlay |
---|
136 | DO ig=1,ngrid |
---|
137 | pdqsed(ig,l,iq)=(zqi(ig,l,iq)- |
---|
138 | & (pq(ig,l,iq) + pdqfi(ig,l,iq)*ptimestep))/ptimestep |
---|
139 | ENDDO |
---|
140 | ENDDO |
---|
141 | endif ! of no gases no co2_ice |
---|
142 | enddo ! of do iq=1,nq |
---|
143 | return |
---|
144 | end |
---|