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