[1962] | 1 | MODULE callsedim_mod |
---|
| 2 | |
---|
| 3 | IMPLICIT NONE |
---|
| 4 | |
---|
| 5 | CONTAINS |
---|
[1974] | 6 | |
---|
| 7 | SUBROUTINE callsedim(ngrid,nlay,ptimestep, |
---|
| 8 | & pplev,zlev,zlay,pt,pdt,rdust,rstormdust,rice, |
---|
[358] | 9 | & rsedcloud,rhocloud, |
---|
[1974] | 10 | & pq,pdqfi,pdqsed,pdqs_sed,nq, |
---|
[740] | 11 | & tau,tauscaling) |
---|
[1974] | 12 | |
---|
[1036] | 13 | USE ioipsl_getincom, only: getin |
---|
| 14 | USE updaterad, only: updaterdust,updaterice_micro,updaterice_typ |
---|
| 15 | USE tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, |
---|
| 16 | & rho_dust, rho_q, radius, varian, |
---|
| 17 | & igcm_ccn_mass, igcm_ccn_number, |
---|
[1617] | 18 | & igcm_h2o_ice, nuice_sed, nuice_ref, |
---|
[1974] | 19 | & igcm_ccnco2_mass,igcm_ccnco2_number, |
---|
| 20 | & igcm_co2_ice, igcm_stormdust_mass, |
---|
| 21 | & igcm_stormdust_number |
---|
[1913] | 22 | USE newsedim_mod, ONLY: newsedim |
---|
| 23 | USE comcstfi_h, ONLY: g |
---|
[1983] | 24 | USE dimradmars_mod, only: naerkind |
---|
[38] | 25 | IMPLICIT NONE |
---|
| 26 | |
---|
| 27 | c======================================================================= |
---|
| 28 | c Sedimentation of the Martian aerosols |
---|
| 29 | c depending on their density and radius |
---|
| 30 | c |
---|
| 31 | c F.Forget 1999 |
---|
| 32 | c |
---|
| 33 | c Modified by J.-B. Madeleine 2010: Now includes the doubleq |
---|
| 34 | c technique in order to have only one call to callsedim in |
---|
| 35 | c physiq.F. |
---|
| 36 | c |
---|
[1617] | 37 | c Modified by J. Audouard 09/16: Now includes the co2clouds case |
---|
| 38 | c If the co2 microphysics is on, then co2 theice & ccn tracers |
---|
| 39 | c are being sedimented in the microtimestep (co2cloud.F), not |
---|
| 40 | c in this routine. |
---|
| 41 | c |
---|
[38] | 42 | c======================================================================= |
---|
| 43 | |
---|
| 44 | c----------------------------------------------------------------------- |
---|
| 45 | c declarations: |
---|
| 46 | c ------------- |
---|
[520] | 47 | |
---|
[1913] | 48 | include "callkeys.h" |
---|
[38] | 49 | |
---|
| 50 | c |
---|
| 51 | c arguments: |
---|
| 52 | c ---------- |
---|
| 53 | |
---|
[1005] | 54 | integer,intent(in) :: ngrid ! number of horizontal grid points |
---|
| 55 | integer,intent(in) :: nlay ! number of atmospheric layers |
---|
| 56 | real,intent(in) :: ptimestep ! physics time step (s) |
---|
| 57 | real,intent(in) :: pplev(ngrid,nlay+1) ! pressure at inter-layers (Pa) |
---|
| 58 | real,intent(in) :: zlev(ngrid,nlay+1) ! altitude at layer boundaries |
---|
| 59 | real,intent(in) :: zlay(ngrid,nlay) ! altitude at the middle of the layers |
---|
| 60 | real,intent(in) :: pt(ngrid,nlay) ! temperature at mid-layer (K) |
---|
| 61 | real,intent(in) :: pdt(ngrid,nlay) ! tendency on temperature, from |
---|
| 62 | ! previous processes (K/s) |
---|
[38] | 63 | c Aerosol radius provided by the water ice microphysical scheme: |
---|
[1005] | 64 | real,intent(out) :: rdust(ngrid,nlay) ! Dust geometric mean radius (m) |
---|
[1974] | 65 | real,intent(out) :: rstormdust(ngrid,nlay) ! Stormdust geometric mean radius (m) |
---|
[1005] | 66 | real,intent(out) :: rice(ngrid,nlay) ! H2O Ice geometric mean radius (m) |
---|
| 67 | c Sedimentation radius of water ice |
---|
[1047] | 68 | real,intent(in) :: rsedcloud(ngrid,nlay) |
---|
[1005] | 69 | c Cloud density (kg.m-3) |
---|
[1047] | 70 | real,intent(inout) :: rhocloud(ngrid,nlay) |
---|
[38] | 71 | c Traceurs : |
---|
[1005] | 72 | real,intent(in) :: pq(ngrid,nlay,nq) ! tracers (kg/kg) |
---|
| 73 | real,intent(in) :: pdqfi(ngrid,nlay,nq) ! tendency before sedimentation (kg/kg.s-1) |
---|
| 74 | real,intent(out) :: pdqsed(ngrid,nlay,nq) ! tendency due to sedimentation (kg/kg.s-1) |
---|
| 75 | real,intent(out) :: pdqs_sed(ngrid,nq) ! flux at surface (kg.m-2.s-1) |
---|
| 76 | integer,intent(in) :: nq ! number of tracers |
---|
[1983] | 77 | real,intent(in) :: tau(ngrid,naerkind) ! dust opacity |
---|
[1005] | 78 | real,intent(in) :: tauscaling(ngrid) |
---|
[38] | 79 | |
---|
| 80 | c local: |
---|
| 81 | c ------ |
---|
| 82 | |
---|
| 83 | INTEGER l,ig, iq |
---|
| 84 | |
---|
[1005] | 85 | real zqi(ngrid,nlay,nq) ! to locally store tracers |
---|
| 86 | real zt(ngrid,nlay) ! to locally store temperature |
---|
| 87 | real masse (ngrid,nlay) ! Layer mass (kg.m-2) |
---|
| 88 | real epaisseur (ngrid,nlay) ! Layer thickness (m) |
---|
| 89 | real wq(ngrid,nlay+1) ! displaced tracer mass (kg.m-2) |
---|
| 90 | real r0(ngrid,nlay) ! geometric mean radius used for |
---|
[358] | 91 | ! sedimentation (m) |
---|
[1005] | 92 | real r0dust(ngrid,nlay) ! geometric mean radius used for |
---|
[358] | 93 | ! dust (m) |
---|
[1974] | 94 | real r0stormdust(ngrid,nlay) ! Geometric mean radius used for stormdust (m) |
---|
[740] | 95 | ! ! CCNs (m) |
---|
[1005] | 96 | real,save :: beta ! correction for the shape of the ice particles (cf. newsedim) |
---|
[411] | 97 | c for ice radius computation |
---|
| 98 | REAL Mo,No |
---|
| 99 | REAl ccntyp |
---|
[38] | 100 | |
---|
[358] | 101 | |
---|
[411] | 102 | |
---|
[38] | 103 | c Discrete size distributions (doubleq) |
---|
| 104 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 105 | c 1) Parameters used to represent the changes in fall |
---|
| 106 | c velocity as a function of particle size; |
---|
[1005] | 107 | integer ir |
---|
| 108 | integer,parameter :: nr=12 !(nr=7) ! number of bins |
---|
| 109 | real,save :: rd(nr) |
---|
| 110 | real qr(ngrid,nlay,nr) |
---|
| 111 | real,save :: rdi(nr+1) ! extreme and intermediate radii |
---|
| 112 | real Sq(ngrid,nlay) |
---|
| 113 | real,parameter :: rdmin=1.e-8 |
---|
| 114 | real,parameter :: rdmax=30.e-6 |
---|
| 115 | real,parameter :: rdimin=1.e-8 ! 1.e-7 |
---|
| 116 | real,parameter :: rdimax=1.e-4 |
---|
[38] | 117 | |
---|
| 118 | c 2) Second size distribution for the log-normal integration |
---|
| 119 | c (the mass mixing ratio is computed for each radius) |
---|
| 120 | |
---|
[1005] | 121 | integer iint |
---|
| 122 | integer,parameter :: ninter=4 ! number of points between each rdi radii |
---|
| 123 | real,save :: rr(ninter,nr) |
---|
[38] | 124 | integer radpower |
---|
[358] | 125 | real sigma0 |
---|
[38] | 126 | |
---|
| 127 | c 3) Other local variables used in doubleq |
---|
| 128 | |
---|
[1005] | 129 | INTEGER,SAVE :: idust_mass ! index of tracer containing dust mass |
---|
| 130 | ! mix. ratio |
---|
| 131 | INTEGER,SAVE :: idust_number ! index of tracer containing dust number |
---|
| 132 | ! mix. ratio |
---|
| 133 | INTEGER,SAVE :: iccn_mass ! index of tracer containing CCN mass |
---|
| 134 | ! mix. ratio |
---|
| 135 | INTEGER,SAVE :: iccn_number ! index of tracer containing CCN number |
---|
| 136 | ! mix. ratio |
---|
[1974] | 137 | INTEGER,SAVE :: istormdust_mass ! index of tracer containing |
---|
| 138 | !stormdust mass mix. ratio |
---|
| 139 | INTEGER,SAVE :: istormdust_number ! index of tracer containing |
---|
| 140 | !stormdust number mix. ratio |
---|
[1617] | 141 | INTEGER,SAVE :: iccnco2_number ! index of tracer containing CCN number |
---|
| 142 | INTEGER,SAVE :: iccnco2_mass ! index of tracer containing CCN number |
---|
| 143 | INTEGER,SAVE :: ico2_ice ! index of tracer containing CCN number |
---|
[38] | 144 | |
---|
[1617] | 145 | |
---|
[1005] | 146 | LOGICAL,SAVE :: firstcall=.true. |
---|
[38] | 147 | |
---|
[1974] | 148 | |
---|
| 149 | |
---|
[38] | 150 | c ** un petit test de coherence |
---|
| 151 | c -------------------------- |
---|
[1779] | 152 | ! AS: firstcall OK absolute |
---|
[38] | 153 | IF (firstcall) THEN |
---|
[411] | 154 | |
---|
[38] | 155 | c Doubleq: initialization |
---|
| 156 | IF (doubleq) THEN |
---|
| 157 | do ir=1,nr |
---|
| 158 | rd(ir)= rdmin*(rdmax/rdmin)**(float(ir-1)/float(nr-1)) |
---|
| 159 | end do |
---|
| 160 | rdi(1)=rdimin |
---|
| 161 | do ir=2,nr |
---|
| 162 | rdi(ir)= sqrt(rd(ir-1)*rd(ir)) |
---|
| 163 | end do |
---|
| 164 | rdi(nr+1)=rdimax |
---|
| 165 | |
---|
| 166 | do ir=1,nr |
---|
| 167 | do iint=1,ninter |
---|
| 168 | rr(iint,ir)= |
---|
| 169 | & rdi(ir)* |
---|
| 170 | & (rdi(ir+1)/rdi(ir))**(float(iint-1)/float(ninter-1)) |
---|
| 171 | c write(*,*) rr(iint,ir) |
---|
| 172 | end do |
---|
| 173 | end do |
---|
| 174 | |
---|
| 175 | ! identify tracers corresponding to mass mixing ratio and |
---|
| 176 | ! number mixing ratio |
---|
| 177 | idust_mass=0 ! dummy initialization |
---|
| 178 | idust_number=0 ! dummy initialization |
---|
| 179 | |
---|
| 180 | do iq=1,nq |
---|
| 181 | if (noms(iq).eq."dust_mass") then |
---|
| 182 | idust_mass=iq |
---|
[1005] | 183 | write(*,*)"callsedim: idust_mass=",idust_mass |
---|
[38] | 184 | endif |
---|
| 185 | if (noms(iq).eq."dust_number") then |
---|
| 186 | idust_number=iq |
---|
[1005] | 187 | write(*,*)"callsedim: idust_number=",idust_number |
---|
[38] | 188 | endif |
---|
| 189 | enddo |
---|
| 190 | |
---|
| 191 | ! check that we did find the tracers |
---|
| 192 | if ((idust_mass.eq.0).or.(idust_number.eq.0)) then |
---|
| 193 | write(*,*) 'callsedim: error! could not identify' |
---|
| 194 | write(*,*) ' tracers for dust mass and number mixing' |
---|
| 195 | write(*,*) ' ratio and doubleq is activated!' |
---|
| 196 | stop |
---|
| 197 | endif |
---|
| 198 | ENDIF !of if (doubleq) |
---|
| 199 | |
---|
[740] | 200 | IF (microphys) THEN |
---|
[358] | 201 | iccn_mass=0 |
---|
| 202 | iccn_number=0 |
---|
| 203 | do iq=1,nq |
---|
| 204 | if (noms(iq).eq."ccn_mass") then |
---|
| 205 | iccn_mass=iq |
---|
[1005] | 206 | write(*,*)"callsedim: iccn_mass=",iccn_mass |
---|
[358] | 207 | endif |
---|
| 208 | if (noms(iq).eq."ccn_number") then |
---|
| 209 | iccn_number=iq |
---|
[1005] | 210 | write(*,*)"callsedim: iccn_number=",iccn_number |
---|
[358] | 211 | endif |
---|
| 212 | enddo |
---|
| 213 | ! check that we did find the tracers |
---|
| 214 | if ((iccn_mass.eq.0).or.(iccn_number.eq.0)) then |
---|
| 215 | write(*,*) 'callsedim: error! could not identify' |
---|
| 216 | write(*,*) ' tracers for ccn mass and number mixing' |
---|
[740] | 217 | write(*,*) ' ratio and microphys is activated!' |
---|
[358] | 218 | stop |
---|
| 219 | endif |
---|
[740] | 220 | ENDIF !of if (microphys) |
---|
[358] | 221 | |
---|
[1720] | 222 | IF (co2clouds) THEN |
---|
[1617] | 223 | iccnco2_mass=0 |
---|
| 224 | iccnco2_number=0 |
---|
| 225 | ico2_ice=0 |
---|
| 226 | do iq=1,nq |
---|
| 227 | if (noms(iq).eq."ccnco2_mass") then |
---|
| 228 | iccnco2_mass=iq |
---|
| 229 | write(*,*)"callsedim: iccnco2_mass=",iccnco2_mass |
---|
| 230 | endif |
---|
| 231 | if (noms(iq).eq."co2_ice") then |
---|
| 232 | ico2_ice=iq |
---|
| 233 | write(*,*)"callsedim: ico2_ice=",ico2_ice |
---|
| 234 | endif |
---|
| 235 | if (noms(iq).eq."ccnco2_number") then |
---|
| 236 | iccnco2_number=iq |
---|
| 237 | write(*,*)"callsedim: iccnco2_number=",iccnco2_number |
---|
| 238 | endif |
---|
| 239 | enddo |
---|
| 240 | ! check that we did find the tracers |
---|
| 241 | if ((iccnco2_mass.eq.0).or.(iccnco2_number.eq.0)) then |
---|
| 242 | write(*,*) 'callsedim: error! could not identify' |
---|
| 243 | write(*,*) ' tracers for ccn co2 mass and number mixing' |
---|
[1720] | 244 | write(*,*) ' ratio and co2clouds are activated!' |
---|
[1617] | 245 | stop |
---|
| 246 | endif |
---|
[1720] | 247 | ENDIF !of if (co2clouds) |
---|
[1617] | 248 | |
---|
[1974] | 249 | IF (water) THEN |
---|
[626] | 250 | write(*,*) "correction for the shape of the ice particles ?" |
---|
| 251 | beta=0.75 ! default value |
---|
| 252 | call getin("ice_shape",beta) |
---|
| 253 | write(*,*) " ice_shape = ",beta |
---|
| 254 | |
---|
| 255 | write(*,*) "water_param nueff Sedimentation:", nuice_sed |
---|
| 256 | IF (activice) THEN |
---|
| 257 | write(*,*) "water_param nueff Radiative:", nuice_ref |
---|
| 258 | ENDIF |
---|
[1974] | 259 | ENDIF |
---|
| 260 | |
---|
| 261 | IF (rdstorm) THEN ! identifying stormdust tracers for sedimentation |
---|
| 262 | istormdust_mass=0 ! dummy initialization |
---|
| 263 | istormdust_number=0 ! dummy initialization |
---|
| 264 | |
---|
| 265 | do iq=1,nq |
---|
| 266 | if (noms(iq).eq."stormdust_mass") then |
---|
| 267 | istormdust_mass=iq |
---|
| 268 | write(*,*)"callsedim: istormdust_mass=",istormdust_mass |
---|
| 269 | endif |
---|
| 270 | if (noms(iq).eq."stormdust_number") then |
---|
| 271 | istormdust_number=iq |
---|
| 272 | write(*,*)"callsedim: istormdust_number=", |
---|
| 273 | & istormdust_number |
---|
| 274 | endif |
---|
| 275 | enddo |
---|
| 276 | |
---|
| 277 | ! check that we did find the tracers |
---|
| 278 | if ((istormdust_mass.eq.0).or.(istormdust_number.eq.0)) then |
---|
| 279 | write(*,*) 'callsedim: error! could not identify' |
---|
| 280 | write(*,*) ' tracers for stormdust mass and number mixing' |
---|
| 281 | write(*,*) ' ratio and rdstorm is activated!' |
---|
| 282 | stop |
---|
| 283 | endif |
---|
| 284 | ENDIF !of if (rdstorm) |
---|
[38] | 285 | |
---|
| 286 | firstcall=.false. |
---|
| 287 | ENDIF ! of IF (firstcall) |
---|
| 288 | |
---|
| 289 | c----------------------------------------------------------------------- |
---|
| 290 | c 1. Initialization |
---|
| 291 | c ----------------- |
---|
| 292 | |
---|
[1005] | 293 | ! zqi(1:ngrid,1:nlay,1:nqmx) = 0. |
---|
| 294 | c Update the mass mixing ratio and temperature with the tendencies coming |
---|
[38] | 295 | c from other parameterizations: |
---|
| 296 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[1005] | 297 | zqi(1:ngrid,1:nlay,1:nq)=pq(1:ngrid,1:nlay,1:nq) |
---|
| 298 | & +pdqfi(1:ngrid,1:nlay,1:nq)*ptimestep |
---|
| 299 | zt(1:ngrid,1:nlay)=pt(1:ngrid,1:nlay) |
---|
| 300 | & +pdt(1:ngrid,1:nlay)*ptimestep |
---|
[38] | 301 | |
---|
| 302 | c Computing the different layer properties |
---|
| 303 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 304 | c Mass (kg.m-2), thickness(m), crossing time (s) etc. |
---|
| 305 | |
---|
| 306 | do l=1,nlay |
---|
| 307 | do ig=1, ngrid |
---|
| 308 | masse(ig,l)=(pplev(ig,l) - pplev(ig,l+1)) /g |
---|
| 309 | epaisseur(ig,l)= zlev(ig,l+1) - zlev(ig,l) |
---|
| 310 | end do |
---|
| 311 | end do |
---|
| 312 | |
---|
| 313 | c ================================================================= |
---|
[358] | 314 | c Compute the geometric mean radius used for sedimentation |
---|
| 315 | |
---|
| 316 | if (doubleq) then |
---|
| 317 | do l=1,nlay |
---|
| 318 | do ig=1, ngrid |
---|
[740] | 319 | |
---|
| 320 | call updaterdust(zqi(ig,l,igcm_dust_mass), |
---|
| 321 | & zqi(ig,l,igcm_dust_number),r0dust(ig,l), |
---|
| 322 | & tauscaling(ig)) |
---|
| 323 | |
---|
[358] | 324 | end do |
---|
| 325 | end do |
---|
| 326 | endif |
---|
[1974] | 327 | ! rocket dust storm |
---|
| 328 | if (rdstorm) then |
---|
| 329 | do l=1,nlay |
---|
| 330 | do ig=1, ngrid |
---|
| 331 | |
---|
| 332 | call updaterdust(zqi(ig,l,igcm_stormdust_mass), |
---|
| 333 | & zqi(ig,l,igcm_stormdust_number),r0stormdust(ig,l), |
---|
| 334 | & tauscaling(ig)) |
---|
| 335 | |
---|
| 336 | end do |
---|
| 337 | end do |
---|
| 338 | endif |
---|
[358] | 339 | c ================================================================= |
---|
[38] | 340 | do iq=1,nq |
---|
[1617] | 341 | if(radius(iq).gt.1.e-9 .and.(iq.ne.ico2_ice) .and. |
---|
| 342 | & (iq .ne. iccnco2_mass) .and. (iq .ne. |
---|
| 343 | & iccnco2_number)) then ! no sedim for gaz or CO2 clouds (done in microtimestep) |
---|
[38] | 344 | |
---|
| 345 | c ----------------------------------------------------------------- |
---|
| 346 | c DOUBLEQ CASE |
---|
| 347 | c ----------------------------------------------------------------- |
---|
[358] | 348 | if ((doubleq.and. |
---|
[1974] | 349 | & ((iq.eq.idust_mass).or.(iq.eq.idust_number).or. |
---|
| 350 | & (iq.eq.istormdust_mass).or.(iq.eq.istormdust_number)))) then |
---|
[740] | 351 | |
---|
[38] | 352 | c Computing size distribution: |
---|
| 353 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 354 | |
---|
[1974] | 355 | if ((iq.eq.idust_mass).or.(iq.eq.idust_number)) then |
---|
[358] | 356 | do l=1,nlay |
---|
| 357 | do ig=1, ngrid |
---|
| 358 | r0(ig,l)=r0dust(ig,l) |
---|
| 359 | end do |
---|
[38] | 360 | end do |
---|
[1974] | 361 | else if ((iq.eq.istormdust_mass).or. |
---|
| 362 | & (iq.eq.istormdust_number)) then |
---|
| 363 | do l=1,nlay |
---|
| 364 | do ig=1, ngrid |
---|
| 365 | r0(ig,l)=r0stormdust(ig,l) |
---|
| 366 | end do |
---|
| 367 | end do |
---|
| 368 | endif |
---|
| 369 | sigma0 = varian |
---|
[38] | 370 | |
---|
| 371 | c Computing mass mixing ratio for each particle size |
---|
| 372 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[1974] | 373 | IF ((iq.EQ.idust_mass).or.(iq.EQ.istormdust_mass)) then |
---|
[38] | 374 | radpower = 2 |
---|
[520] | 375 | ELSE ! number |
---|
[38] | 376 | radpower = -1 |
---|
| 377 | ENDIF |
---|
| 378 | Sq(1:ngrid,1:nlay) = 0. |
---|
| 379 | do ir=1,nr |
---|
| 380 | do l=1,nlay |
---|
| 381 | do ig=1,ngrid |
---|
| 382 | c **************** |
---|
| 383 | c Size distribution integration |
---|
| 384 | c (Trapezoid Integration Method) |
---|
| 385 | qr(ig,l,ir)=0.5*(rr(2,ir)-rr(1,ir))* |
---|
| 386 | & (rr(1,ir)**radpower)* |
---|
[358] | 387 | & exp(-(log(rr(1,ir)/r0(ig,l)))**2/(2*sigma0**2)) |
---|
[38] | 388 | do iint=2,ninter-1 |
---|
| 389 | qr(ig,l,ir)=qr(ig,l,ir) + |
---|
| 390 | & 0.5*(rr(iint+1,ir)-rr(iint-1,ir))* |
---|
| 391 | & (rr(iint,ir)**radpower)* |
---|
| 392 | & exp(-(log(rr(iint,ir)/r0(ig,l)))**2/ |
---|
[358] | 393 | & (2*sigma0**2)) |
---|
[38] | 394 | end do |
---|
| 395 | qr(ig,l,ir)=qr(ig,l,ir) + |
---|
| 396 | & 0.5*(rr(ninter,ir)-rr(ninter-1,ir))* |
---|
| 397 | & (rr(ninter,ir)**radpower)* |
---|
| 398 | & exp(-(log(rr(ninter,ir)/r0(ig,l)))**2/ |
---|
[358] | 399 | & (2*sigma0**2)) |
---|
[38] | 400 | |
---|
| 401 | c **************** old method (not recommended!) |
---|
| 402 | c qr(ig,l,ir)=(rd(ir)**(5-3*iq))* |
---|
[358] | 403 | c & exp( -(log(rd(ir)/r0(ig,l)))**2 / (2*sigma0**2) ) |
---|
[38] | 404 | c ****************************** |
---|
| 405 | |
---|
| 406 | Sq(ig,l)=Sq(ig,l)+qr(ig,l,ir) |
---|
| 407 | enddo |
---|
| 408 | enddo |
---|
| 409 | enddo |
---|
| 410 | |
---|
| 411 | do ir=1,nr |
---|
| 412 | do l=1,nlay |
---|
| 413 | do ig=1,ngrid |
---|
| 414 | qr(ig,l,ir) = zqi(ig,l,iq)*qr(ig,l,ir)/Sq(ig,l) |
---|
| 415 | enddo |
---|
| 416 | enddo |
---|
| 417 | enddo |
---|
| 418 | |
---|
| 419 | c Computing sedimentation for each tracer |
---|
| 420 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 421 | |
---|
| 422 | zqi(1:ngrid,1:nlay,iq) = 0. |
---|
| 423 | pdqs_sed(1:ngrid,iq) = 0. |
---|
| 424 | |
---|
| 425 | do ir=1,nr |
---|
[358] | 426 | call newsedim(ngrid,nlay,1,1,ptimestep, |
---|
[1913] | 427 | & pplev,masse,epaisseur,zt,rd(ir),(/rho_dust/),qr(1,1,ir), |
---|
[358] | 428 | & wq,0.5) |
---|
[38] | 429 | |
---|
| 430 | c Tendencies |
---|
| 431 | c ~~~~~~~~~~ |
---|
| 432 | do ig=1,ngrid |
---|
| 433 | pdqs_sed(ig,iq) = pdqs_sed(ig,iq) |
---|
| 434 | & + wq(ig,1)/ptimestep |
---|
| 435 | end do |
---|
| 436 | DO l = 1, nlay |
---|
| 437 | DO ig=1,ngrid |
---|
| 438 | zqi(ig,l,iq)=zqi(ig,l,iq)+qr(ig,l,ir) |
---|
| 439 | ENDDO |
---|
[1974] | 440 | ENDDO |
---|
[38] | 441 | enddo ! of do ir=1,nr |
---|
| 442 | c ----------------------------------------------------------------- |
---|
[626] | 443 | c WATER CYCLE CASE |
---|
[38] | 444 | c ----------------------------------------------------------------- |
---|
[626] | 445 | else if ((iq .eq. iccn_mass) .or. (iq .eq. iccn_number) |
---|
| 446 | & .or. (iq .eq. igcm_h2o_ice)) then |
---|
| 447 | if (microphys) then |
---|
| 448 | ! water ice sedimentation |
---|
| 449 | call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, |
---|
[1005] | 450 | & ptimestep,pplev,masse,epaisseur,zt,rsedcloud,rhocloud, |
---|
[626] | 451 | & zqi(1,1,iq),wq,beta) |
---|
| 452 | else |
---|
| 453 | ! water ice sedimentation |
---|
| 454 | call newsedim(ngrid,nlay,ngrid*nlay,1, |
---|
[1005] | 455 | & ptimestep,pplev,masse,epaisseur,zt,rsedcloud,rho_q(iq), |
---|
[626] | 456 | & zqi(1,1,iq),wq,beta) |
---|
| 457 | endif ! of if (microphys) |
---|
[38] | 458 | c Tendencies |
---|
| 459 | c ~~~~~~~~~~ |
---|
[626] | 460 | do ig=1,ngrid |
---|
| 461 | pdqs_sed(ig,iq)=wq(ig,1)/ptimestep |
---|
| 462 | end do |
---|
[38] | 463 | c ----------------------------------------------------------------- |
---|
| 464 | c GENERAL CASE |
---|
| 465 | c ----------------------------------------------------------------- |
---|
[626] | 466 | else |
---|
[358] | 467 | call newsedim(ngrid,nlay,1,1,ptimestep, |
---|
[1005] | 468 | & pplev,masse,epaisseur,zt,radius(iq),rho_q(iq), |
---|
[38] | 469 | & zqi(1,1,iq),wq,1.0) |
---|
| 470 | c Tendencies |
---|
| 471 | c ~~~~~~~~~~ |
---|
| 472 | do ig=1,ngrid |
---|
| 473 | pdqs_sed(ig,iq)=wq(ig,1)/ptimestep |
---|
| 474 | end do |
---|
| 475 | endif ! of if doubleq and if water |
---|
| 476 | c ----------------------------------------------------------------- |
---|
| 477 | |
---|
[358] | 478 | c Compute the final tendency: |
---|
| 479 | c --------------------------- |
---|
[38] | 480 | DO l = 1, nlay |
---|
| 481 | DO ig=1,ngrid |
---|
| 482 | pdqsed(ig,l,iq)=(zqi(ig,l,iq)- |
---|
| 483 | $ (pq(ig,l,iq) + pdqfi(ig,l,iq)*ptimestep))/ptimestep |
---|
| 484 | ENDDO |
---|
| 485 | ENDDO |
---|
| 486 | |
---|
| 487 | endif ! of if(radius(iq).gt.1.e-9) |
---|
| 488 | c ================================================================= |
---|
| 489 | enddo ! of do iq=1,nq |
---|
[1005] | 490 | |
---|
[358] | 491 | c Update the dust particle size "rdust" |
---|
| 492 | c ------------------------------------- |
---|
[635] | 493 | if (doubleq) then |
---|
| 494 | DO l = 1, nlay |
---|
[358] | 495 | DO ig=1,ngrid |
---|
[740] | 496 | |
---|
| 497 | |
---|
| 498 | call updaterdust(zqi(ig,l,igcm_dust_mass), |
---|
| 499 | & zqi(ig,l,igcm_dust_number),rdust(ig,l), |
---|
| 500 | & tauscaling(ig)) |
---|
| 501 | |
---|
| 502 | |
---|
[358] | 503 | ENDDO |
---|
[635] | 504 | ENDDO |
---|
| 505 | endif ! of if (doubleq) |
---|
[1974] | 506 | |
---|
| 507 | if (rdstorm) then |
---|
| 508 | DO l = 1, nlay |
---|
| 509 | DO ig=1,ngrid |
---|
| 510 | call updaterdust(zqi(ig,l,igcm_stormdust_mass), |
---|
| 511 | & zqi(ig,l,igcm_stormdust_number),rstormdust(ig,l), |
---|
| 512 | & tauscaling(ig)) |
---|
| 513 | ENDDO |
---|
| 514 | ENDDO |
---|
| 515 | endif ! of if (rdstorm) |
---|
| 516 | |
---|
[411] | 517 | c Update the ice particle size "rice" |
---|
| 518 | c ------------------------------------- |
---|
[635] | 519 | if (water) then |
---|
[740] | 520 | IF(microphys) THEN |
---|
| 521 | |
---|
| 522 | |
---|
[626] | 523 | DO l = 1, nlay |
---|
| 524 | DO ig=1,ngrid |
---|
[740] | 525 | |
---|
| 526 | call updaterice_micro(zqi(ig,l,igcm_h2o_ice), |
---|
| 527 | & zqi(ig,l,igcm_ccn_mass),zqi(ig,l,igcm_ccn_number), |
---|
| 528 | & tauscaling(ig),rice(ig,l),rhocloud(ig,l)) |
---|
[626] | 529 | |
---|
| 530 | ENDDO |
---|
| 531 | ENDDO |
---|
[740] | 532 | |
---|
[635] | 533 | ELSE |
---|
[740] | 534 | |
---|
[626] | 535 | DO l = 1, nlay |
---|
| 536 | DO ig=1,ngrid |
---|
[740] | 537 | |
---|
| 538 | call updaterice_typ(zqi(ig,l,igcm_h2o_ice), |
---|
| 539 | & tau(ig,1),zlay(ig,l),rice(ig,l)) |
---|
| 540 | |
---|
[626] | 541 | ENDDO |
---|
| 542 | ENDDO |
---|
[740] | 543 | ENDIF ! of IF(microphys) |
---|
[635] | 544 | endif ! of if (water) |
---|
[358] | 545 | |
---|
[1962] | 546 | END SUBROUTINE callsedim |
---|
| 547 | |
---|
| 548 | END MODULE callsedim_mod |
---|
[1974] | 549 | |
---|