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) ! 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 | iq=igcm_h2o_ice |
---|
94 | |
---|
95 | ! The value of q is updated after the other parameterisations |
---|
96 | |
---|
97 | do l=1,nlay |
---|
98 | do ig=1,ngrid |
---|
99 | ! store locally updated tracers |
---|
100 | zqi(ig,l)=pq(ig,l,iq)+pdqfi(ig,l,iq)*ptimestep |
---|
101 | enddo |
---|
102 | enddo ! of do l=1,nlay |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | !======================================================================= |
---|
107 | ! Calculate the transport due to sedimentation for each tracer |
---|
108 | |
---|
109 | call newsedim(ngrid,nlay,ngrid*nlay,ptimestep, |
---|
110 | & pplev,masse,epaisseur,pt,rfall,rho_q(iq),zqi,wq) |
---|
111 | |
---|
112 | !======================================================================= |
---|
113 | ! Calculate the tendencies |
---|
114 | |
---|
115 | do ig=1,ngrid |
---|
116 | ! Ehouarn: with new way of tracking tracers by name, this is simply |
---|
117 | pdqs_sed(ig,iq)=wq(ig,1)/ptimestep |
---|
118 | end do |
---|
119 | |
---|
120 | DO l = 1, nlay |
---|
121 | DO ig=1,ngrid |
---|
122 | pdqsed(ig,l,iq)=(zqi(ig,l)- |
---|
123 | $ (pq(ig,l,iq) + pdqfi(ig,l,iq)*ptimestep))/ptimestep |
---|
124 | ENDDO |
---|
125 | ENDDO |
---|
126 | |
---|
127 | return |
---|
128 | end |
---|
129 | |
---|