Changeset a7167e4 in flexpart.git for src/calcfluxes.f90


Ignore:
Timestamp:
Sep 9, 2020, 10:29:08 AM (4 years ago)
Author:
Sabine <sabine.eckhardt@…>
Branches:
dev
Children:
03adec6
Parents:
969c1fe
Message:

bugfix: netcdffluxfield init, flux through upper, southern and western boundary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/calcfluxes.f90

    r3481cc1 ra7167e4  
    6161       (jyave.le.numygrid-1)) then
    6262    do kz=1,numzgrid                ! determine height of cell
    63       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
    6465    end do
    656611   k1=min(numzgrid,kz)
    6667    do kz=1,numzgrid                ! determine height of cell
    67       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
    6870    end do
    697121   k2=min(numzgrid,kz)
     
    9395
    9496    if (abs(xold-xtra1(jpart)).lt.real(nx)/2.) then
    95       ix1=int((xold*dx+xoutshift)/dxout+0.5)
    96       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)
    97101      do k=1,nspec
    98102        do ix=ix1,ix2-1
     
    142146  if ((kzave.le.numzgrid).and.(ixave.ge.0).and. &
    143147       (ixave.le.numxgrid-1)) then
    144     jy1=int((yold*dy+youtshift)/dyout+0.5)
    145     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)
    146152
    147153    do k=1,nspec
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG