source: trunk/LMDZ.MARS/libf/phymars/updatereffrad.F @ 414

Last change on this file since 414 was 358, checked in by aslmd, 13 years ago

LMDZ.MARS:


A FIRST VERSION WITH SCAVENGING
TRANSPARENT TO CASUAL USER
FOR WATER CYCLE FOLKS, SEE BELOW


[TN and AS solved conflicts due to r330 >> r357]


07/11/11 == JBM

Changed watercloud.F to call two separate routines,

simpleclouds.F or improvedclouds.F, which are a simplified and
full microphysical scheme for cloud formation, respectively.
Removed the tag called "improved" in watercloud.F, and added
another tag called "microphys" which is defined in callphys.F
instead. Changed routines: callkeys, inifis, physiq, watercloud.

Reimplemented the use of typical profiles of dust particle sizes

and CCNs in simpleclouds.F. Corrected the previously used
analytical CCN profile. Moved ccn_factor to simpleclouds.F,
which won't be used in the new microphysical scheme. Changed
routines: aeropacity, physiq, simpleclouds, watercloud.

Computed rdust at the end of callsedim instead of updatereffrad,

except at firstcall. Renamed rfall into rsedcloud and moved it
in simpleclouds. Moved nuice_sed to initracer.F and added it to
tracer.h. Changed routines: callsedim, physiq, tracer.h,
watercloud, initracer, simpleclouds, updatereffrad.

Added two tracers for the CCNs. Added the different tests in

initracer.F to make sure that, for example, microphys is not
used without doubleq, etc. Corrected an inconsistency in
callsedim.F, and changed the way r0 is updated. Changes
routines: callsedim, inifis, initracer, physiq, testphys1d,
tracer.h.

Added the ability to have a spatially variable density in

newsedim (same method as that used for the radius of
sedimentation). Required the addition of one input to newsedim,
which is the size of the density variable "rho". Changed
routines: callsedim, newsedim.

Added an output to aeropacity called "tauscaling", which is a

factor to convert dust_mass and dust_number to true quantities,
based on tauvis. Removed ccn and qdust from aeropacity, which
are obsolete now.

Wrote improvedcloud.F which includes all the microphysical

scheme, and connected it to the sedimentation scheme. Added and
changed routines: callsedim, physiq, growthrate, nuclea,
improvedclouds, initracer, watercloud, microphys.h.

07/11/11 == TN

Added CCN & dust tracers updates in physiq.F

Corrected a bug that can give negative CCN numbers, due to the
use of single precision values (only 6 decimals) whereas up to 10E+10
CCN can be formed or disappears...

Corrected physical bug that causes h2o_vap or h2o_ice

to be negative in improvedclouds.F.

Corrected physical bug that causes CCN & dust tracers

to be negative in improvedclouds.F when all ice sublimates and
releases dust

Added parameter contact mteta in callphys.def

Default value is still 0.95, see inifis.F

Changed tendancy computation for dust_number in improvedclouds.F

that was not the right one. Indeed, the scavenged dust_number tracer
is computed from the dust_mass one, and its tendancy before scavenging
must be taken into account to compute its scavenging's tendancy.

