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