source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/INCA/src/INCA_SRC/wetdepst.F90 @ 6610

Last change on this file since 6610 was 6610, checked in by acosce, 10 months ago

INCA used for ICOLMDZORINCA_CO2_Transport_GMD_2023

File size: 7.5 KB
Line 
1!$Id: wetdep.F90 10 2007-08-09 12:43:01Z acosce $
2!! =========================================================================
3!! INCA - INteraction with Chemistry and Aerosols
4!!
5!! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE)
6!!           Unite mixte CEA-CNRS-UVSQ
7!!
8!! Contributors to this INCA subroutine:
9!!
10!! Michael Schulz, LSCE, Michael.Schulz@cea.fr
11!! Yves Balkanski, LSCE, Yves.Balkanski@cea.fr
12!!
13!! Anne Cozic, LSCE, anne.cozic@cea.fr
14!! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr
15!!
16!! This software is a computer program whose purpose is to simulate the
17!! atmospheric gas phase and aerosol composition. The model is designed to be
18!! used within a transport model or a general circulation model. This version
19!! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts
20!! for emissions, transport (resolved and sub-grid scale), photochemical
21!! transformations, and scavenging (dry deposition and washout) of chemical
22!! species and aerosols interactively in the GCM. Several versions of the INCA
23!! model are currently used depending on the envisaged applications with the
24!! chemistry-climate model.
25!!
26!! This software is governed by the CeCILL  license under French law and
27!! abiding by the rules of distribution of free software.  You can  use,
28!! modify and/ or redistribute the software under the terms of the CeCILL
29!! license as circulated by CEA, CNRS and INRIA at the following URL
30!! "http://www.cecill.info".
31!!
32!! As a counterpart to the access to the source code and  rights to copy,
33!! modify and redistribute granted by the license, users are provided only
34!! with a limited warranty  and the software's author,  the holder of the
35!! economic rights,  and the successive licensors  have only  limited
36!! liability.
37!!
38!! In this respect, the user's attention is drawn to the risks associated
39!! with loading,  using,  modifying and/or developing or reproducing the
40!! software by the user in light of its specific status of free software,
41!! that may mean  that it is complicated to manipulate,  and  that  also
42!! therefore means  that it is reserved for developers  and  experienced
43!! professionals having in-depth computer knowledge. Users are therefore
44!! encouraged to load and test the software's suitability as regards their
45!! requirements in conditions enabling the security of their systems and/or
46!! data to be ensured and,  more generally, to use and operate it in the
47!! same conditions as regards security.
48!!
49!! The fact that you are presently reading this means that you have had
50!! knowledge of the CeCILL license and that you accept its terms.
51!! =========================================================================
52
53#include <inca_define.h>
54
55#ifdef AER
56
57SUBROUTINE wetdepst(&
58   delt,       &
59   tr_seri,    &
60   area,       &
61   pdel,       &
62   flxrst,     &
63   flxsst,     &
64   zma)
65
66
67  USE CHEM_CONS, ONLY : gravit, uma
68  !MS  for budgetting purposes introduced
69  USE SFLX, ONLY : wflux,wsflux,wcflux
70  USE AEROSOL_METEO
71  USE AEROSOL_MOD
72  USE AEROSOL_DIAG
73  USE AIRPLANE_SRC
74  USE INCA_DIM
75
76  IMPLICIT NONE
77
78  REAL, INTENT(in) ::     delt                !timestep in seconds
79  REAL, INTENT(inout) ::  tr_seri(PLON,PLEV,PCNST)
80  REAL, INTENT(in) ::     area(PLON)          !area of gridbox in m2
81  REAL, INTENT(in) ::     pdel(PLON,PLEV)        ! delta press across midpoints
82  REAL, INTENT(in) ::     flxrst(PLON,PLEV+1) !liquid water flux (stratiform)  kgH2O/m2/s
83  REAL, INTENT(in) ::     flxsst(PLON,PLEV+1) !solid  water flux (stratiform)  kgH2O/m2/s
84  REAL, INTENT(in) ::     zma(PLON,PLEV)      !abs geopot height at midpoi
85
86  REAL, PARAMETER  ::     drym = 28.966
87  REAL, PARAMETER  ::     RG = 9.80665
88  REAL, PARAMETER  ::     xlvalst = 0.5e-3
89  REAL, PARAMETER  ::     bminusst = 1.e-4
90  REAL, PARAMETER  ::     alpha = 5.e-4
91
92
93  INTEGER :: npr,ns, i, k, ktrop
94  INTEGER :: m1x, nx, mnx, mode,JT
95  REAL, DIMENSION(PLON,PLEV) :: pdiffst, pdownst
96  REAL, DIMENSION(PLON,PLEV) :: pkgm3st, beta2st, fractst, decayst
97  REAL, DIMENSION(PLON,PLEV) :: zrho
98
99  REAL, DIMENSION(PLON,PLEV,PCNST) :: rrate
100  REAL, DIMENSION(PLON,PLEV) :: massupd     ! MASS of air displaced vertically in updraft
101  REAL, DIMENSION(PLON,PLEV) :: totmass     ! total mass in a grid box per unit area [kg/m^2]
102  REAL, DIMENSION(PLON,PLEV) :: zmid        ! midpoint geopotential in km
103  REAL, DIMENSION(PLON)      :: delzcld     ! Height in km of the convective column   
104
105  !MS  for budgetting purposes introduced
106  REAL ::  tr_seri0(PLON,PLEV,PCNST)
107  REAL ::  dz
108
109  wflux=0.
110  wsflux=0.
111  tr_seri0=tr_seri
112  totmass = pdel / gravit
113
114  ! Anne 01/04/2005 initialisations
115  fractst(:,:) = 0.
116  decayst(:,:) = 0.
117
118  !MS  for budgetting purposes introduced
119  !  we teat ONLY Synoptic precipitation with the scheme of Giorgi and Chameides
120  !
121
122  zmid(:,:) = 1.e-3 * zma(:PLON,:) / gravit
123
124  DO K=PLEV,1,-1
125    pdownst(:,K)=flxrst(:,K)+ flxsst(:,K)
126    pdiffst(:,K) = (flxrst(:,K)+flxsst(:,K)) - &
127       (flxrst(:,K+1)+flxsst(:,K+1) )
128  END DO                    ! loop over layers
129 
130
131  DO i = 1, PLON
132    ktrop = MAX(1,itrop(i))        ! 2D field of tropopause level indices
133    pdownst(i,ktrop:PLEV) = 0.
134    pdiffst(i,ktrop:PLEV) = 0.
135  END DO
136
137  !
138  ! pkgm3st is the quantity of precipitable water formed in the layer (Units: kg/m3/s)
139  ! st for stratiform
140  !
141  pkgm3st=pdiffst/zheight     ! conversion from kg/m2/s to kg/m3/s
142
143  !MS fractst computation creates floating error during execution of job
144  !MS pkg is thus taken to a miniumum value, if above zero
145
146  WHERE(pkgm3st .GT. 0.) pkgm3st=MAX(pkgm3st,1.e-10)
147
148  !
149  ! fractst is the fraction of the grid box in which precipitation occurs based upon
150  ! Giorgi and Chameides and Balkanski 1992
151  !     
152  WHERE (pkgm3st >0.)
153      fractst=pkgm3st/(pkgm3st+xlvalst*bminusst) ! Fraction that experiences precip.
154  END WHERE
155
156  ! Next lines compute the conversion of cloud water into rainwater for stratiform precipitation
157  !
158  WHERE (pdiffst > 0. .AND. pdownst>0. .AND. fractst > 0.)
159      !
160      !  bminusst is the minimum value for beta2st, rate of conversion of cloud water to precipitation
161      !
162      beta2st=bminusst+(pkgm3st*delt)/(xlvalst*fractst*delt) 
163      decayst = 1. - EXP(-beta2st * delt)
164
165      !  we set beta negative for washout
166  ELSEWHERE(pdiffst < 0. .AND. pdownst>0. .AND. fractst >0.)
167      beta2st= - pdownst/(fractst*delt) * delt
168  ELSEWHERE (pdiffst < 0. .AND. pdownst <0.)
169      fractst = -1.
170  END WHERE
171
172  DO 20 mode = 1,nmodes
173    IF (mass1index(mode) .EQ. 0) CYCLE
174    m1x=mass1index(mode)
175    nx=numberindex(mode)
176   
177    DO 22 JT=m1x,nx
178      WHERE (fractst*decayst  < 1.) 
179          rrate(:,:,JT) = fractst * decayst 
180      ELSEWHERE 
181          rrate(:,:,JT) = 0.
182      END WHERE
183     
184      !yjb Now let's treat stratiform deposition
185      !yjb
186      WHERE(rrate(:,:,jt) .GT. 0. .AND. rrate(:,:,jt).LT.0.95 ) 
187          WHERE (pdiffst > 0. .AND. pdownst > 0.)
188              !yjb We make sure not to scavenge more than is in the grid box!!!
189              !new var called incldfac for interstitial vs. in liquid water.
190             
191              tr_seri(:,:,JT) = tr_seri(:,:,JT) * (1 -incldfac(JT)*rrate(:,:,JT))
192              scavcoef_st(:,:,JT) = incldfac(JT)*rrate(:,:,JT)
193          END WHERE
194      END WHERE
195     
196
19722  CONTINUE                ! END loop over tracers in mode
19820  CONTINUE                  ! loop over modes
199
200  ! diagnostic of total wet stratiform flux MS JUNE 2002
201  ! -> kg m-2 s-1
202  DO K=1,PLON
203    DO JT=trmx,trnx
204      wsflux(k,JT)=SUM( (tr_seri0(k,:,JT)-tr_seri(k,:,JT))*zdp1(k,:) ) 
205    ENDDO
206  ENDDO
207  wflux=wsflux
208 
209 
210END SUBROUTINE wetdepst
211       
212#endif
Note: See TracBrowser for help on using the repository browser.