File size: 6.2 KB
Line 
1      SUBROUTINE updatereffrad(ngrid,nlayer,
2     &                rdust,rice,nuice,
3     &                reffrad,nueffrad,
4     &                pq)
5
6       IMPLICIT NONE
7c=======================================================================
8c   subject:
9c   --------
10c   Subroutine designed to update the aerosol size distribution used by
11c     the radiative transfer scheme. This size distribution is assumed
12c     to be a log-normal distribution, with effective radius "reffrad" and
13c     variance "nueffrad".
14c   At firstcall, "rice" and "nuice" are not known, because
15c     the H2O ice microphysical scheme is called after the radiative
16c     transfer in physiq.F. That's why we assess the size of the
17c     water-ice particles at firstcall (see part 1.2 below).
18c
19c   author:   
20c   ------
21c   J.-B. Madeleine (2009-2010)
22c
23c=======================================================================
24c
25c    Declarations :
26c    -------------
27c
28#include "dimensions.h"
29#include "dimphys.h"
30#include "comcstfi.h"
31#include "callkeys.h"
32#include "dimradmars.h"
33#include "tracer.h"
34#include "aerkind.h"
35#include "yomaer.h"
36
37c-----------------------------------------------------------------------
38c     Inputs:
39c     ------
40
41      INTEGER ngrid,nlayer
42c     Ice geometric mean radius (m)
43      REAL :: rice(ngridmx,nlayermx)
44c     Estimated effective variance of the size distribution (n.u.)
45      REAL :: nuice(ngridmx,nlayermx)
46c     Tracer mass mixing ratio (kg/kg)
47      REAL pq(ngrid,nlayer,nqmx)
48      real rdust(ngridmx,nlayermx) ! Dust geometric mean radius (m)
49
50c     Outputs:
51c     -------
52
53c     Aerosol effective radius used for radiative transfer (meter)
54      REAL :: reffrad(ngridmx,nlayermx,naerkind)
55c     Aerosol effective variance used for radiative transfer (n.u.)
56      REAL :: nueffrad(ngridmx,nlayermx,naerkind)
57
58c     Local variables:
59c     ---------------
60
61      INTEGER :: ig,l          ! 3D grid indices
62      INTEGER :: iaer          ! Aerosol index
63
64c     Number of cloud condensation nuclei near the surface
65c     (only used at firstcall). This value is taken from
66c     Montmessin et al. 2004 JGR 109 E10004 p5 (2E6 part m-3), and
67c     converted to part kg-1 using a typical atmospheric density.
68
69      REAL, PARAMETER :: ccn0 = 1.3E8
70
71      LOGICAL firstcall
72      DATA firstcall/.true./
73      SAVE firstcall
74
75      REAL CBRT
76      EXTERNAL CBRT
77
78      real nueffdust(ngridmx,nlayermx) ! Dust effective variance
79
80c     Local saved variables:
81c     ---------------------
82
83c==================================================================
84
85      IF (firstcall) THEN
86c       At firstcall, rdust and rice are not known; therefore
87c         they need to be computed below.
88
89c       1.1 Dust particles
90c       ------------------
91        IF (doubleq.AND.active) THEN
92          DO l=1,nlayer
93            DO ig=1, ngrid
94              rdust(ig,l) =
95     &          CBRT(r3n_q*pq(ig,l,igcm_dust_mass)/
96     &          max(pq(ig,l,igcm_dust_number),0.01))
97              rdust(ig,l)=min(max(rdust(ig,l),1.e-10),500.e-6)
98              nueffdust(ig,l) = exp(varian**2.)-1.
99             ENDDO
100           ENDDO
101        ELSE
102          DO l=1,nlayer
103            DO ig=1, ngrid
104              rdust(ig,l) = 0.8E-6
105              nueffdust(ig,l) = 0.3
106            ENDDO
107          ENDDO
108        ENDIF
109c       1.2 Water-ice particles
110c       -----------------------
111        IF (water.AND.activice) THEN
112          DO l=1,nlayer
113            DO ig=1,ngrid
114              rice(ig,l) = max( CBRT(
115     &          (pq(ig,l,igcm_h2o_ice)/rho_ice +
116     &          ccn0*(4./3.)*pi*rdust(ig,l)**3.) /
117     &          (ccn0*4./3.*pi)),rdust(ig,l) )
118              nuice(ig,l) = nuice_ref
119            ENDDO
120          ENDDO
121        ENDIF ! of if (water.AND.activice)
122        firstcall = .false.
123      ENDIF ! of if firstcall
124
125c==================================================================
126c 2. Radius used in the radiative transfer code (reffrad)
127c==================================================================
128
129      DO iaer = 1, naerkind ! Loop on aerosol kind
130        aerkind: SELECT CASE (name_iaer(iaer))
131c==================================================================
132        CASE("dust_conrath") aerkind         ! Typical dust profile
133c==================================================================
134          DO l=1,nlayer
135            DO ig=1,ngrid
136              reffrad(ig,l,iaer) = rdust(ig,l) *
137     &          (1.e0 + nueffdust(ig,l))**2.5
138              nueffrad(ig,l,iaer) = nueffdust(ig,l)
139            ENDDO
140          ENDDO
141c==================================================================
142        CASE("dust_doubleq") aerkind! Two-moment scheme for dust
143c==================================================================
144          DO l=1,nlayer
145            DO ig=1,ngrid
146              reffrad(ig,l,iaer) = rdust(ig,l) * ref_r0
147              nueffrad(ig,l,iaer) = nueffdust(ig,l)
148            ENDDO
149          ENDDO
150c==================================================================
151        CASE("dust_submicron") aerkind   ! Small dust population
152c==================================================================
153          DO l=1,nlayer
154            DO ig=1,ngrid
155              reffrad(ig,l,iaer)=radius(igcm_dust_submicron)
156              nueffrad(ig,l,iaer)=0.03
157            ENDDO
158          ENDDO     
159c==================================================================
160        CASE("h2o_ice") aerkind             ! Water ice crystals
161c==================================================================
162          DO l=1,nlayer
163            DO ig=1,ngrid
164c             About reffice, do not confuse the mass mean radius
165c             (rayon moyen massique) and the number median radius
166c             (or geometric mean radius, rayon moyen géométrique).
167c             rice is a mass mean radius, whereas rdust
168c             is a geometric mean radius:
169c             number median rad = mass mean rad x exp(-1.5 sigma0^2)
170c             (Montmessin et al. 2004 paragraph 30). Therefore:
171              reffrad(ig,l,iaer)=rice(ig,l)*(1.+nuice_ref)
172              nueffrad(ig,l,iaer)=nuice_ref
173            ENDDO
174          ENDDO
175c==================================================================
176        END SELECT aerkind
177      ENDDO ! iaer (loop on aerosol kind)
178
179      RETURN
180      END
Note: See TracBrowser for help on using the repository browser.