Changeset c8fc724 in flexpart.git for src/wetdepo.f90


Ignore:
Timestamp:
Feb 2, 2017, 2:23:04 PM (7 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
93786a1
Parents:
4c64400
Message:

Bugfix: using namelist species files would sometimes set incorrect below-cloud scavenging parameters when using more than 1 species. Update: per-species scavenging statistics are written out at end of simulation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/wetdepo.f90

    r05cf28d rc8fc724  
    9090  real :: frac_act, liq_frac, dquer_m
    9191
    92   integer :: blc_count, inc_count
     92  integer(selected_int_kind(16)), dimension(nspec) :: blc_count, inc_count
    9393  real    :: Si_dummy, wetscav_dummy
    9494  logical :: readclouds_this_nest
     
    107107!************************
    108108
    109   blc_count=0
    110   inc_count=0
     109  blc_count(:)=0
     110  inc_count(:)=0
    111111
    112112  do jpart=1,numpart
     
    256256    do ks=1,nspec      ! loop over species
    257257      wetdeposit(ks)=0.
    258       wetscav=0.   
     258      wetscav=0.
     259
     260! Cycle loop if wet deposition for the species is off
     261      if (WETDEPSPEC(ks).eqv..false.) cycle
    259262
    260263      if (ngrid.gt.0) then
     
    274277        if ((dquer(ks).le.0.).and.(weta_gas(ks).gt.0..or.wetb_gas(ks).gt.0.)) then
    275278          !        if (weta(ks).gt.0. .or. wetb(ks).gt.0.) then
    276           blc_count=blc_count+1
     279          blc_count(ks)=blc_count(ks)+1
    277280          wetscav=weta_gas(ks)*prec(1)**wetb_gas(ks)
    278281
     
    280283!*********************************************************************************
    281284        else if ((dquer(ks).gt.0.).and.(crain_aero(ks).gt.0..or.csnow_aero(ks).gt.0.)) then
    282           blc_count=blc_count+1
     285          blc_count(ks)=blc_count(ks)+1
    283286
    284287!NIK 17.02.2015
     
    320323! given in species file, or if gas and positive Henry's constant
    321324        if ((ccn_aero(ks).gt.0. .or. in_aero(ks).gt.0.).or.(henry(ks).gt.0.and.dquer(ks).le.0)) then
    322           inc_count=inc_count+1
     325          inc_count(ks)=inc_count(ks)+1
    323326! if negative coefficients (turned off) set to zero for use in equation
    324327          if (ccn_aero(ks).lt.0.) ccn_aero(ks)=0.
     
    432435
    433436! count the total number of below-cloud and in-cloud occurences:
    434   tot_blc_count=tot_blc_count+blc_count
    435   tot_inc_count=tot_inc_count+inc_count
     437  tot_blc_count(1:nspec)=tot_blc_count(1:nspec)+blc_count(1:nspec)
     438  tot_inc_count(1:nspec)=tot_inc_count(1:nspec)+inc_count(1:nspec)
    436439
    437440end subroutine wetdepo
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG