Changeset a7167e4 in flexpart.git


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

Location:
src
Files:
2 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
  • src/netcdf_output_mod.f90

    • Property mode changed from 100644 to 100755
    r11d86e7 ra7167e4  
    16551655  call nf90_err(nf90_close(ncid))
    16561656
     1657  ! Reinitialization of grid
     1658  !*************************
     1659
     1660  do ks=1,nspec
     1661    do kp=1,maxpointspec_act
     1662      do jy=0,numygrid-1
     1663        do ix=0,numxgrid-1
     1664          do kz=1,numzgrid
     1665            do nage=1,nageclass
     1666              do i=1,6
     1667                flux(i,ix,jy,kz,ks,kp,nage)=0.
     1668              end do
     1669            end do
     1670          end do
     1671        end do
     1672      end do
     1673    end do
     1674  end do
     1675
     1676
    16571677end subroutine fluxoutput_netcdf
    16581678
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG