Changeset 680


Ignore:
Timestamp:
Feb 4, 2011 11:16:06 PM (13 years ago)
Author:
gryschka
Message:

message string

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

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

    r674 r680  
    677677    ENDIF
    678678
     679    IF ( TRIM( initializing_actions ) == 'initialize_vortex' .AND. &
     680         conserve_volume_flow ) THEN
     681         message_string = 'initializing_actions = "initialize_vortex"' // &
     682                        ' ist not allowed with conserve_volume_flow = .T.'
     683       CALL message( 'check_parameters', 'PA0343', 1, 2, 0, 6, 0 )
     684    ENDIF       
     685
     686
    679687    IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0  .AND. &
    680688         INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
  • palm/trunk/SOURCE/init_3d_model.f90

    r674 r680  
    77! Current revisions:
    88! -----------------
     9!
     10! gryschka
     11! bugfix: volume_flow_control
    912!
    1013! Former revisions:
     
    881884
    882885!
    883 !--    Impose random perturbation on the horizontal velocity field and then
    884 !--    remove the divergences from the velocity field
    885        IF ( create_disturbances )  THEN
    886           CALL disturb_field( nzb_u_inner, tend, u )
    887           CALL disturb_field( nzb_v_inner, tend, v )
    888           n_sor = nsor_ini
    889           CALL pres
    890           n_sor = nsor
    891        ENDIF
    892 
    893 !
    894886!--    Once again set the perturbation pressure explicitly to zero in order to
    895887!--    assure that it does not generate any divergences in the first time step.
     
    11161108       
    11171109    ENDIF
     1110
    11181111!
    11191112!-- Calculate the initial volume flow at the right and north boundary
     
    11701163
    11711164#if defined( __parallel )
    1172           CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),&
    1173                               2, MPI_REAL, MPI_SUM, comm2d, ierr )
    1174           CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1),      &
    1175                               2, MPI_REAL, MPI_SUM, comm2d, ierr )
    1176 
    1177           CALL MPI_ALLREDUCE( volume_flow_initial_l(2), volume_flow_initial(2),&
    1178                               2, MPI_REAL, MPI_SUM, comm2d, ierr )
    1179           CALL MPI_ALLREDUCE( volume_flow_area_l(2), volume_flow_area(2),      &
    1180                               2, MPI_REAL, MPI_SUM, comm2d, ierr )
     1165       CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),&
     1166                           2, MPI_REAL, MPI_SUM, comm2d, ierr )
     1167       CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1),      &
     1168                           2, MPI_REAL, MPI_SUM, comm2d, ierr )
    11811169
    11821170#else
    1183           volume_flow_initial = volume_flow_initial_l
    1184           volume_flow_area    = volume_flow_area_l
     1171       volume_flow_initial = volume_flow_initial_l
     1172       volume_flow_area    = volume_flow_area_l
    11851173#endif 
    11861174
     
    11881176!--       In case of 'bulk_velocity' mode, volume_flow_initial is overridden
    11891177!--       and calculated from u|v_bulk instead.
    1190           IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
    1191              volume_flow_initial(1) = u_bulk * volume_flow_area(1)
    1192              volume_flow_initial(2) = v_bulk * volume_flow_area(2)
    1193           ENDIF
    1194 
    1195        ENDIF
     1178       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
     1179          volume_flow_initial(1) = u_bulk * volume_flow_area(1)
     1180          volume_flow_initial(2) = v_bulk * volume_flow_area(2)
     1181       ENDIF
     1182
     1183    ENDIF
     1184
     1185
     1186!
     1187!-- Impose random perturbation on the horizontal velocity field and then
     1188!-- remove the divergences from the velocity field at the initial stage
     1189    IF ( create_disturbances .AND. &
     1190         TRIM( initializing_actions ) /= 'read_restart_data'  .AND.  &
     1191         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
     1192
     1193       CALL disturb_field( nzb_u_inner, tend, u )
     1194       CALL disturb_field( nzb_v_inner, tend, v )
     1195       n_sor = nsor_ini
     1196       CALL pres
     1197       n_sor = nsor
     1198    ENDIF
     1199
    11961200!
    11971201!-- Initialization of the leaf area density
    1198     IF ( plant_canopy ) THEN
     1202     IF ( plant_canopy ) THEN
    11991203 
    12001204       SELECT CASE ( TRIM( canopy_mode ) )
  • palm/trunk/SOURCE/pres.f90

    r676 r680  
    44! Current revisions:
    55! -----------------
     6!
     7! gryschka
     8! bugfix in case of collective_wait
    69!
    710! Former revisions:
     
    118121!
    119122!-- Left/right
     123
    120124    IF ( conserve_volume_flow  .AND.  ( outflow_l  .OR. outflow_r ) )  THEN
    121125
     
    138142
    139143#if defined( __parallel )   
    140        IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     144       IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
    141145       CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 1, MPI_REAL, &
    142146                           MPI_SUM, comm1dy, ierr )   
     
    177181
    178182#if defined( __parallel )   
    179        IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     183       IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
    180184       CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL, &
    181185                           MPI_SUM, comm1dx, ierr )   
     
    547551       
    548552    ENDIF
    549 
     553print*, "cc"
    550554!
    551555!-- Correction of the provisional velocities with the current perturbation
     
    648652    ENDIF
    649653
     654
    650655!
    651656!-- Conserve the volume flow
Note: See TracChangeset for help on using the changeset viewer.