Changeset 2934 for palm/trunk/SOURCE


Ignore:
Timestamp:
Mar 26, 2018 7:13:22 PM (7 years ago)
Author:
suehring
Message:

Synchronize parent and child model after initialization and spinup phase; Check for consistent setting of spinup times in parent and child model; remove obsolete masking of tendency arrays during initialization

Location:
palm/trunk/SOURCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r2921 r2934  
    2525# -----------------
    2626# $Id$
     27# Added dependencies for parent and child synchronization
     28#
     29# 2921 2018-03-22 15:05:23Z Giersch
    2730# date_and_time_mod dependency has been added to read/write_restart_data_mod
    2831#
     
    939942        netcdf_interface_mod.o \
    940943        plant_canopy_model_mod.o \
     944        pmc_interface_mod.o \
    941945        radiation_model_mod.o \
    942946        random_function_mod.o \
     
    14721476        mod_kinds.o \
    14731477        modules.o \
     1478        pmc_interface_mod.o \
    14741479        radiation_model_mod.o \
    14751480        surface_layer_fluxes_mod.o \
  • palm/trunk/SOURCE/check_parameters.f90

    r2932 r2934  
    2525! -----------------
    2626! $Id$
     27! Check spinup in case of nested runs, spinup time and timestep must be
     28! identical to assure synchronuous simulations.
     29!
     30! 2932 2018-03-26 09:39:22Z maronga
    2731! renamed particles_par to particle_parameters
    2832!
     
    703707    LOGICAL     ::  found                            !<
    704708
     709    REAL(wp)    ::  dt_spinup_max                    !< maximum spinup timestep in nested domains
    705710    REAL(wp)    ::  dum                              !<
    706711    REAL(wp)    ::  gradient                         !<
    707712    REAL(wp)    ::  remote = 0.0_wp                  !<
     713    REAL(wp)    ::  spinup_time_max                  !< maximum spinup time in nested domains
    708714    REAL(wp)    ::  time_to_be_simulated_from_reference_point  !<
    709715
     
    13971403#endif
    13981404    ENDIF
     1405!
     1406!-- In case of spinup and nested run, spinup end time must be identical
     1407!-- in order to have synchronously running simulations.
     1408    IF ( nested_run  .AND.  spinup )  THEN
     1409#if defined( __parallel )
     1410       CALL MPI_ALLREDUCE( spinup_time, spinup_time_max, 1, MPI_REAL,          &
     1411                           MPI_MAX, MPI_COMM_WORLD, ierr )
     1412       CALL MPI_ALLREDUCE( dt_spinup,   dt_spinup_max,   1, MPI_REAL,          &
     1413                           MPI_MAX, MPI_COMM_WORLD, ierr )
     1414
     1415       IF ( spinup_time /= spinup_time_max  .OR.  dt_spinup /= dt_spinup_max ) &
     1416       THEN
     1417          message_string = 'In case of nesting, spinup_time and ' //           &
     1418                           'dt_spinup must be identical in all parent ' //     &
     1419                           'and child domains.'
     1420          CALL message( 'check_parameters', 'PA0489', 3, 2, 0, 6, 0 )
     1421       ENDIF
     1422#endif
     1423    ENDIF
    13991424
    14001425    IF ( cloud_physics  .AND.  .NOT.  humidity )  THEN
  • palm/trunk/SOURCE/init_3d_model.f90

    r2920 r2934  
    2525! -----------------
    2626! $Id$
     27! Synchronize parent and child models after initialization.
     28! Remove obsolete masking of topography grid points for Runge-Kutta weighted
     29! tendency arrays.
     30!
     31! 2920 2018-03-22 11:22:01Z kanani
    2732! Add call for precalculating apparent solar positions (moh.hefny)
    2833!
     
    492497    USE plant_canopy_model_mod,                                                &
    493498        ONLY:  pcm_init
     499
     500    USE pmc_interface,                                                         &
     501        ONLY:  nested_run
    494502
    495503    USE radiation_model_mod,                                                   &
     
    18321840                   w(k,j,i)     = MERGE( w(k,j,i), 0.0_wp,                     &
    18331841                                         BTEST( wall_flags_0(k,j,i), 3 ) )
    1834                    tu_m(k,j,i)  = MERGE( tu_m(k,j,i), 0.0_wp,                  &
    1835                                          BTEST( wall_flags_0(k,j,i), 1 ) )
    1836                    tv_m(k,j,i)  = MERGE( tv_m(k,j,i), 0.0_wp,                  &
    1837                                          BTEST( wall_flags_0(k,j,i), 2 ) )
    1838                    tw_m(k,j,i)  = MERGE( tw_m(k,j,i), 0.0_wp,                  &
    1839                                          BTEST( wall_flags_0(k,j,i), 3 ) )
    1840                    tpt_m(k,j,i) = MERGE( tpt_m(k,j,i), 0.0_wp,                 &
    1841                                          BTEST( wall_flags_0(k,j,i), 0 ) )
    18421842                ENDDO
    18431843             ENDDO
     
    25652565!-- after call of user_init!
    25662566    CALL close_file( 13 )
     2567!
     2568!-- In case of nesting, put an barrier to assure that all parent and child
     2569!-- domains finished initialization.
     2570#if defined( __parallel )
     2571    IF ( nested_run )  CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
     2572#endif
     2573
    25672574
    25682575    CALL location_message( 'leaving init_3d_model', .TRUE. )
  • palm/trunk/SOURCE/time_integration.f90

    r2817 r2934  
    2525! -----------------
    2626! $Id$
     27! Little formatting adjustment.
     28!
     29! 2817 2018-02-19 16:32:21Z knoop
    2730! Preliminary gust module interface implemented
    2831!
     
    481484!-- At beginning determine the first time step
    482485    CALL timestep
    483 
    484486!
    485487!-- Synchronize the timestep in case of nested run.
     
    497499    IF ( simulated_time == 0.0_wp )  CALL flow_statistics
    498500    CALL run_control
    499 
    500501!
    501502!-- Data exchange between coupled models in case that a call has been omitted
     
    819820!
    820821!--       Impose a turbulent inflow using synthetic generated turbulence
    821          IF ( use_syn_turb_gen ) THEN
    822             CALL  stg_main
    823          ENDIF
     822          IF ( use_syn_turb_gen ) THEN
     823             CALL  stg_main
     824          ENDIF
    824825
    825826!
  • palm/trunk/SOURCE/time_integration_spinup.f90

    r2881 r2934  
    2525! -----------------
    2626! $Id$
     27! Synchronize parent and child models after spinup.
     28!
     29! 2881 2018-03-13 16:24:40Z maronga
    2730! Added flag for switching on/off calculation of soil moisture
    2831!
     
    117120        ONLY:  lsm_energy_balance, lsm_soil_model, lsm_swap_timelevel
    118121
    119     USE pegrid,                                                                &
    120         ONLY:  myid
     122    USE pegrid
     123
     124    USE pmc_interface,                                                         &
     125        ONLY:  nested_run
    121126
    122127    USE kinds
     
    551556    DEALLOCATE(v_save)
    552557
     558#if defined( __parallel )
     559    IF ( nested_run )  CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
     560#endif
     561
    553562    CALL location_message( 'finished spinup-sequence', .TRUE. )
    554563
Note: See TracChangeset for help on using the changeset viewer.