Ignore:
Timestamp:
Mar 21, 2018 3:52:14 PM (4 years ago)
Author:
gronemeier
Message:

moved initialization of mixing length to turbulence_closure_mod; consider walls in calculation of ml in rans-mode

Location:
palm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk

  • palm/trunk/SOURCE

  • palm/trunk/SOURCE/model_1d_mod.f90

    r2718 r2918  
    2525! -----------------
    2626! $Id$
     27! - rename l_black into l1d_init
     28! - calculate l_grid within init_1d_model and save it as l1d_init
     29!
     30! 2718 2018-01-02 08:49:38Z maronga
    2731! Corrected "Former revisions" section
    2832!
     
    128132!> @todo harmonize code with new surface_layer_fluxes module
    129133!> @bug 1D model crashes when using small grid spacings in the order of 1 m
     134!> @fixme option "as_in_3d_model" seems to eb an inappropriate option because
     135!>        the 1D model uses different turbulence closure approaches at least if
     136!>        the 3D model is set to LES-mode.
    130137!------------------------------------------------------------------------------!
    131138 MODULE model_1d_mod
    132139
    133140    USE arrays_3d,                                                             &
    134         ONLY:  dd2zu, ddzu, ddzw, dzu, l_grid, pt_init, q_init, ug, u_init,    &
     141        ONLY:  dd2zu, ddzu, ddzw, dzu, dzw, pt_init, q_init, ug, u_init,       &
    135142               vg, v_init, zu
    136143   
     
    190197    REAL(wp), DIMENSION(:), ALLOCATABLE ::  kh1d     !< turbulent diffusion coefficient for heat (1d-model)
    191198    REAL(wp), DIMENSION(:), ALLOCATABLE ::  km1d     !< turbulent diffusion coefficient for momentum (1d-model)
    192     REAL(wp), DIMENSION(:), ALLOCATABLE ::  l_black  !< mixing length Blackadar (1d-model)
    193199    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d      !< mixing length for turbulent diffusion coefficients (1d-model)
     200    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d_init !< initial mixing length (1d-model)
    194201    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d_diss !< mixing length for dissipation (1d-model)
    195202    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rif1d    !< Richardson flux number (1d-model)
     
    255262 SUBROUTINE init_1d_model
    256263 
     264    USE grid_variables,                                                        &
     265        ONLY:  dx, dy
     266
    257267    IMPLICIT NONE
    258268
     
    267277    ALLOCATE( diss1d(nzb:nzt+1), diss1d_p(nzb:nzt+1),                          &
    268278              e1d(nzb:nzt+1), e1d_p(nzb:nzt+1), kh1d(nzb:nzt+1),               &
    269               km1d(nzb:nzt+1), l_black(nzb:nzt+1), l1d(nzb:nzt+1),             &
     279              km1d(nzb:nzt+1), l1d(nzb:nzt+1), l1d_init(nzb:nzt+1),            &
    270280              l1d_diss(nzb:nzt+1), rif1d(nzb:nzt+1), te_diss(nzb:nzt+1),       &
    271281              te_dissm(nzb:nzt+1), te_e(nzb:nzt+1),                            &
     
    286296!
    287297!--    Compute the mixing length
    288        l_black(nzb) = 0.0_wp
     298       l1d_init(nzb) = 0.0_wp
    289299
    290300       IF ( TRIM( mixing_length_1d ) == 'blackadar' )  THEN
     
    299309
    300310          DO  k = nzb+1, nzt+1
    301              l_black(k) = kappa * zu(k) / ( 1.0_wp + kappa * zu(k) / lambda )
     311             l1d_init(k) = kappa * zu(k) / ( 1.0_wp + kappa * zu(k) / lambda )
    302312          ENDDO
    303313
    304314       ELSEIF ( TRIM( mixing_length_1d ) == 'as_in_3d_model' )  THEN
    305315!
    306 !--       Use the same mixing length as in 3D model
    307           l_black(1:nzt) = l_grid
    308           l_black(nzt+1) = l_black(nzt)
     316!--       Use the same mixing length as in 3D model (LES-mode)
     317          !### TODO: rename (delete?) this option
     318          !###  As the mixing length is different between RANS and LES mode, it
     319          !###  must be distinguished here between these modes. For RANS mode,
     320          !###  the mixing length is calculated accoding to Blackadar, which is
     321          !###  the other option at this point.
     322          !###  Maybe delete this option entirely (not appropriate in LES case)
     323          !###  2018-03-20, gronemeier
     324          DO  k = nzb+1, nzt
     325             l1d_init(k)  = ( dx * dy * dzw(k) )**0.33333333333333_wp
     326          ENDDO
     327          l1d_init(nzt+1) = l1d_init(nzt)
    309328
    310329       ENDIF
    311330    ENDIF
    312     l1d      = l_black
    313     l1d_diss = l_black
     331    l1d      = l1d_init
     332    l1d_diss = l1d_init
    314333    u1d      = u_init
    315334    u1d_p    = u_init
     
    457476                   diss1d(k) = c_m**3 * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
    458477                ELSEIF ( dissipation_1d == 'as_in_3d_model' )  THEN
    459                    diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) /  l_grid(k) &
     478                   diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) / l1d_init(k) &
    460479                               ) * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
    461480                ENDIF
     
    520539                diss1d(k) = c_m**3 * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
    521540             ELSEIF ( dissipation_1d == 'as_in_3d_model' )  THEN
    522                 diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) / l_grid(k) )    &
     541                diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) / l1d_init(k) )  &
    523542                            * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
    524543             ENDIF
     
    804823                DO  k = nzb+1, nzt
    805824                   IF ( rif1d(k) >= 0.0_wp )  THEN
    806                       l1d(k) = l_black(k) / ( 1.0_wp + 5.0_wp * rif1d(k) )
     825                      l1d(k) = l1d_init(k) / ( 1.0_wp + 5.0_wp * rif1d(k) )
    807826                      l1d_diss(k) = l1d(k)
    808827                   ELSE
    809                       l1d(k) = l_black(k)
    810                       l1d_diss(k) = l_black(k) *                               &
     828                      l1d(k) = l1d_init(k)
     829                      l1d_diss(k) = l1d_init(k) *                              &
    811830                                    SQRT( 1.0_wp - 16.0_wp * rif1d(k) )
    812831                   ENDIF
     
    819838                                     SQRT( g / pt_init(k) * dpt_dz ) + 1E-5_wp
    820839                   ELSE
    821                       l_stable = l_grid(k)
     840                      l_stable = l1d_init(k)
    822841                   ENDIF
    823                    l1d(k) = MIN( l_grid(k), l_stable )
     842                   l1d(k) = MIN( l1d_init(k), l_stable )
    824843                   l1d_diss(k) = l1d(k)
    825844                ENDDO
Note: See TracChangeset for help on using the changeset viewer.