[6] | 1 | !********************************************************************** |
---|
| 2 | ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010 * |
---|
| 3 | ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, * |
---|
| 4 | ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann * |
---|
| 5 | ! * |
---|
| 6 | ! This file is part of FLEXPART. * |
---|
| 7 | ! * |
---|
| 8 | ! FLEXPART is free software: you can redistribute it and/or modify * |
---|
| 9 | ! it under the terms of the GNU General Public License as published by* |
---|
| 10 | ! the Free Software Foundation, either version 3 of the License, or * |
---|
| 11 | ! (at your option) any later version. * |
---|
| 12 | ! * |
---|
| 13 | ! FLEXPART is distributed in the hope that it will be useful, * |
---|
| 14 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of * |
---|
| 15 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
---|
| 16 | ! GNU General Public License for more details. * |
---|
| 17 | ! * |
---|
| 18 | ! You should have received a copy of the GNU General Public License * |
---|
| 19 | ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * |
---|
| 20 | !********************************************************************** |
---|
| 21 | |
---|
| 22 | subroutine wetdepokernel_nest & |
---|
| 23 | (nunc,deposit,x,y,nage,kp) |
---|
| 24 | ! i i i i i i |
---|
| 25 | !***************************************************************************** |
---|
| 26 | ! * |
---|
| 27 | ! Attribution of the deposition from an individual particle to the * |
---|
| 28 | ! nested deposition fields using a uniform kernel with bandwidths * |
---|
| 29 | ! dxoutn and dyoutn. * |
---|
| 30 | ! * |
---|
| 31 | ! Author: A. Stohl * |
---|
| 32 | ! * |
---|
| 33 | ! 26 December 1996 * |
---|
| 34 | ! * |
---|
| 35 | ! 2 September 2004: Adaptation from wetdepokernel. * |
---|
| 36 | ! * |
---|
| 37 | ! * |
---|
| 38 | !***************************************************************************** |
---|
| 39 | ! * |
---|
| 40 | ! Variables: * |
---|
| 41 | ! * |
---|
| 42 | ! nunc uncertainty class of the respective particle * |
---|
| 43 | ! nage age class of the respective particle * |
---|
| 44 | ! deposit amount (kg) to be deposited * |
---|
| 45 | ! * |
---|
| 46 | !***************************************************************************** |
---|
| 47 | |
---|
| 48 | use unc_mod |
---|
| 49 | use par_mod |
---|
| 50 | use com_mod |
---|
| 51 | |
---|
| 52 | implicit none |
---|
| 53 | |
---|
| 54 | real :: x,y,deposit(maxspec),ddx,ddy,xl,yl,wx,wy,w |
---|
| 55 | integer :: ix,jy,ixp,jyp,ks,kp,nunc,nage |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | xl=(x*dx+xoutshiftn)/dxoutn |
---|
| 60 | yl=(y*dy+youtshiftn)/dyoutn |
---|
| 61 | ix=int(xl) |
---|
| 62 | jy=int(yl) |
---|
| 63 | ddx=xl-real(ix) ! distance to left cell border |
---|
| 64 | ddy=yl-real(jy) ! distance to lower cell border |
---|
| 65 | |
---|
| 66 | if (ddx.gt.0.5) then |
---|
| 67 | ixp=ix+1 |
---|
| 68 | wx=1.5-ddx |
---|
| 69 | else |
---|
| 70 | ixp=ix-1 |
---|
| 71 | wx=0.5+ddx |
---|
| 72 | endif |
---|
| 73 | |
---|
| 74 | if (ddy.gt.0.5) then |
---|
| 75 | jyp=jy+1 |
---|
| 76 | wy=1.5-ddy |
---|
| 77 | else |
---|
| 78 | jyp=jy-1 |
---|
| 79 | wy=0.5+ddy |
---|
| 80 | endif |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | ! Determine mass fractions for four grid points |
---|
| 84 | !********************************************** |
---|
| 85 | |
---|
| 86 | do ks=1,nspec |
---|
| 87 | |
---|
| 88 | if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgridn-1).and. & |
---|
| 89 | (jy.le.numygridn-1)) then |
---|
| 90 | w=wx*wy |
---|
| 91 | wetgriduncn(ix,jy,ks,kp,nunc,nage)= & |
---|
| 92 | wetgriduncn(ix,jy,ks,kp,nunc,nage)+deposit(ks)*w |
---|
| 93 | endif |
---|
| 94 | |
---|
| 95 | if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgridn-1).and. & |
---|
| 96 | (jyp.le.numygridn-1)) then |
---|
| 97 | w=(1.-wx)*(1.-wy) |
---|
| 98 | wetgriduncn(ixp,jyp,ks,kp,nunc,nage)= & |
---|
| 99 | wetgriduncn(ixp,jyp,ks,kp,nunc,nage)+deposit(ks)*w |
---|
| 100 | endif |
---|
| 101 | |
---|
| 102 | if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgridn-1).and. & |
---|
| 103 | (jy.le.numygridn-1)) then |
---|
| 104 | w=(1.-wx)*wy |
---|
| 105 | wetgriduncn(ixp,jy,ks,kp,nunc,nage)= & |
---|
| 106 | wetgriduncn(ixp,jy,ks,kp,nunc,nage)+deposit(ks)*w |
---|
| 107 | endif |
---|
| 108 | |
---|
| 109 | if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgridn-1).and. & |
---|
| 110 | (jyp.le.numygridn-1)) then |
---|
| 111 | w=wx*(1.-wy) |
---|
| 112 | wetgriduncn(ix,jyp,ks,kp,nunc,nage)= & |
---|
| 113 | wetgriduncn(ix,jyp,ks,kp,nunc,nage)+deposit(ks)*w |
---|
| 114 | endif |
---|
| 115 | |
---|
| 116 | end do |
---|
| 117 | end subroutine wetdepokernel_nest |
---|