Ignore:
Timestamp:
May 30, 2017 5:47:52 PM (4 years ago)
Author:
suehring
Message:

Adjustments according new topography and surface-modelling concept implemented

File:
1 edited

Legend:

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

    r2173 r2232  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Modify referenced parameter for disturb_field, instead of nzb_uv_inner, pass
     23! character to identify the respective grid (u- or v-grid).
     24! Set perturbations within topography to zero using flags.
    2325!
    2426! Former revisions:
     
    7072!> order in every case. The perturbation range is steered by dist_range.
    7173!------------------------------------------------------------------------------!
    72  SUBROUTINE disturb_field( nzb_uv_inner, dist1, field )
     74 SUBROUTINE disturb_field( var_char, dist1, field )
    7375 
    7476
    75     USE control_parameters,   &
     77    USE control_parameters,                                                    &
    7678        ONLY:  dist_nxl, dist_nxr, dist_nyn, dist_nys, dist_range,             &
    7779               disturbance_amplitude, disturbance_created,                     &
     
    8385       
    8486    USE indices,                                                               &
    85         ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
     87        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max, &
     88               nzt, wall_flags_0
    8689       
    8790    USE kinds
     
    9699    IMPLICIT NONE
    97100
    98     INTEGER(iwp) ::  i  !<
    99     INTEGER(iwp) ::  j  !<
    100     INTEGER(iwp) ::  k  !<
    101    
    102     INTEGER(iwp) ::  nzb_uv_inner(nysg:nyng,nxlg:nxrg) !<
     101    CHARACTER (LEN = *) ::  var_char !< flag to distinguish betwenn u- and v-component
     102
     103    INTEGER(iwp) ::  flag_nr !< number of respective flag for u- or v-grid
     104    INTEGER(iwp) ::  i       !< index variable
     105    INTEGER(iwp) ::  j       !< index variable
     106    INTEGER(iwp) ::  k       !< index variable
    103107
    104108    REAL(wp) ::  randomnumber  !<
     
    111115
    112116    CALL cpu_log( log_point(20), 'disturb_field', 'start' )
    113 
     117!
     118!-- Set flag number, 20 for u-grid, 21 for v-grid, required to mask topography
     119    flag_nr = MERGE( 20, 21, TRIM(var_char) == 'u' )
    114120!
    115121!-- Create an additional temporary array and initialize the arrays needed
     
    224230       DO  i = nxlg, nxrg
    225231          DO  j = nysg, nyng
    226              dist1(nzb:nzb_uv_inner(j,i)+1,j,i) = 0.0_wp
     232             DO  k = nzb, nzb_max
     233                dist1(k,j,i) = MERGE( dist1(k,j,i), 0.0_wp,                    &
     234                                      BTEST( wall_flags_0(k,j,i), flag_nr )    &
     235                                    )
     236             ENDDO
    227237          ENDDO
    228238       ENDDO
Note: See TracChangeset for help on using the changeset viewer.