Changes in src/calcfluxes.f90 [92fab65:a7167e4] in flexpart.git


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/calcfluxes.f90

    r92fab65 ra7167e4  
    1 ! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
    2 ! SPDX-License-Identifier: GPL-3.0-or-later
    3 
    41subroutine calcfluxes(nage,jpart,xold,yold,zold)
    52  !                       i     i    i    i    i
     
    6461       (jyave.le.numygrid-1)) then
    6562    do kz=1,numzgrid                ! determine height of cell
    66       if (outheighthalf(kz).gt.zold) goto 11
     63!      if (outheighthalf(kz).gt.zold) goto 11
     64      if (outheight(kz).gt.zold) goto 11 !sec, use upper layer instead of mid layer
    6765    end do
    686611   k1=min(numzgrid,kz)
    6967    do kz=1,numzgrid                ! determine height of cell
    70       if (outheighthalf(kz).gt.ztra1(jpart)) goto 21
     68!      if (outheighthalf(kz).gt.ztra1(jpart)) goto 21
     69      if (outheight(kz).gt.ztra1(jpart)) goto 21
    7170    end do
    727121   k2=min(numzgrid,kz)
     
    9695
    9796    if (abs(xold-xtra1(jpart)).lt.real(nx)/2.) then
    98       ix1=int((xold*dx+xoutshift)/dxout+0.5)
    99       ix2=int((xtra1(jpart)*dx+xoutshift)/dxout+0.5)
     97      ix1=int((xold*dx+xoutshift)/dxout)              ! flux throught the western boundary (sec)
     98      ix2=int((xtra1(jpart)*dx+xoutshift)/dxout)      ! flux throught the western boundary (sec)
     99!      ix1=int((xold*dx+xoutshift)/dxout+0.5)
     100!      ix2=int((xtra1(jpart)*dx+xoutshift)/dxout+0.5)
    100101      do k=1,nspec
    101102        do ix=ix1,ix2-1
     
    145146  if ((kzave.le.numzgrid).and.(ixave.ge.0).and. &
    146147       (ixave.le.numxgrid-1)) then
    147     jy1=int((yold*dy+youtshift)/dyout+0.5)
    148     jy2=int((ytra1(jpart)*dy+youtshift)/dyout+0.5)
     148    jy1=int((yold*dy+youtshift)/dyout)         ! flux throught the southern boundary (sec)
     149    jy2=int((ytra1(jpart)*dy+youtshift)/dyout) ! flux throught the southern boundary (sec)
     150!    jy1=int((yold*dy+youtshift)/dyout+0.5)
     151!    jy2=int((ytra1(jpart)*dy+youtshift)/dyout+0.5)
    149152
    150153    do k=1,nspec
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG