Ignore:
Timestamp:
Oct 15, 2018 2:21:08 PM (6 years ago)
Author:
suehring
Message:

Offline nesting revised and separated from large_scale_forcing_mod; Time-dependent synthetic turbulence generator; bugfixes in USM/LSM radiation model and init_pegrid

File:
1 edited

Legend:

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

    r3298 r3347  
    2525! -----------------
    2626! $Id$
     27! - offline nesting separated from large-scale forcing module
     28! - changes for synthetic turbulence generator
     29!
     30! 3343 2018-10-15 10:38:52Z suehring
    2731! - Formatting, clean-up, comments (kanani)
    2832! - Added CALL to chem_emissions_setup (Russo)
     
    459463
    460464    USE lsf_nudging_mod,                                                       &
    461         ONLY:  calc_tnudge, ls_forcing_surf, ls_forcing_vert, nudge_ref,       &
    462                lsf_nesting_offline, lsf_nesting_offline_mass_conservation
     465        ONLY:  calc_tnudge, ls_forcing_surf, ls_forcing_vert, nudge_ref
    463466
    464467    USE multi_agent_system_mod,                                                &
    465468        ONLY:  agents_active, multi_agent_system
    466 
     469       
     470    USE nesting_offl_mod,                                                      &
     471        ONLY:  nesting_offl_bc, nesting_offl_mass_conservation
     472       
    467473    USE netcdf_data_input_mod,                                                 &
    468         ONLY:  chem_emis, chem_emis_att, nest_offl, netcdf_data_input_lsf
     474        ONLY:  chem_emis, chem_emis_att, nest_offl,                            &
     475               netcdf_data_input_offline_nesting
    469476
    470477    USE ocean_mod,                                                             &
     
    515522
    516523    USE synthetic_turbulence_generator_mod,                                    &
    517         ONLY:  stg_main, use_syn_turb_gen
     524        ONLY:  dt_stg_call, dt_stg_adjust, parametrize_inflow_turbulence,      &
     525               stg_adjust, stg_main, time_stg_adjust, time_stg_call,           &
     526               use_syn_turb_gen
    518527
    519528    USE user_actions_mod,                                                      &
     
    638647       IF ( nesting_offline )  THEN
    639648          IF ( nest_offl%time(nest_offl%tind_p) <= time_since_reference_point )&
    640              CALL netcdf_data_input_lsf
     649             CALL netcdf_data_input_offline_nesting
    641650       ENDIF
    642651
     
    918927!--       Impose a turbulent inflow using the recycling method
    919928          IF ( turbulent_inflow )  CALL  inflow_turbulence
    920 
    921 !
    922 !--       Impose a turbulent inflow using synthetic generated turbulence
    923           IF ( use_syn_turb_gen )  CALL  stg_main
    924929
    925930!
     
    960965!--       boundaries.
    961966          IF ( nesting_offline  .AND.  intermediate_timestep_count ==          &
    962                                        intermediate_timestep_count_max  )  THEN
    963              CALL lsf_nesting_offline
    964 !
    965 !--          Moreover, ensure mass conservation
    966              CALL lsf_nesting_offline_mass_conservation
    967           ENDIF
    968 
     967                                       intermediate_timestep_count_max  )      &
     968             CALL nesting_offl_bc
     969!
     970!--       Impose a turbulent inflow using synthetic generated turbulence,
     971!--       only once per time step.
     972          IF ( use_syn_turb_gen  .AND.  time_stg_call >= dt_stg_call  .AND.    &
     973             intermediate_timestep_count == intermediate_timestep_count_max )  THEN! &
     974             CALL stg_main
     975          ENDIF
     976!
     977!--       Ensure mass conservation. This need to be done after imposing
     978!--       synthetic turbulence and top boundary condition for pressure is set to
     979!--       Neumann conditions.
     980!--       Is this also required in case of Dirichlet?
     981          IF ( nesting_offline )  CALL nesting_offl_mass_conservation
    969982!
    970983!--       Reduce the velocity divergence via the equation for perturbation
     
    12131226       time_dopr_listing          = time_dopr_listing        + dt_3d
    12141227       time_run_control   = time_run_control + dt_3d
     1228!
     1229!--    In case of synthetic turbulence generation and parametrized turbulence
     1230!--    information, update the time counter and if required, adjust the
     1231!--    STG to new atmospheric conditions.
     1232       IF ( use_syn_turb_gen  )  THEN
     1233          IF ( parametrize_inflow_turbulence )  THEN
     1234             time_stg_adjust = time_stg_adjust + dt_3d
     1235             IF ( time_stg_adjust >= dt_stg_adjust )  CALL stg_adjust
     1236          ENDIF
     1237          time_stg_call = time_stg_call + dt_3d
     1238       ENDIF
    12151239
    12161240!
     
    14721496
    14731497    ENDDO   ! time loop
    1474 
     1498   
     1499!
    14751500!-- Vertical nesting: Deallocate variables initialized for vertical nesting   
    14761501    IF ( vnest_init )  CALL vnest_deallocate
Note: See TracChangeset for help on using the changeset viewer.