source: trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F @ 1717

Last change on this file since 1717 was 1528, checked in by emillour, 9 years ago

Mars GCM:

  • Got rid of references to "dimensions.h" from physics packages: use nbp_lon (=iim), nbp_lat (==jjp1) and nbp_lev from module mod_grid_phy_lmdz (in phy_common) instead.
  • Added "ioipsl_getin_p_mod.F90" (getin_p routine) in phy_common to correctly read in parameters from *.def files in a parallel environment.

EM

File size: 5.4 KB
RevLine 
[1246]1      subroutine surfacearea(ngrid, nlay, naerkind, ptimestep,
[463]2     $                       pplay, pzlay,
3     $                       pt, pq, pdq, nq, rdust, rice, tau,
4     $                       tauscaling,
[459]5     $                       surfdust, surfice)
6
[1036]7      use tracer_mod, only: nuice_sed, igcm_dust_number,
8     &                      igcm_ccn_number, varian, ccn_factor
[1047]9      use conc_mod, only: rnew
[1226]10      USE comcstfi_h
[459]11      implicit none
12
13!==========================================================================
14!     calculation of the ice and dust surface area (m2/m3)
15!     available for heterogeneous reactions
16!
17!     Franck Lefevre
[635]18!     version 1.2 april 2012
[459]19!==========================================================================
20
[1528]21      include "callkeys.h"
22      include "chimiedata.h"
[459]23
24! input
25
[1246]26      integer,intent(in) :: ngrid, nlay, naerkind
[463]27      integer,intent(in) :: nq               ! number of tracers
28      real,intent(in) :: ptimestep           ! physics time step (s)
29      real,intent(in) :: pplay(ngrid,nlay)   ! pressure at mid-layers (Pa)
30      real,intent(in) :: pzlay(ngrid,nlay)   ! altitude at mid-layers (m)
31      real,intent(in) :: pt(ngrid,nlay)      ! temperature at mid-layers (K)
32      real,intent(in) :: pq(ngrid,nlay,nq)   ! tracers (kg/kg)
33      real,intent(in) :: pdq(ngrid,nlay,nq)  ! physical tendency (kg/kg.s-1)
34      real,intent(in) :: rdust(ngrid,nlay)   ! dust geometric mean radius (m)
35      real,intent(in) :: rice(ngrid,nlay)    ! ice mass mean radius (m)
36      real,intent(in) :: tau(ngrid,naerkind) ! column dust optical depth at each point
37      real,intent(in) :: tauscaling(ngrid)   ! conversion factor for dust amount
[459]38
39! output
40
[463]41      real,intent(out) :: surfdust(ngrid,nlay) ! dust surface area (m2/m3)
42      real,intent(out) :: surfice(ngrid,nlay)  ! water-ice surface area (m2/m3)
[459]43
44! local
45
[635]46      integer    :: l, ig
47      real       :: rho                     ! density (kg/m3)
48      real       :: dustnd, icend           ! uodated dust and ice number densities (kg/kg)
49      real, save :: factor_ice, factor_dust ! multiplying factor to compute total surface area
50                                            ! from the mass-mean radius
51      real       :: sigma_ice, sigma_dust   ! variance of the ice and dust distributions
52      real       :: ccntyp                  ! typical dust number density (#/kg)
53                                            ! (microphys = false)
54      real       :: rdusttyp                ! typical dust radius (m)
55                                            ! (microphys = false)
[459]56
[635]57      logical, save :: firstcall = .true.
58
[459]59!==========================================================================
60
[635]61      if (firstcall) then ! compute the multiplying factors
62         sigma_dust  = varian
63         sigma_ice   = sqrt(log(nuice_sed + 1.))
64         factor_dust = exp(0.5*(log(sigma_dust))**2)
65         factor_ice  = exp(0.5*(log(sigma_ice))**2)
66         write(*,*) 'surfacearea : factor_dust = ', factor_dust
67         write(*,*) 'surfacearea : factor_ice  = ', factor_ice
68         firstcall = .false.
69      end if
70
[459]71      if (microphys) then ! improvedclouds
72         do l = 1,nlay
73            do ig = 1,ngrid
[463]74!              atmospheric density
[459]75               rho = pplay(ig,l)/(rnew(ig,l)*pt(ig,l))
[463]76!              updated dust number density
77               dustnd = pq(ig,l,igcm_dust_number)
78     $                + pdq(ig,l,igcm_dust_number)*ptimestep
79!              updated ice number density
80               icend  = pq(ig,l,igcm_ccn_number)
81     $                + pdq(ig,l,igcm_ccn_number)*ptimestep
82!              dust surface area
[635]83               surfdust(ig,l) = factor_dust*dustnd*rho*tauscaling(ig)
[459]84     $                          *4.*pi*rdust(ig,l)**2
[463]85!              ice surface area
[635]86               surfice(ig,l)  = factor_ice*icend*rho*tauscaling(ig)
[459]87     $                          *4.*pi*rice(ig,l)**2
88            end do
89         end do
[463]90      else               ! simpleclouds
[459]91         do l = 1,nlay
92            do ig = 1,ngrid
[463]93!              atmospheric density
[459]94               rho = pplay(ig,l)/(rnew(ig,l)*pt(ig,l))
[463]95!              typical dust radius
[459]96               rdusttyp = max(.8e-6*exp(-pzlay(ig,l)/18000.),1.e-9)
[463]97!              typical dust number density
[459]98               ccntyp = 1.3e+8*max(tau(ig,1),0.001)/0.1
99     $                  *exp(-pzlay(ig,l)/10000.)
100               ccntyp = ccntyp/ccn_factor
101               if (rice(ig,l) .gt. rdust(ig,l)) then
[635]102                  surfdust(ig,l) = factor_dust*ccntyp*(ccn_factor - 1.)
103     $                             *rho*4.*pi*rdusttyp**2
104                  surfice(ig,l)  = factor_ice*ccntyp*4.*pi*rice(ig,l)**2
[459]105               else
[635]106                  surfdust(ig,l) = factor_dust*ccntyp*ccn_factor
107     $                             *rho*4.*pi*rdusttyp**2
[459]108                  surfice(ig,l)  = 0.
109               end if
110            end do
111         end do
112      end if         ! of microphys
113
114! write diagnostics in micron2/cm3
[476]115     
116      if (callstats) then
117        call wstats(ngrid,"surfdust", "Dust surface area",
[459]118     $            "micron2 cm-3",3,surfdust*1.e6)
[476]119        call wstats(ngrid,"surfice", "Ice cloud surface area",
[459]120     $            "micron2 cm-3",3,surfice*1.e6)
[476]121      endif
[635]122      call writediagfi(ngrid,"surfdust", "Dust surface area",
123     $            "micron2 cm-3",3,surfdust*1.e6)
[459]124      call writediagfi(ngrid,"surfice", "Ice cloud surface area",
125     $            "micron2 cm-3",3,surfice*1.e6)
126
127      return
128      end
Note: See TracBrowser for help on using the repository browser.