Changeset 4603 for palm/trunk


Ignore:
Timestamp:
Jul 14, 2020 4:08:30 PM (4 years ago)
Author:
suehring
Message:

Synthetic turbulence generator: Bugfix in initialization from ASCII file - x-length scales at the bottom boundary were not initialized properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90

    r4566 r4603  
    2020! Current revisions:
    2121! -----------------
    22 ! 
    23 ! 
     22!
     23!
    2424! Former revisions:
    2525! -----------------
    2626! $Id$
     27! Bugfix in initialization from ASCII file - x-length scales at the bottom boundary were not
     28! initialized properly
     29!
     30! 4566 2020-06-16 10:11:51Z suehring
    2731! - revise parametrization for reynolds-stress components, turbulent length- and time scales
    2832! - revise computation of velocity disturbances to be consistent to Xie and Castro (2008)
     
    813817       READ( 90, * )
    814818
    815        DO  k = nzb+1, nzt+1
     819       DO  k = nzb, nzt
    816820          READ( 90, * ) zz, luy, luz, tu(k), lvy, lvz, tv(k), lwy, lwz, tw(k), r11(k), r21(k),     &
    817821                        r22(k), r31(k), r32(k), r33(k), d1, d2, d3, d5
     
    819823!
    820824!--       Convert length scales from meter to number of grid points.
     825          IF ( k /= nzb )  THEN
     826             nuz(k) = INT( luz * ddzw(k) )
     827             nvz(k) = INT( lvz * ddzw(k) )
     828             nwz(k) = INT( lwz * ddzw(k) )
     829          ELSE
     830             nuz(k) = INT( luz * ddzw(k+1) )
     831             nvz(k) = INT( lvz * ddzw(k+1) )
     832             nwz(k) = INT( lwz * ddzw(k+1) )
     833          ENDIF
     834
    821835          nuy(k) = INT( luy * ddy )
    822           nuz(k) = INT( luz * ddzw(k) )
    823836          nvy(k) = INT( lvy * ddy )
    824           nvz(k) = INT( lvz * ddzw(k) )
    825837          nwy(k) = INT( lwy * ddy )
    826           nwz(k) = INT( lwz * ddzw(k) )
    827 !
    828 !--       Workaround, assume isotropic turbulence
     838!
     839!--       Set length scales in x-direction. As a workaround assume isotropic turbulence in x- and
     840!--       y-direction.
    829841          nwx(k) = nwy(k)
    830842          nvx(k) = nvy(k)
     
    840852       ENDDO
    841853!
    842 !--    Set lenght scales at surface grid point
     854!--    Set length scales at the surface and top boundary. At the surface the lengths scales are
     855!--    simply overwritten.
     856       nwx(nzb) = nwy(nzb+1)
     857       nvx(nzb) = nvy(nzb+1)
     858       nux(nzb) = nuy(nzb+1)
    843859       nuy(nzb) = nuy(nzb+1)
    844860       nuz(nzb) = nuz(nzb+1)
     
    848864       nwz(nzb) = nwz(nzb+1)
    849865
     866       nwx(nzt+1) = nwy(nzt)
     867       nvx(nzt+1) = nvy(nzt)
     868       nux(nzt+1) = nuy(nzt)
     869       nuy(nzt+1) = nuy(nzt)
     870       nuz(nzt+1) = nuz(nzt)
     871       nvy(nzt+1) = nvy(nzt)
     872       nvz(nzt+1) = nvz(nzt)
     873       nwy(nzt+1) = nwy(nzt)
     874       nwz(nzt+1) = nwz(nzt)
     875
    850876       CLOSE( 90 )
    851877!
     
    887913!-- Initial filter functions
    888914    CALL stg_setup_filter_function
    889 
    890915!
    891916!-- Allocate velocity seeds for turbulence at xz-layer
Note: See TracChangeset for help on using the changeset viewer.