Changeset 2618


Ignore:
Timestamp:
Nov 16, 2017 3:37:30 PM (6 years ago)
Author:
suehring
Message:

Reorder calls for initializing surface quantities and give example of user-defined initialization of surface quantities

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r2564 r2618  
    2525! -----------------
    2626! $Id$
     27! Reorder calls of init_surfaces.
     28!
     29! 2564 2017-10-19 15:56:56Z Giersch
    2730! Variable wind_turbine was added to control_parameters.
    2831!
     
    11351138
    11361139          ENDIF
     1140!
     1141!--       Initialize surface variables, e.g. friction velocity, momentum
     1142!--       fluxes, etc.
     1143          CALL init_surfaces
    11371144
    11381145          CALL location_message( 'finished', .TRUE. )
     
    12471254!--       of a sloping surface
    12481255          IF ( sloping_surface )  CALL init_slope
     1256!
     1257!--       Initialize surface variables, e.g. friction velocity, momentum
     1258!--       fluxes, etc.
     1259          CALL init_surfaces
    12491260
    12501261          CALL location_message( 'finished', .TRUE. )
     
    12541265
    12551266          CALL location_message( 'initializing by user', .FALSE. )
     1267!
     1268!--       Pre-initialize surface variables, i.e. setting start- and end-indices
     1269!--       at each (j,i)-location. Please note, this does not supersede
     1270!--       user-defined initialization of surface quantities.
     1271          CALL init_surfaces
    12561272!
    12571273!--       Initialization will completely be done by the user
     
    19241940    ENDIF
    19251941!
    1926 !-- Initialize surface elements and its attributes, e.g. heat- and
    1927 !-- momentumfluxes, roughness, scaling parameters.
    1928 !-- This is already done in case of restart data. 
     1942!-- Finally, if random_heatflux is set, disturb shf at horizontal
     1943!-- surfaces. Actually, this should be done in surface_mod, where all other
     1944!-- initializations of surface quantities are done. However, this
     1945!-- would create a ring dependency, hence, it is done here. Maybe delete
     1946!-- disturb_heatflux and tranfer the respective code directly into the
     1947!-- initialization in surface_mod.         
    19291948    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
    19301949         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
    1931        CALL init_surfaces
    1932 !
    1933 !--    Finally, if random_heatflux is set, disturb shf at horizontal
    1934 !--    surfaces. Actually, this should be done in surface_mod, where all other
    1935 !--    initializations of surface quantities are done. However, this
    1936 !--    would create a ring dependency, hence, it is done here. Maybe delete
    1937 !--    disturb_heatflux and tranfer the respective code directly into the
    1938 !--    initialization in surface_mod.         
     1950 
    19391951       IF ( use_surface_fluxes  .AND.  constant_heatflux  .AND.                &
    19401952            random_heatflux )  THEN
  • palm/trunk/SOURCE/user_init_3d_model.f90

    r2233 r2618  
    2525! -----------------
    2626! $Id$
     27! Provide example for user-defined initialization of surface-related quantities
     28!
     29! 2233 2017-05-30 18:08:54Z suehring
    2730!
    2831! 2232 2017-05-30 17:47:52Z suehring
     
    6871    IMPLICIT NONE
    6972
     73    INTEGER(iwp) ::  l !< running index surface orientation
     74    INTEGER(iwp) ::  m !< running index surface elements
     75
     76!
     77!-- Initialization of surface-related quantities.
     78!-- The following example shows required initialization of surface quantitites
     79!-- at default-type upward-facing surfaces. 
     80!   DO  m = 1, surf_def_h(0)%ns
     81!      surf_def_h(0)%ol(m)   = ...    ! Obukhov length
     82!      surf_def_h(0)%us(m  ) = ...    ! friction velocity
     83!      surf_def_h(0)%usws(m) = ...    ! vertical momentum flux, u-component
     84!      surf_def_h(0)%vsws(m) = ...    ! vertical momentum flux, v-component
     85!      surf_def_h(0)%z0(m)   = ...    ! roughness length for momentum
     86!      IF ( .NOT. neutral )  THEN
     87!         surf_def_h(0)%ts(m)   = ... ! scaling parameter
     88!         surf_def_h(0)%shf(m)  = ... ! surface sensible heat flux
     89!         surf_def_h(0)%z0h(m)  = ... ! roughness length for heat
     90!      ENDIF
     91!      IF ( humditiy )  THEN
     92!         surf_def_h(0)%qs(m)   = ... ! scaling parameter
     93!         surf_def_h(0)%qsws(m) = ... ! surface latent heat flux
     94!         surf_def_h(0)%z0q(m)  = ... ! roughness length for moisture
     95!      ENDIF
     96!      IF ( passive_scalar )  THEN
     97!         surf_def_h(0)%ss(m)   = ... ! scaling parameter
     98!         surf_def_h(0)%ssws(m) = ... ! surface latent heat flux
     99!      ENDIF
     100!   ENDDO
     101!
     102!-- Same for natural and urban type surfaces
     103!   DO  m = 1, surf_lsm_h%ns
     104!      ...
     105!   ENDDO
     106!   DO  m = 1, surf_usm_h%ns
     107!      ...
     108!   ENDDO
     109!
     110!-- Also care for vertically aligned surfaces (default-, natural-, and
     111!-- urban-type).
     112!   DO  l = 0, 3
     113!      DO  m = 1, surf_def_v(l)%ns
     114!         ...
     115!      ENDDO
     116!      DO  m = 1, surf_lsm_v(l)%ns
     117!         ...
     118!      ENDDO
     119!      DO  m = 1, surf_usm_v(l)%ns
     120!         ...
     121!      ENDDO
     122!   ENDDO
     123!
     124!
     125!-- In the following, initialize 3D quantities, e.g. u, v, w, pt, etc..
    70126
    71127 END SUBROUTINE user_init_3d_model
Note: See TracChangeset for help on using the changeset viewer.