Ignore:
Timestamp:
Apr 22, 2015, 3:42:35 PM (9 years ago)
Author:
pesei
Message:

Wet dep quick fix and other small changes. Wet depo quick fix not final yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/petra/src/wetdepokernel.f90

    r4 r37  
    11!**********************************************************************
    2 ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010         *
     2! Copyright 1998-2015                                                 *
    33! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa,             *
    44! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann   *
     
    2020!**********************************************************************
    2121
    22 subroutine wetdepokernel(nunc,deposit,x,y,nage,kp)
    23   !                          i      i    i i  i
     22subroutine wetdepokernel(nunc,deposit,x,y,itage,nage,kp)
     23  !                          i      i    i  i    i   i
    2424  !*****************************************************************************
    2525  !                                                                            *
    2626  !     Attribution of the deposition from an individual particle to the       *
    27   !     deposition fields using a uniform kernel with bandwidths dxout and dyout.*
     27  !     deposition fields using a uniform kernel with bandwidths dxout         *
     28  !     and dyout.                                                             *
    2829  !                                                                            *
    2930  !     Author: A. Stohl                                                       *
    3031  !                                                                            *
    3132  !     26 December 1996                                                       *
     33  !
     34  !  PS, 2/2015: do not use kernel for itage < 3 h
     35  !   same as for concentration in conccalc.f90
    3236  !                                                                            *
    3337  !*****************************************************************************
     
    4852
    4953  real :: x,y,deposit(maxspec),ddx,ddy,xl,yl,wx,wy,w
    50   integer :: ix,jy,ixp,jyp,nunc,nage,ks,kp
     54  integer :: ix,jy,ixp,jyp,nunc,nage,ks,kp,itage
    5155
    5256  xl=(x*dx+xoutshift)/dxout
     
    7478
    7579
    76   ! Determine mass fractions for four grid points
    77   !**********************************************
     80  if (itage .lt. itagekernmin) then
     81    ! no kernel, direct attribution to grid cell
     82   
     83    do ks=1,nspec
     84      if (ix.ge.0 .and. jy.ge.0 .and. &
     85          ix.le.numxgrid-1 .and. jy.le.numygrid-1) &
     86        wetgridunc(ix,jy,ks,kp,nunc,nage)= &
     87          wetgridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)
     88    enddo
     89       
     90  else
     91    ! Determine mass fractions for four grid points & distribute
    7892
    79   do ks=1,nspec
     93    do ks=1,nspec
    8094
    81   if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
    82        (jy.le.numygrid-1)) then
    83     w=wx*wy
    84       wetgridunc(ix,jy,ks,kp,nunc,nage)= &
    85            wetgridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)*w
     95      if (ix.ge.0 .and. jy.ge.0 .and. &
     96          ix.le.numxgrid-1 .and. jy.le.numygrid-1) then
     97        w=wx*wy
     98        wetgridunc(ix,jy,ks,kp,nunc,nage)= &
     99          wetgridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)*w
     100      endif
     101
     102      if ((ixp.ge.0).and.(jyp.ge.0).and.&
     103         (ixp.le.numxgrid-1).and. (jyp.le.numygrid-1)) then
     104        w=(1.-wx)*(1.-wy)
     105        wetgridunc(ixp,jyp,ks,kp,nunc,nage)= &
     106          wetgridunc(ixp,jyp,ks,kp,nunc,nage)+deposit(ks)*w
     107      endif
     108
     109      if ((ixp.ge.0).and.(jy.ge.0).and. &
     110          (ixp.le.numxgrid-1).and.(jy.le.numygrid-1)) then
     111        w=(1.-wx)*wy
     112        wetgridunc(ixp,jy,ks,kp,nunc,nage)= &
     113           wetgridunc(ixp,jy,ks,kp,nunc,nage)+deposit(ks)*w
     114      endif
     115
     116      if ((ix.ge.0).and.(jyp.ge.0).and. &
     117          (ix.le.numxgrid-1).and.(jyp.le.numygrid-1)) then
     118        w=wx*(1.-wy)
     119        wetgridunc(ix,jyp,ks,kp,nunc,nage)= &
     120          wetgridunc(ix,jyp,ks,kp,nunc,nage)+deposit(ks)*w
     121      endif
     122
     123    end do
     124
    86125  endif
    87126
    88   if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgrid-1).and. &
    89        (jyp.le.numygrid-1)) then
    90     w=(1.-wx)*(1.-wy)
    91       wetgridunc(ixp,jyp,ks,kp,nunc,nage)= &
    92            wetgridunc(ixp,jyp,ks,kp,nunc,nage)+deposit(ks)*w
    93   endif
    94 
    95   if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgrid-1).and. &
    96        (jy.le.numygrid-1)) then
    97     w=(1.-wx)*wy
    98       wetgridunc(ixp,jy,ks,kp,nunc,nage)= &
    99            wetgridunc(ixp,jy,ks,kp,nunc,nage)+deposit(ks)*w
    100   endif
    101 
    102   if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgrid-1).and. &
    103        (jyp.le.numygrid-1)) then
    104     w=wx*(1.-wy)
    105       wetgridunc(ix,jyp,ks,kp,nunc,nage)= &
    106            wetgridunc(ix,jyp,ks,kp,nunc,nage)+deposit(ks)*w
    107   endif
    108   end do
    109 
    110127end subroutine wetdepokernel
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG