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