Changeset 2765 for palm/trunk


Ignore:
Timestamp:
Jan 22, 2018 11:34:58 AM (7 years ago)
Author:
maronga
Message:

major bugfix in calculation of aerodynamic resistance for vertical surface elements

Location:
palm/trunk/SOURCE
Files:
4 edited

Legend:

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

    r2746 r2765  
    2525! -----------------
    2626! $Id$
     27! Renamed simulation_time_since_reference to
     28! time_to_be_simulated_from_reference_point
     29!
     30! 2746 2018-01-15 12:06:04Z suehring
    2731! Move flag plant canopy to modules
    2832!
     
    666670    REAL(wp)    ::  gradient                         !<
    667671    REAL(wp)    ::  remote = 0.0_wp                  !<
    668     REAL(wp)    ::  simulation_time_since_reference  !<
     672    REAL(wp)    ::  time_to_be_simulated_from_reference_point  !<
    669673
    670674
     
    774778       ENDIF
    775779
    776        simulation_time_since_reference = end_time - coupling_start_time
     780       time_to_be_simulated_from_reference_point = end_time-coupling_start_time
    777781
    778782       IF  ( myid == 0 ) THEN
    779           CALL MPI_SEND( simulation_time_since_reference, 1, MPI_REAL, target_id, &
    780                          14, comm_inter, ierr )
     783          CALL MPI_SEND( time_to_be_simulated_from_reference_point, 1,        &
     784                         MPI_REAL, target_id, 14, comm_inter, ierr )
    781785          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 14, comm_inter,       &
    782786                         status, ierr )
     
    784788       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    785789
    786        IF ( simulation_time_since_reference /= remote )  THEN
     790       IF ( time_to_be_simulated_from_reference_point /= remote )  THEN
    787791          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
    788                  '": simulation_time_since_reference = ',                      &
    789                  simulation_time_since_reference, '& is not equal to ',        &
    790                  'simulation_time_since_reference_remote = ', remote
     792                 '": time_to_be_simulated_from_reference_point = ',            &
     793                 time_to_be_simulated_from_reference_point, '& is not equal ', &
     794                 'to time_to_be_simulated_from_reference_point_remote = ',     &
     795                 remote
    791796          CALL message( 'check_parameters', 'PA0008', 1, 2, 0, 6, 0 )
    792797       ENDIF
  • palm/trunk/SOURCE/land_surface_model_mod.f90

    r2735 r2765  
    2525! -----------------
    2626! $Id$
     27! Major bugfix in calculation of f_shf for vertical surfaces
     28!
     29! 2735 2018-01-11 12:01:27Z suehring
    2730! output of r_a moved from land-surface to consider also urban-type surfaces
    2831!
     
    17701773!        ENDIF
    17711774!
    1772 !--    Calculate aerodynamical resistance. For horizontal and vertical
    1773 !--    surfaces MOST is applied. Moreover, for vertical surfaces, resistance
    1774 !--    can be obtain via parameterization of Mason (2000) /
    1775 !--    Krayenhoff and Voogt (2006).
     1775!--     Calculation of r_a for vertical surfaces
     1776!--
     1777!--     heat transfer coefficient for forced convection along vertical walls
     1778!--     follows formulation in TUF3d model (Krayenhoff & Voogt, 2006)
     1779!--           
     1780!--       H = httc (Tsfc - Tair)
     1781!--       httc = rw * (11.8 + 4.2 * Ueff) - 4.0
     1782!--           
     1783!--             rw: wall patch roughness relative to 1.0 for concrete
     1784!--             Ueff: effective wind speed
     1785!--             - 4.0 is a reduction of Rowley et al (1930) formulation based on
     1786!--             Cole and Sturrock (1977)
     1787!--           
     1788!--             Ucan: Canyon wind speed
     1789!--             wstar: convective velocity
     1790!--             Qs: surface heat flux
     1791!--             zH: height of the convective layer
     1792!--             wstar = (g/Tcan*Qs*zH)**(1./3.)
     1793               
     1794!--    Effective velocity components must always
     1795!--    be defined at scalar grid point. The wall normal component is
     1796!--    obtained by simple linear interpolation. ( An alternative would
     1797!--    be an logarithmic interpolation. )
     1798!--    A roughness lenght of 0.001 is assumed for concrete (the inverse,
     1799!--    1000 is used in the nominator for scaling)
    17761800!--    To do: detailed investigation which approach gives more reliable results!
    17771801!--    Please note, in case of very small friction velocity, e.g. in little
     
    17821806                             ( surf%ts(m) * surf%us(m) + 1.0E-20_wp ) )
    17831807       ELSE
    1784           surf%r_a(m) = 1.0_wp / ( 11.8_wp + 4.2_wp *                          &
     1808          surf%r_a(m) = rho_cp / ( surf%z0(m) * 1000.0_wp                      &
     1809                        * ( 11.8_wp + 4.2_wp *                                 &
    17851810                        SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + &
    17861811                                   ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + &
    17871812                                   ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2,  &
    17881813                              0.01_wp ) )                                      &
    1789                                  )
     1814                           )  - 4.0_wp  )
    17901815       ENDIF
    17911816!
  • palm/trunk/SOURCE/modules.f90

    r2746 r2765  
    2525! -----------------
    2626! $Id$
     27! Set initial value for time_since_reference_point
     28!
     29! 2746 2018-01-15 12:06:04Z suehring
    2730! +plant_canopy
    2831!
     
    14511454    REAL(wp) ::  time_restart = 9999999.9_wp                   !< time at which run shall be terminated and restarted
    14521455    REAL(wp) ::  time_run_control = 0.0_wp                     !< time since last RUN_CONTROL output
    1453     REAL(wp) ::  time_since_reference_point                    !< time after atmosphere-ocean coupling has been activated, or time after spinup phase of LSM has been finished
     1456    REAL(wp) ::  time_since_reference_point = 0.0_wp           !< time after atmosphere-ocean coupling has been activated, or time after spinup phase of LSM has been finished
    14541457    REAL(wp) ::  top_heatflux = 9999999.9_wp                   !< namelist parameter
    14551458    REAL(wp) ::  top_momentumflux_u = 9999999.9_wp             !< namelist parameter
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r2750 r2765  
    2626! -----------------
    2727! $Id$
     28! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in
     29! building_pars
     30!
     31! 2750 2018-01-15 16:26:51Z knoop
    2832! Move flag plant canopy to modules
    2933!
     
    388392        1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp,      & !parameter 6-11
    389393        296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp,                & !parameter 12-17
    390         0.01_wp, 0.001_wp, 4.0_wp,                                             & !parameter 18-20
     394        0.001_wp, 0.0001_wp, 4.0_wp,                                             & !parameter 18-20
    391395        1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp,                                & !parameter 21-25
    392396        1000000.0_wp, 1000000.0_wp, 1000000.0_wp,                              & !parameter 26-28                     
     
    399403        1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp,      & !parameter 6-11
    400404        296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp,                & !parameter 12-17
    401         0.01_wp, 0.001_wp, 4.0_wp,                                             & !parameter 18-20
     405        0.001_wp, 0.0001_wp, 4.0_wp,                                             & !parameter 18-20
    402406        1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp,                                & !parameter 21-25
    403407        1000000.0_wp, 1000000.0_wp, 1000000.0_wp,                              & !parameter 26-28                     
     
    410414        1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp,      & !parameter 6-11
    411415        296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp,                & !parameter 12-17
    412         0.01_wp, 0.001_wp, 4.0_wp,                                             & !parameter 18-20
     416        0.001_wp, 0.0001_wp, 4.0_wp,                                             & !parameter 18-20
    413417        1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp,                                & !parameter 21-25
    414418        1000000.0_wp, 1000000.0_wp, 1000000.0_wp,                              & !parameter 26-28                     
     
    432436        1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp,      & !parameter 6-11
    433437        296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp,                & !parameter 12-17
    434         0.01_wp, 0.001_wp, 4.0_wp,                                             & !parameter 18-20
     438        0.001_wp, 0.0001_wp, 4.0_wp,                                             & !parameter 18-20
    435439        1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp,                                & !parameter 21-25
    436440        1000000.0_wp, 1000000.0_wp, 1000000.0_wp,                              & !parameter 26-28                     
     
    443447        1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp,      & !parameter 6-11
    444448        296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp,                & !parameter 12-17
    445         0.01_wp, 0.001_wp, 4.0_wp,                                             & !parameter 18-20
     449        0.001_wp, 0.0001_wp, 4.0_wp,                                             & !parameter 18-20
    446450        1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp,                                & !parameter 21-25
    447451        1000000.0_wp, 1000000.0_wp, 1000000.0_wp,                              & !parameter 26-28                     
     
    67496753        INTEGER(iwp)                          :: i, j, k, l, d, m   !< running indices
    67506754       
    6751         REAL(wp)                              :: u1,v1,w1           !< near wall u,v,w
    67526755        REAL(wp)                              :: stend              !< surface tendency
    67536756        REAL(wp)                              :: stend_window       !< surface tendency
     
    67666769        REAL(wp)                              :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window)
    67676770        REAL(wp)                              :: lambda_surface_green  !< current value of lambda_surface (heat conductivity between air and greeb wall)
    6768         REAL(wp)                              :: Ueff               !< effective wind speed for calculation of heat transfer coefficients
    6769         REAL(wp)                              :: httc               !< heat transfer coefficient
    6770         REAL(wp)                              :: httc_window        !< heat transfer coefficient window
    6771         REAL(wp)                              :: httc_green         !< heat transfer coefficient green wall
    67726771        REAL(wp), DIMENSION(nzub:nzut)        :: exn                !< value of the Exner function in layers
    67736772       
     
    70447043!--          obtained by simple linear interpolation. ( An alternative would
    70457044!--          be an logarithmic interpolation. )
    7046 #if ! defined( __nopointer )
    7047              u1 = ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp
    7048              v1 = ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp
    7049              w1 = ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp
    7050 #endif
    7051                
    7052              Ueff   = SQRT( u1**2 + v1**2 + w1**2 )
    7053              httc   = surf_usm_v(l)%z0(m) *                                    &
    7054                        ( 11.8_wp + 4.2_wp * Ueff ) - 4.0_wp
    7055              f_shf         = httc
    7056              f_shf_window  = httc
    7057              f_shf_green   = httc
     7045!--          A roughness lenght of 0.001 is assumed for concrete (the inverse,
     7046!--          1000 is used in the nominator for scaling)
     7047             surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) * 1000.0_wp &
     7048                        * ( 11.8_wp + 4.2_wp *                                 &
     7049                        SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + &
     7050                                   ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + &
     7051                                   ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2,  &
     7052                              0.01_wp ) )                                      &
     7053                           )  - 4.0_wp  )
     7054
     7055             f_shf         = rho_cp / surf_usm_v(l)%r_a(m)
     7056             f_shf_window  = rho_cp / surf_usm_v(l)%r_a(m)
     7057             f_shf_green   = rho_cp / surf_usm_v(l)%r_a(m)
     7058
     7059
    70587060
    70597061!--          add LW up so that it can be removed in prognostic equation
Note: See TracChangeset for help on using the changeset viewer.