Changeset 7725d96 in flexpart.git


Ignore:
Timestamp:
Jan 26, 2017, 3:12:36 PM (7 years ago)
Author:
Sabine <sabine.eckhardt@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
420423c
Parents:
6481010
Message:

code included to interpolate hmix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/advance.f90

    r0ee2193 r7725d96  
    117117  real :: usigold,vsigold,wsigold,r,rs
    118118  real :: uold,vold,wold,vdepo(maxspec)
     119  real :: h1(2)
    119120  !real uprof(nzmax),vprof(nzmax),wprof(nzmax)
    120121  !real usigprof(nzmax),vsigprof(nzmax),wsigprof(nzmax)
     
    223224
    224225
     226 ! Determine the lower left corner and its distance to the current position
     227  !*************************************************************************
     228
     229  ddx=xt-real(ix)
     230  ddy=yt-real(jy)
     231  rddx=1.-ddx
     232  rddy=1.-ddy
     233  p1=rddx*rddy
     234  p2=ddx*rddy
     235  p3=rddx*ddy
     236  p4=ddx*ddy
     237
     238 ! Calculate variables for time interpolation
     239  !*******************************************
     240
     241  dt1=real(itime-memtime(1))
     242  dt2=real(memtime(2)-itime)
     243  dtt=1./(dt1+dt2)
     244
    225245  ! Compute maximum mixing height around particle position
    226246  !*******************************************************
     
    230250    do k=1,2
    231251      mind=memind(k) ! eso: compatibility with 3-field version
    232       do j=jy,jyp
    233         do i=ix,ixp
    234           if (hmix(i,j,1,mind).gt.h) h=hmix(i,j,1,mind)
    235         end do
    236       end do
     252!      do j=jy,jyp
     253!       do i=ix,ixp
     254!          if (hmix(i,j,1,mind).gt.h) h=hmix(i,j,1,mind)
     255           h1(k)=p1*hmix(ix ,jy ,1,mind) &
     256         + p2*hmix(ixp,jy ,1,mind) &
     257         + p3*hmix(ix ,jyp,1,mind) &
     258         + p4*hmix(ixp,jyp,1,mind)
     259
     260!       end do
     261!     end do
    237262    end do
    238263    tropop=tropopause(nix,njy,1,1)
     
    249274  endif
    250275
     276  h=(h1(1)*dt2+h1(2)*dt1)*dtt
    251277  zeta=zt/h
    252278
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG