Changeset 4238 for palm/trunk/SOURCE


Ignore:
Timestamp:
Sep 25, 2019 4:06:01 PM (22 months ago)
Author:
suehring
Message:

Building data base: Indoor-model parameters for some building types adjusted in order to avoid unrealistically high indoor temperatures (S. Rissmann); Indoor model: Bugfix in determination of minimum facade height and in location message, avoid divisions by zero, minor optimizations; radiation model: Modify check in order to avoid equality comparisons of floating points

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

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

    r4227 r4238  
    2626! -----------------
    2727! $Id$
     28! - Bugfix in determination of minimum facade height and in location message
     29! - Bugfix, avoid division by zero
     30! - Some optimization
     31!
     32! 4227 2019-09-10 18:04:34Z gronemeier
    2833! implement new palm_date_time_mod
    2934!
     
    469474                                                           !< on local subdomain
    470475
    471     CALL location_message( 'initializing indoor model', .FALSE. )
     476    CALL location_message( 'initializing indoor model', 'start' )
    472477!
    473478!-- Initializing of indoor model is only possible if buildings can be
     
    615620    ENDDO
    616621
    617     DO nb = 1, num_build
    618622#if defined( __parallel )
    619        CALL MPI_ALLREDUCE( k_min_l(nb), buildings(nb)%kb_min, 1, MPI_INTEGER,  &
    620                           MPI_MIN, comm2d, ierr )
    621        CALL MPI_ALLREDUCE( k_max_l(nb), buildings(nb)%kb_max, 1, MPI_INTEGER,  &
    622                           MPI_MAX, comm2d, ierr )
     623    CALL MPI_ALLREDUCE( k_min_l(:), buildings(:)%kb_min, num_build,            &
     624                        MPI_INTEGER, MPI_MIN, comm2d, ierr )
     625    CALL MPI_ALLREDUCE( k_max_l(:), buildings(:)%kb_max, num_build,            &
     626                        MPI_INTEGER, MPI_MAX, comm2d, ierr )
    623627#else
    624        buildings(nb)%kb_min = k_min_l(nb)
    625        buildings(nb)%kb_max = k_max_l(nb)
     628    buildings(:)%kb_min = k_min_l(:)
     629    buildings(:)%kb_max = k_max_l(:)
    626630#endif
    627 
    628     ENDDO
    629631
    630632    DEALLOCATE( k_min_l )
     
    746748    ENDDO
    747749!
    748 !-- Vertical facades!
     750!-- Vertical facades
    749751    buildings(:)%num_facades_per_building_v_l = 0
    750752    DO  l = 0, 3
     
    842844       ENDIF
    843845!
    844 ! --    Determine volume per facade element (vpf)
     846!--    Determine volume per facade element (vpf)
    845847       IF ( buildings(nb)%on_pe )  THEN
    846848          ALLOCATE( buildings(nb)%vpf(buildings(nb)%kb_min:buildings(nb)%kb_max) )
     849          buildings(nb)%vpf = 0.0_wp
    847850         
    848851          DO  k = buildings(nb)%kb_min, buildings(nb)%kb_max
    849              buildings(nb)%vpf(k) = buildings(nb)%volume(k) /                  &
     852!
     853!--          In order to avoid division by zero, check if the number of facade
     854!--          elements is /= 0. This can e.g. happen if a building is embedded
     855!--          in higher terrain and at a given k-level neither horizontal nor
     856!--          vertical facade elements are located.
     857             IF ( buildings(nb)%num_facade_h(k)                                &
     858                + buildings(nb)%num_facade_v(k) > 0 )  THEN 
     859                buildings(nb)%vpf(k) = buildings(nb)%volume(k) /               &
    850860                                REAL( buildings(nb)%num_facade_h(k) +          &
    851861                                      buildings(nb)%num_facade_v(k), KIND = wp )
     862             ENDIF
    852863          ENDDO
    853864       ENDIF
     
    10371048    ENDDO
    10381049
    1039     CALL location_message( 'finished', .TRUE. )
     1050    CALL location_message( 'initializing indoor model', 'finished' )
    10401051
    10411052 END SUBROUTINE im_init
     
    17901801           IF ( av == 0 ) THEN
    17911802              DO  m = 1, surf_usm_h%ns
    1792                   i = surf_usm_h%i(m) !+ surf_usm_h%ioff
    1793                   j = surf_usm_h%j(m) !+ surf_usm_h%joff
    1794                   k = surf_usm_h%k(m) !+ surf_usm_h%koff
    1795                   local_pf(i,j,k) = surf_usm_h%iwghf_eb(m)
     1803                 i = surf_usm_h%i(m) !+ surf_usm_h%ioff
     1804                 j = surf_usm_h%j(m) !+ surf_usm_h%joff
     1805                 k = surf_usm_h%k(m) !+ surf_usm_h%koff
     1806                 local_pf(i,j,k) = surf_usm_h%iwghf_eb(m)
    17961807              ENDDO
    17971808           ENDIF
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r4227 r4238  
    2828! -----------------
    2929! $Id$
     30! Modify check in order to avoid equality comparisons of floating points
     31!
     32! 4227 2019-09-10 18:04:34Z gronemeier
    3033! implement new palm_date_time_mod
    3134!
     
    26532656          CALL get_date_time( 0.0_wp, second_of_day=second_of_day )
    26542657
    2655           IF ( time_rad_f%var1d(0) /= second_of_day )  THEN
     2658          IF ( ABS( time_rad_f%var1d(0) - second_of_day ) > 1E-6_wp )  THEN
    26562659             message_string = 'External radiation forcing: first point in ' // &
    26572660                              'time is /= origin_date_time.'
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r4230 r4238  
    2828! -----------------
    2929! $Id$
     30! Indoor-model parameters for some building types adjusted in order to avoid
     31! unrealistically high indoor temperatures (S. Rissmann)
     32!
     33! 4230 2019-09-11 13:58:14Z suehring
    3034! Bugfix, initialize canopy resistance. Even if no green fraction is set,
    3135! r_canopy must be initialized for output purposes.
     
    50195023                                       surf_usm_h%ddz_wall_stag(nzb_wall,m)
    50205024!
    5021 !-- if indoor model ist used inner wall layer is calculated by using iwghf (indoor wall ground heat flux)
     5025!-- if indoor model is used inner wall layer is calculated by using iwghf (indoor wall ground heat flux)
    50225026           IF ( indoor_model ) THEN
    50235027              DO  kw = nzb_wall+1, nzt_wall-1
     
    89458949           0.001_wp,       &  !< parameter 18  - z0 roughness above ground floor level
    89468950           0.0001_wp,      &  !< parameter 19  - z0h/z0g roughness heat/humidity above ground floor level
    8947            4.0_wp,         &  !< parameter 20  - ground floor level height
     8951           3.0_wp,         &  !< parameter 20  - ground floor level height
    89488952           0.75_wp,        &  !< parameter 21  - wall fraction ground floor level
    89498953           0.25_wp,        &  !< parameter 22  - window fraction ground floor level
     
    90469050           0.8_wp,         &  !< parameter 119 - shading factor
    90479051           0.5_wp,         &  !< parameter 120 - g-value windows
    9048            0.6_wp,         &  !< parameter 121 - u-value windows
     9052           2.5_wp,         &  !< parameter 121 - u-value windows
    90499053           0.1_wp,         &  !< parameter 122 - basical airflow without occupancy of the room
    90509054           0.5_wp,         &  !< parameter 123 - additional airflow depend of occupancy of the room
     
    90599063           3.0_wp,         &  !< parameter 132 - storey height
    90609064           0.2_wp,         &  !< parameter 133 - ceiling construction height
    9061            0.1_wp,         &  !< parameter 134 - anthropogenic heat output for heating
    9062            1.333_wp        &  !< parameter 135 - anthropogenic heat output for cooling
    9063                             /)  
     9065           -2.0_wp,        &  !< parameter 134 - anthropogenic heat output for heating
     9066           1.25_wp         &  !< parameter 135 - anthropogenic heat output for cooling
     9067                            /)
    90649068                           
    90659069        building_pars(:,4) = (/   &
     
    94639467           0.8_wp,         &  !< parameter 119 - shading factor
    94649468           0.5_wp,         &  !< parameter 120 - g-value windows
    9465            0.6_wp,         &  !< parameter 121 - u-value windows
     9469           2.5_wp,         &  !< parameter 121 - u-value windows
    94669470           0.1_wp,         &  !< parameter 122 - basical airflow without occupancy of the room
    94679471           1.5_wp,         &  !< parameter 123 - additional airflow depend of occupancy of the room
Note: See TracChangeset for help on using the changeset viewer.