Changeset 4071


Ignore:
Timestamp:
Jul 3, 2019 8:02:00 PM (5 years ago)
Author:
suehring
Message:

Bugfix in synthetic turbulence generator in non-nested cases (offline or self nesting) when no cyclic fill is used: in order to get correct initial inflow profiles at the left boundary the array mean_inflow_profiles need to be initialized accordingly.

File:
1 edited

Legend:

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

    r4022 r4071  
    2525! -----------------
    2626! $Id$
     27! Bugfix, initialize mean_inflow_profiles in case turbulence and inflow
     28! information is not read from file.
     29!
     30! 4022 2019-06-12 11:52:39Z suehring
    2731! Several bugfixes and improvements
    2832! - revise bias correction of the imposed perturbations (correction via volume
     
    224228               mean_inflow_profiles,                                           &
    225229               q,                                                              &
    226                pt,                                                             &
     230               q_init,                                                         &
     231               pt,                                                             &
     232               pt_init,                                                        &
    227233               u,                                                              &
    228234               u_init,                                                         &
     
    246252               dt_3d,                                                          &
    247253               e_init,                                                         &
     254               humidity,                                                       &
    248255               initializing_actions,                                           &
    249256               intermediate_timestep_count,                                    &
     
    252259               message_string,                                                 &
    253260               nesting_offline,                                                &
     261               neutral,                                                        &
    254262               num_mean_inflow_profiles,                                       &
    255263               rans_mode,                                                      &
     
    757765    CALL RANDOM_SEED(put=seed)
    758766!
    759 !-- Allocate required arrays
    760 !-- mean_inflow profiles must not be allocated in offline nesting
     767!-- Allocate required arrays.
     768!-- In case no offline nesting or self nesting is used, the arrary
     769!-- mean_inflow profiles is required. Check if it is already allocated, else
     770!-- allocate and initialize it appropriately. Note, in case turbulence and
     771!-- inflow information is read from file, mean_inflow_profiles is already
     772!-- allocated and initialized appropriately.
    761773    IF ( .NOT. nesting_offline  .AND.  .NOT.  child_domain )  THEN
    762        IF ( .NOT. ALLOCATED( mean_inflow_profiles ) )                          &
     774       IF ( .NOT. ALLOCATED( mean_inflow_profiles ) )  THEN
    763775          ALLOCATE( mean_inflow_profiles(nzb:nzt+1,1:num_mean_inflow_profiles) )
     776          mean_inflow_profiles = 0.0_wp
     777          mean_inflow_profiles(:,1) = u_init
     778          mean_inflow_profiles(:,2) = v_init
     779!
     780!--       Even though potential temperature and humidity are not perturbed,
     781!--       they need to be initialized appropriately.
     782          IF ( .NOT. neutral )                                                 &
     783             mean_inflow_profiles(:,4) = pt_init
     784          IF ( humidity )                                                      &
     785             mean_inflow_profiles(:,6) = q_init       
     786       ENDIF   
    764787    ENDIF
    765788
Note: See TracChangeset for help on using the changeset viewer.