Index: /palm/trunk/DOC/app/chapter_4.1.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.1.html (revision 239)
+++ /palm/trunk/DOC/app/chapter_4.1.html (revision 240)
@@ -2811,5 +2811,142 @@
-
+
canyon_height | R | 50.0 | Street canyon height
+in m.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ canyon_height must
+be less than the height of the model domain. This parameter requires topography
+= 'single_street_canyon'. |
canyon_width_x | R | 9999999.9 | Street canyon width in x-direction in m.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Currently, canyon_width_x
+must be at least 3
+* dx and no more than ( nx - 1 ) * dx
+ - canyon_wall_left.
+This parameter requires topography
+= 'single_street_canyon'. A non-default value implies a canyon orientation in y-direction. |
canyon_width_y | R | 9999999.9 | Street canyon width in y-direction in m.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Currently, canyon_width_y
+must be at least 3
+* dy and no more than ( ny - 1 ) * dy - canyon_wall_south. This parameter requires topography
+= 'single_street_canyon. A non-default value implies a canyon orientation in x-direction. |
canyon_wall_left | R | canyon centered in x-direction | x-coordinate of the left canyon wall (distance between the
+left canyon wall and the left border of the model domain) in m.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Currently, canyon_wall_left
+must be at least 1
+* dx and less than ( nx
+- 1 ) * dx - canyon_width_x.
+This parameter requires topography
+= 'single_street_canyon'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The default value canyon_wall_left
+= ( ( nx +
+1 ) * dx - canyon_width_x ) / 2
+centers the canyon in x-direction. |
canyon_wall_south | R | canyon centered in y-direction | y-coordinate of the South canyon wall (distance between the
+South canyon wall and the South border of the model domain) in m.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Currently, canyon_wall_south
+must be at least 1
+* dy and less than ( ny
+- 1 ) * dy - canyon_width_y.
+This parameter requires topography
+= 'single_street_canyon'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The default value canyon_wall_south
+= ( ( ny +
+1 ) * dy - canyon_width_y ) / 2
+centers the canyon in y-direction. |
@@ -3118,8 +3255,9 @@
conserve_volume_flow
-= .TRUE.
+= .T.
guarantees that the volume flow through the xz- or yz-cross-section of
the total model domain remains constant (equal to the initial value at
-t=0) throughout the run.
+t=0) throughout the run.
Note that conserve_volume_flow
+= .T. requires dp_external = .F. .
@@ -3519,5 +3657,13 @@
-
+ dp_external | L | .F. | External pressure gradient switch.
This
+parameter is used to switch on/off an external pressure gradient as
+driving force. The external pressure gradient is controlled by the
+parameters dp_smooth, dp_level_b and dpdxy.
Note that dp_external = .T. requires conserve_volume_flow = .F. It is normally recommended to disable the Coriolis force by setting omega = 0.0. |
dp_smooth | L | .F. | Vertically smooth the external pressure gradient using a sinusoidal smoothing function.
This parameter only applies if dp_external = .T. . It is useful in combination with dp_level_b >> 0 to generate a non-accelerated boundary layer well below dp_level_b. |
dp_level_b | R | 0.0 | Lower
+limit of the vertical range for which the external pressure gradient is applied (in m).
This parameter only applies if dp_external = .T. It
+must hold the condition zu(0) <= dp_level_b
+<= zu(nz). It can be used in combination with dp_smooth = .T. to generate a non-accelerated boundary layer well below dp_level_b if dp_level_b >> 0.
Note
+that there is no upper limit of the vertical range because the external
+pressure gradient is always applied up to the top of the model domain. |
dpdxy | R(2) | 2 * 0.0 | Values of the external pressure gradient applied in x- and y-direction, respectively (in Pa/m).
This parameter only applies if dp_external = .T. It sets the pressure gradient values. Negative values mean an acceleration, positive values mean deceleration. For example, dpdxy = -0.0002, 0.0, drives the flow in positive x-direction, |
@@ -13985,5 +14131,5 @@
-The building size and location can be specified with the parameters building_height, building_length_x, building_length_y, building_wall_left and building_wall_south.
+The building size and location can be specified by the parameters building_height, building_length_x, building_length_y, building_wall_left and building_wall_south.
@@ -14000,5 +14146,44 @@
- 'read_from_file'
+
'single_street_canyon'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'read_from_file'
Index: /palm/trunk/DOC/app/chapter_4.2.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.2.html (revision 239)
+++ /palm/trunk/DOC/app/chapter_4.2.html (revision 240)
@@ -3398,5 +3398,5 @@
-
+ |
@@ -3411,5 +3411,5 @@
- The parameter create_disturbances
+ The parameter create_disturbances
describes how to impose
random perturbations to the horizontal velocity field. The perturbation
@@ -3420,5 +3420,5 @@
velocities are imposed no more. The value of this parameter usually
must be determined by trial and error (it depends e.g. on the total
-number of grid points).
+number of grid points).
@@ -3457,39 +3457,103 @@
- |
-
-
- Lower
+ |
+
+
+ Lower
limit of the vertical range for which random perturbations are to be
-imposed on the horizontal wind field (in m).
-
-
-
-
-
-
- This
+imposed on the horizontal wind field (in m).
+
+
+
+
+
+
+ This
parameter must hold the condition zu(3) <= disturbance_level_b
-<= zu(nz-2). Additionally, disturbance_level_b
-<= disturbance_level_t
- must
-also hold.
-
-
-
-
- In case of ocean runs (see ocean) the default value is disturbance_level_b = zu(nz * 2 / 3) (negative).
-
-
-
-
-
- The
-parameter create_disturbances
+<= zu(nz-2). Additionally, disturbance_level_b
+<= disturbance_level_t
+ must
+also hold.
+
+
+
+
+ In case of ocean runs (see ocean) the default value is disturbance_level_b = zu(nz * 2 / 3) (negative).
+
+
+
+
+
+ The
+parameter create_disturbances
describes how to impose
-random perturbations to the horizontal velocity field.
+random perturbations to the horizontal velocity field.
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ disturbance_level_t
+
+
+
+ |
+
+
+ R |
+
+
+
+ zu(nz/3) or
+
+
+zu(nzt-3)
+
+
+see right |
+
+
+
+
+
+
+ Upper
+limit of the vertical range for which random perturbations are to be
+imposed on the horizontal wind field (in m).
+
+
+
+ This
+parameter must hold the condition disturbance_level_t
+<= zu(nz-2).
+Additionally, disturbance_level_b
+ <=
+ disturbance_level_t
+must also hold.
+
+
+ In case of ocean runs (see ocean) the default value is disturbance_level_t = zu(nzt - 3) (negative).
+
+
+ The
+parameter create_disturbances
+describes how to impose
+random perturbations to the horizontal velocity field.
+
+
+
|
@@ -3504,68 +3568,4 @@
- disturbance_level_t
-
-
-
-
-
-
- R |
-
-
-
- zu(nz/3) or
-
-
-zu(nzt-3)
-
-
-see right |
-
-
-
-
-
-
- Upper
-limit of the vertical range for which random perturbations are to be
-imposed on the horizontal wind field (in m).
-
-
-
-
-
-
- This
-parameter must hold the condition disturbance_level_t
-<= zu(nz-2).
-Additionally, disturbance_level_b
- <=
- disturbance_level_t
-must also hold.
-
-
- In case of ocean runs (see ocean) the default value is disturbance_level_t = zu(nzt - 3) (negative).
-
-
- The
-parameter create_disturbances
-describes how to impose
-random perturbations to the horizontal velocity field.
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
do2d_at_begin
@@ -3582,5 +3582,5 @@
- | .F.
+ | .F.
@@ -3637,5 +3637,5 @@
- | .F.
+ | .F.
@@ -3685,5 +3685,5 @@
- | .F.
+ | .F.
@@ -3762,5 +3762,5 @@
- | see
+ | see
right
@@ -3828,5 +3828,5 @@
- |
+
@@ -3852,21 +3852,21 @@
- Time
-step to be used by the 3d-model (in s).
-
-
-
-
-
-
- This parameter
- is
+ Time
+step to be used by the 3d-model (in s).
+
+
+
+
+
+
+ This parameter
+ is
described in
-detail with the initialization parameters (see
dt).
+detail with the initialization parameters (see dt).
Additionally, it may be
used as a run parameter and then applies to all restart runs (until it
is changed again). A switch from a constant time step to a variable
-time step can be achieved with dt = -1.0.
-
+time step can be achieved with dt = -1.0.
+
@@ -3917,17 +3917,17 @@
-
-
-
- With
+
+
+
+ With
variable time step (see dt),
the number of time levels entering the average can vary from one
-averaging interval to the next (for a more detailed explanation see averaging_interval). It
+averaging interval to the next (for a more detailed explanation see averaging_interval). It
is approximately given by the quotient of averaging_interval /
MAX( dt_averaging_input,
dt) (which
gives a more or less exact value if a fixed timestep is used and if
-this is an integral divisor of dt_averaging_input).
-
+this is an integral divisor of dt_averaging_input).
+
Index: /palm/trunk/DOC/app/chapter_4.6.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.6.html (revision 239)
+++ /palm/trunk/DOC/app/chapter_4.6.html (revision 240)
@@ -1830,5 +1830,6 @@
Canopy mode |
-
+
canyon_height | I | R | 50.0 | Street canyon height
+in m. |
canyon_width_x | I | R | 9999999.9 | Street canyon width in x-direction in m. |
canyon_width_y | I | R | 9999999.9 | Street canyon width in y-direction in m. |
canyon_wall_left | I | R | canyon centered in x-direction | x-coordinate of the left canyon wall in m. |
canyon_wall_south | I | R | canyon centered in y-direction | y-coordinate of the South canyon wall in m. |
@@ -3471,5 +3472,6 @@
-
+
dp_external | R | L | .F. | External pressure gradient switch. |
dp_smooth | R | L | .F. | Vertically smooth the external pressure gradient using a sinusoidal smoothing function. |
dp_level_b | R | R | 0.0 | Lower
+limit of the vertical range for which the external pressure gradient is applied (in m). |
dpdxy | R | R (2) | 2 * 0.0 | Values of the external pressure gradient applied in x- and y-direction, respectively (in Pa/m).
|
drag_coefficient |
I |
Index: /palm/trunk/DOC/tec/message_identifiers
===================================================================
--- /palm/trunk/DOC/tec/message_identifiers (revision 239)
+++ /palm/trunk/DOC/tec/message_identifiers (revision 240)
@@ -230,9 +230,15 @@
PA0149 particle out of range: i=... j=... k=...
nxl=... nxr=... nys=... nyn=... nzb=... nzt=...
-
+ PA0150 Both dp_external and conserve_volume_flow are .TRUE.
+ but one of them must be .FALSE.
+ PA0151 dp_level_b = ... is out of range
+ PA0152 dp_external is .TRUE. but dpdxy is zero, i.e. the external
+ pressure gradient will not be applied
+ PA0153 dpdxy is nonzero but dp_external is .FALSE., i.e. the external
+ pressure gradient will not be applied
UI0001 The value for "topography_grid_convention" is not set.
Its default value is only valid for
- "topography" = ''single_building'' or
+ "topography" = ''single_building'', ''single_street_canyon''or
''read_from_file'' Choose ''cell_edge'' or
''cell_center''.
Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS (revision 239)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS (revision 240)
@@ -5,5 +5,11 @@
for buildings can be chosen with parameter cluster_size. (init_dvrp)
-init_dvrp, header, modules, package_parin
+External pressure gradient (check_parameters, header, init_3d_model, modules,
+parin, prognostic_equations, read_var_list, write_var_list)
+
+New topography case 'single_street_canyon' (header, init_grid, modules, parin,
+read_var_list, user_check_parameters, user_header, user_init_grid, write_var_list)
+
+check_parameters, init_dvrp, init_grid, init_3d_model, header, modules, package_parin, parin, prognostic_equations, read_var_list, user_check_parameters, user_header, user_init_grid, write_var_list
Index: /palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/check_parameters.f90 (revision 239)
+++ /palm/trunk/SOURCE/check_parameters.f90 (revision 240)
@@ -5,4 +5,5 @@
! -----------------
! Bugfix: pressure included for profile output
+! Check pressure gradient conditions
!
! Former revisions:
@@ -2816,4 +2817,29 @@
!
+!-- Check pressure gradient conditions
+ IF ( dp_external .AND. conserve_volume_flow ) THEN
+ WRITE( message_string, * ) 'Both dp_external and conserve_volume_flow', &
+ ' are .TRUE. but one of them must be .FALSE.'
+ CALL message( 'check_parameters', 'PA0150', 1, 2, 0, 6, 0 )
+ ENDIF
+ IF ( dp_external ) THEN
+ IF ( dp_level_b < zu(nzb) .OR. dp_level_b > zu(nzt) ) THEN
+ WRITE( message_string, * ) 'dp_level_b = ', dp_level_b, ' is out ', &
+ ' of range'
+ CALL message( 'check_parameters', 'PA0151', 1, 2, 0, 6, 0 )
+ ENDIF
+ IF ( .NOT. ANY( dpdxy /= 0.0 ) ) THEN
+ WRITE( message_string, * ) 'dp_external is .TRUE. but dpdxy is zero',&
+ ', i.e. the external pressure gradient & will not be applied'
+ CALL message( 'check_parameters', 'PA0152', 0, 1, 0, 6, 0 )
+ ENDIF
+ ENDIF
+ IF ( ANY( dpdxy /= 0.0 ) .AND. .NOT. dp_external ) THEN
+ WRITE( message_string, * ) 'dpdxy is nonzero but dp_external is ', &
+ '.FALSE., i.e. the external pressure gradient & will not be applied'
+ CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 )
+ ENDIF
+
+!
!-- Check &userpar parameters
CALL user_check_parameters
Index: /palm/trunk/SOURCE/header.f90
===================================================================
--- /palm/trunk/SOURCE/header.f90 (revision 239)
+++ /palm/trunk/SOURCE/header.f90 (revision 240)
@@ -5,4 +5,7 @@
! -----------------
! Output of cluster_size
+! +dp_external, dp_level_b, dp_smooth, dpdxy
+! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
+! canyon_wall_south
!
! Former revisions:
@@ -99,5 +102,6 @@
CHARACTER (LEN=85) :: roben, runten
- INTEGER :: av, bh, blx, bly, bxl, bxr, byn, bys, i, ihost, io, j, l, ll
+ INTEGER :: av, bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, &
+ cyn, cys, i, ihost, io, j, l, ll
REAL :: cpuseconds_per_simulated_second
@@ -285,5 +289,13 @@
ENDIF
IF ( passive_scalar ) WRITE ( io, 134 )
- IF ( conserve_volume_flow ) WRITE ( io, 150 )
+ IF ( conserve_volume_flow ) THEN
+ WRITE ( io, 150 )
+ ELSEIF ( dp_external ) THEN
+ IF ( dp_smooth ) THEN
+ WRITE ( io, 151 ) dpdxy, dp_level_b, ', vertically smoothed.'
+ ELSE
+ WRITE ( io, 151 ) dpdxy, dp_level_b, '.'
+ ENDIF
+ ENDIF
WRITE ( io, 99 )
@@ -381,4 +393,29 @@
WRITE ( io, 271 ) building_length_x, building_length_y, &
building_height, bxl, bxr, bys, byn
+
+ CASE ( 'single_street_canyon' )
+ ch = NINT( canyon_height / dz )
+ IF ( canyon_width_x /= 9999999.9 ) THEN
+!
+!-- Street canyon in y direction
+ cwx = NINT( canyon_width_x / dx )
+ IF ( canyon_wall_left == 9999999.9 ) THEN
+ canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
+ ENDIF
+ cxl = NINT( canyon_wall_left / dx )
+ cxr = cxl + cwx
+ WRITE ( io, 272 ) 'y', canyon_height, ch, 'u', cxl, cxr
+
+ ELSEIF ( canyon_width_y /= 9999999.9 ) THEN
+!
+!-- Street canyon in x direction
+ cwy = NINT( canyon_width_y / dy )
+ IF ( canyon_wall_south == 9999999.9 ) THEN
+ canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
+ ENDIF
+ cys = NINT( canyon_wall_south / dy )
+ cyn = cys + cwy
+ WRITE ( io, 272 ) 'x', canyon_height, ch, 'v', cys, cyn
+ ENDIF
END SELECT
@@ -1370,4 +1407,8 @@
150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
'conserved')
+151 FORMAT (' --> External pressure gradient directly prescribed by the user:'/, &
+ 2(1X,E12.5),'Pa/m', &
+ ' in x/y direction starting from dp_level_b =', F6.3, 'm', &
+ A /)
200 FORMAT (//' Run time and time step information:'/ &
' ----------------------------------'/)
@@ -1407,4 +1448,8 @@
' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
' / ',I4)
+272 FORMAT ( ' Single quasi-2D street canyon of infinite length in ',A, &
+ ' direction' / &
+ ' Canyon height: ', F6.2, 'm, ch = ', I4, '.' / &
+ ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
280 FORMAT (//' Vegetation canopy (drag) model:'/ &
' ------------------------------'// &
Index: /palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_3d_model.f90 (revision 239)
+++ /palm/trunk/SOURCE/init_3d_model.f90 (revision 240)
@@ -7,5 +7,6 @@
! Actual revisions:
! -----------------
-!
+! Set the starting level and the vertical smoothing factor used for
+! the external pressure gradient
!
! Former revisions:
@@ -91,5 +92,5 @@
IMPLICIT NONE
- INTEGER :: i, j, k, sr
+ INTEGER :: i, ind_array(1), j, k, sr
INTEGER, DIMENSION(:), ALLOCATABLE :: ngp_2dh_l, ngp_3d_inner_l
@@ -111,5 +112,5 @@
sums_divnew_l(0:statistic_regions), &
sums_divold_l(0:statistic_regions) )
- ALLOCATE( rdf(nzb+1:nzt) )
+ ALLOCATE( dp_smooth_factor(nzb:nzt), rdf(nzb+1:nzt) )
ALLOCATE( ngp_2dh_outer(nzb:nzt+1,0:statistic_regions), &
ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions), &
@@ -1264,4 +1265,27 @@
!
+!-- Initialize the starting level and the vertical smoothing factor used for
+!-- the external pressure gradient
+ dp_smooth_factor = 1.0
+ IF ( dp_external ) THEN
+!
+!-- Set the starting level dp_level_ind_b only if it has not been set before
+!-- (e.g. in init_grid).
+ IF ( dp_level_ind_b == 0 ) THEN
+ ind_array = MINLOC( ABS( dp_level_b - zu ) )
+ dp_level_ind_b = ind_array(1) - 1 + nzb
+ ! MINLOC uses lower array bound 1
+ ENDIF
+ IF ( dp_smooth ) THEN
+ dp_smooth_factor(:dp_level_ind_b) = 0.0
+ DO k = dp_level_ind_b+1, nzt
+ dp_smooth_factor(k) = 0.5 * ( 1.0 + SIN( pi * &
+ ( REAL( k - dp_level_ind_b ) / &
+ REAL( nzt - dp_level_ind_b ) - 0.5 ) ) )
+ ENDDO
+ ENDIF
+ ENDIF
+
+!
!-- Initialize diffusivities used within the outflow damping layer in case of
!-- non-cyclic lateral boundaries. A linear increase is assumed over the first
Index: /palm/trunk/SOURCE/init_grid.f90
===================================================================
--- /palm/trunk/SOURCE/init_grid.f90 (revision 239)
+++ /palm/trunk/SOURCE/init_grid.f90 (revision 240)
@@ -4,5 +4,5 @@
! Actual revisions:
! -----------------
-!
+! new topography case 'single_street_canyon'
!
! Former revisions:
@@ -54,6 +54,7 @@
IMPLICIT NONE
- INTEGER :: bh, blx, bly, bxl, bxr, byn, bys, gls, i, inc, i_center, j, &
- j_center, k, l, nxl_l, nxr_l, nyn_l, nys_l, nzb_si, nzt_l, vi
+ INTEGER :: bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, cyn, &
+ cys, gls, i, inc, i_center, j, j_center, k, l, nxl_l, nxr_l, &
+ nyn_l, nys_l, nzb_si, nzt_l, vi
INTEGER, DIMENSION(:), ALLOCATABLE :: vertical_influence
@@ -379,4 +380,79 @@
nzb_local(bys:byn,bxl:bxr) = bh
+ CASE ( 'single_street_canyon' )
+!
+!-- Single quasi-2D street canyon of infinite length in x or y direction.
+!-- The canyon is centered in the other direction by default.
+ IF ( canyon_width_x /= 9999999.9 ) THEN
+!
+!-- Street canyon in y direction
+ cwx = NINT( canyon_width_x / dx )
+ IF ( canyon_wall_left == 9999999.9 ) THEN
+ canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
+ ENDIF
+ cxl = NINT( canyon_wall_left / dx )
+ cxr = cxl + cwx
+
+ ELSEIF ( canyon_width_y /= 9999999.9 ) THEN
+!
+!-- Street canyon in x direction
+ cwy = NINT( canyon_width_y / dy )
+ IF ( canyon_wall_south == 9999999.9 ) THEN
+ canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
+ ENDIF
+ cys = NINT( canyon_wall_south / dy )
+ cyn = cys + cwy
+
+ ELSE
+ IF ( myid == 0 ) THEN
+ PRINT*, '+++ user_init_grid: no street canyon width given'
+ ENDIF
+ CALL local_stop
+ ENDIF
+
+ ch = NINT( canyon_height / dz )
+ dp_level_ind_b = ch
+!
+!-- Street canyon size has to meet some requirements
+ IF ( canyon_width_x /= 9999999.9 ) THEN
+ IF ( ( cxl < 1 ) .OR. ( cxr > nx-1 ) .OR. ( cwx < 3 ) .OR. &
+ ( ch < 3 ) ) THEN
+ IF ( myid == 0 ) THEN
+ PRINT*, '+++ user_init_grid: inconsistent canyon parameters:'
+ PRINT*, ' cxl=', cxl, 'cxr=', cxr, &
+ 'cwx=', cwx, &
+ 'ch=', ch, 'nx=', nx, 'ny=', ny
+ ENDIF
+ CALL local_stop
+ ENDIF
+ ELSEIF ( canyon_width_y /= 9999999.9 ) THEN
+ IF ( ( cys < 1 ) .OR. ( cyn > ny-1 ) .OR. ( cwy < 3 ) .OR. &
+ ( ch < 3 ) ) THEN
+ IF ( myid == 0 ) THEN
+ PRINT*, '+++ user_init_grid: inconsistent canyon parameters:'
+ PRINT*, ' cys=', cys, 'cyn=', cyn, &
+ 'cwy=', cwy, &
+ 'ch=', ch, 'nx=', nx, 'ny=', ny
+ ENDIF
+ CALL local_stop
+ ENDIF
+ ENDIF
+ IF ( canyon_width_x /= 9999999.9 .AND. canyon_width_y /= 9999999.9 ) &
+ THEN
+ IF ( myid == 0 ) THEN
+ PRINT*, '+++ user_init_grid: inconsistent canyon parameters:'
+ PRINT*, ' street canyon can only be oriented'
+ PRINT*, ' either in x- or in y-direction'
+ ENDIF
+ CALL local_stop
+ ENDIF
+
+ nzb_local = ch
+ IF ( canyon_width_x /= 9999999.9 ) THEN
+ nzb_local(:,cxl+1:cxr-1) = 0
+ ELSEIF ( canyon_width_y /= 9999999.9 ) THEN
+ nzb_local(cys+1:cyn-1,:) = 0
+ ENDIF
+
CASE ( 'read_from_file' )
!
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90 (revision 239)
+++ /palm/trunk/SOURCE/modules.f90 (revision 240)
@@ -6,4 +6,8 @@
! -----------------
! +cluster_size in dvrp_variables
+! +dp_external, dp_level_b, dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy,
+! in control_parameters
+! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
+! canyon_wall_south in control_parameters
!
! Former revisions:
@@ -313,4 +317,5 @@
dosp_time_count = 0, dots_time_count = 0, &
do2d_xy_n = 0, do2d_xz_n = 0, do2d_yz_n = 0, do3d_avs_n = 0, &
+ dp_level_ind_b = 0, &
dvrp_filecount = 0, dz_stretch_level_index, gamma_mg, &
grid_level, ibc_e_b, ibc_p_b, ibc_p_t, ibc_pt_b, ibc_pt_t, &
@@ -323,5 +328,5 @@
nsor_ini = 100, n_sor, normalizing_region = 0, &
nz_do1d, nz_do3d = -9999, outflow_damping_width = -1, &
- prt_time_count = 0, recycling_plane, runnr = 0, &
+ pch_index = 0, prt_time_count = 0, recycling_plane, runnr = 0, &
skip_do_avs = 0, terminate_coupled = 0, &
terminate_coupled_remote = 0, timestep_count = 0
@@ -332,5 +337,4 @@
do3d_no(0:1) = 0, do3d_time_count(0:1), &
lad_vertical_gradient_level_ind(10) = -9999, &
- pch_index = 0, &
pt_vertical_gradient_level_ind(10) = -9999, &
q_vertical_gradient_level_ind(10) = -9999, &
@@ -354,5 +358,6 @@
data_output_2d_on_each_pe = .TRUE., do2d_at_begin = .FALSE., &
do3d_at_begin = .FALSE., do3d_compress = .FALSE., &
- do_sum = .FALSE., dt_changed = .FALSE., dt_fixed = .FALSE., &
+ do_sum = .FALSE., dp_external = .FALSE., dp_smooth = .FALSE., &
+ dt_changed = .FALSE., dt_fixed = .FALSE., &
disturbance_created = .FALSE., &
first_call_advec_particles = .TRUE., &
@@ -388,10 +393,13 @@
building_height = 50.0, building_length_x = 50.0, &
building_length_y = 50.0, building_wall_left = 9999999.9, &
- building_wall_south = 9999999.9, cthf = 0.0, cfl_factor = -1.0, &
+ building_wall_south = 9999999.9, canyon_height = 50.0, &
+ canyon_width_x = 9999999.9, canyon_width_y = 9999999.9, &
+ canyon_wall_left = 9999999.9, canyon_wall_south = 9999999.9, &
+ cthf = 0.0, cfl_factor = -1.0, &
cos_alpha_surface, disturbance_amplitude = 0.25, &
disturbance_energy_limit = 0.01, &
disturbance_level_b = -9999999.9, &
disturbance_level_t = -9999999.9, &
- drag_coefficient = 0.0, &
+ dp_level_b = 0.0, drag_coefficient = 0.0, &
dt = -1.0, dt_averaging_input = 0.0, &
dt_averaging_input_pr = 9999999.9, dt_coupling = 9999999.9, &
@@ -452,5 +460,5 @@
REAL :: do2d_xy_last_time(0:1) = -1.0, do2d_xz_last_time(0:1) = -1.0, &
- do2d_yz_last_time(0:1) = -1.0, &
+ do2d_yz_last_time(0:1) = -1.0, dpdxy(1:2) = 0.0, &
lad_vertical_gradient(10) = 0.0, &
lad_vertical_gradient_level(10) = -9999999.9, &
@@ -472,4 +480,6 @@
wall_humidityflux(0:4) = 0.0, wall_qflux(0:4) = 0.0, &
wall_salinityflux(0:4) = 0.0, wall_scalarflux(0:4) = 0.0
+
+ REAL, DIMENSION(:), ALLOCATABLE :: dp_smooth_factor
Index: /palm/trunk/SOURCE/parin.f90
===================================================================
--- /palm/trunk/SOURCE/parin.f90 (revision 239)
+++ /palm/trunk/SOURCE/parin.f90 (revision 240)
@@ -4,5 +4,6 @@
! Actual revisions:
! -----------------
-!
+! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
+! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy in inipar
!
! Former revisions:
@@ -84,8 +85,10 @@
bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t, &
bottom_salinityflux, building_height, building_length_x, &
- building_length_y, building_wall_left, &
- building_wall_south, canopy_mode, cloud_droplets, cloud_physics, &
- conserve_volume_flow, cthf, cut_spline_overshoot, damp_level_1d, &
- dissipation_1d, drag_coefficient, dt, dt_pr_1d, &
+ building_length_y, building_wall_left, building_wall_south, &
+ canopy_mode, canyon_height, canyon_width_x, canyon_width_y, &
+ canyon_wall_left, canyon_wall_south, cloud_droplets, &
+ cloud_physics, conserve_volume_flow, cthf, cut_spline_overshoot, &
+ damp_level_1d, dissipation_1d, dp_external, dp_level_b, &
+ dp_smooth, dpdxy, drag_coefficient, dt, dt_pr_1d, &
dt_run_control_1d, dx, dy, dz, dz_max, dz_stretch_factor, &
dz_stretch_level, e_init, e_min, end_time_1d, fft_method, &
Index: /palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- /palm/trunk/SOURCE/prognostic_equations.f90 (revision 239)
+++ /palm/trunk/SOURCE/prognostic_equations.f90 (revision 240)
@@ -4,5 +4,5 @@
! Actual revisions:
! -----------------
-!
+! external pressure gradient
!
! Former revisions:
@@ -173,4 +173,13 @@
!-- Drag by plant canopy
IF ( plant_canopy ) CALL plant_canopy_model( i, j, 1 )
+
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
+ ENDDO
+ ENDIF
+
CALL user_actions( i, j, 'u-tendency' )
@@ -244,4 +253,12 @@
!-- Drag by plant canopy
IF ( plant_canopy ) CALL plant_canopy_model( i, j, 2 )
+
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
+ ENDDO
+ ENDIF
CALL user_actions( i, j, 'v-tendency' )
@@ -878,4 +895,12 @@
IF ( plant_canopy ) CALL plant_canopy_model( i, j, 1 )
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
+ ENDDO
+ ENDIF
+
CALL user_actions( i, j, 'u-tendency' )
@@ -931,4 +956,12 @@
!-- Drag by plant canopy
IF ( plant_canopy ) CALL plant_canopy_model( i, j, 2 )
+
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
+ ENDDO
+ ENDIF
CALL user_actions( i, j, 'v-tendency' )
@@ -1347,4 +1380,16 @@
IF ( plant_canopy ) CALL plant_canopy_model( 1 )
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO i = nxlu, nxr
+ DO j = nys, nyn
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDIF
+
CALL user_actions( 'u-tendency' )
@@ -1422,4 +1467,17 @@
!-- Drag by plant canopy
IF ( plant_canopy ) CALL plant_canopy_model( 2 )
+
+!
+!-- External pressure gradient
+ IF ( dp_external ) THEN
+ DO i = nxl, nxr
+ DO j = nysv, nyn
+ DO k = dp_level_ind_b+1, nzt
+ tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDIF
+
CALL user_actions( 'v-tendency' )
Index: /palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- /palm/trunk/SOURCE/read_var_list.f90 (revision 239)
+++ /palm/trunk/SOURCE/read_var_list.f90 (revision 240)
@@ -4,5 +4,6 @@
! Actual revisions:
! -----------------
-!
+! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
+! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy
!
! Former revisions:
@@ -80,5 +81,5 @@
!-- Make version number check first
READ ( 13 ) version_on_file
- binary_version = '3.2'
+ binary_version = '3.3'
IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN
IF ( myid == 0 ) THEN
@@ -223,4 +224,14 @@
CASE ( 'canopy_mode' )
READ ( 13 ) canopy_mode
+ CASE ( 'canyon_height' )
+ READ ( 13 ) canyon_height
+ CASE ( 'canyon_width_x' )
+ READ ( 13 ) canyon_width_x
+ CASE ( 'canyon_width_y' )
+ READ ( 13 ) canyon_width_y
+ CASE ( 'canyon_wall_left' )
+ READ ( 13 ) canyon_wall_left
+ CASE ( 'canyon_wall_south' )
+ READ ( 13 ) canyon_wall_south
CASE ( 'cloud_droplets' )
READ ( 13 ) cloud_droplets
@@ -239,4 +250,12 @@
CASE ( 'dissipation_1d' )
READ ( 13 ) dissipation_1d
+ CASE ( 'dp_external' )
+ READ ( 13 ) dp_external
+ CASE ( 'dp_level_b' )
+ READ ( 13 ) dp_level_b
+ CASE ( 'dp_smooth' )
+ READ ( 13 ) dp_smooth
+ CASE ( 'dpdxy' )
+ READ ( 13 ) dpdxy
CASE ( 'drag_coefficient' )
READ ( 13 ) drag_coefficient
Index: /palm/trunk/SOURCE/user_check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/user_check_parameters.f90 (revision 239)
+++ /palm/trunk/SOURCE/user_check_parameters.f90 (revision 240)
@@ -4,5 +4,6 @@
! Actual revisions:
! -----------------
-!
+! add default topography_grid_convention for the new topography case
+! 'single_street_canyon'
!
! Former revisions:
@@ -30,11 +31,14 @@
IF ( TRIM( topography_grid_convention ) == ' ' ) THEN
IF ( TRIM( topography ) /= 'single_building' .AND. &
+ TRIM( topography ) /= 'single_street_canyon' .AND. &
TRIM( topography ) /= 'read_from_file' ) THEN
!-- The default value is not applicable here, because it is only valid
!-- for the two standard cases 'single_building' and 'read_from_file'
!-- defined in init_grid.
- message_string = 'The value for "topography_grid_convention" '// &
- 'is not set. Its default value is & only valid for '// &
- '"topography" = ''single_building'' or ''read_from_file''.'//&
+ WRITE( message_string, * ) &
+ 'The value for "topography_grid_convention" ', &
+ 'is not set. Its default value is & only valid for ', &
+ '"topography" = ''single_building'', ', &
+ '''single_street_canyon'' & or ''read_from_file''.', &
' & Choose ''cell_edge'' or ''cell_center''.'
CALL message( 'user_check_parameters', 'UI0001', 1, 2, 0, 6, 0 )
@@ -42,5 +46,6 @@
!-- The default value is applicable here.
!-- Set convention according to topography.
- IF ( TRIM( topography ) == 'single_building' ) THEN
+ IF ( TRIM( topography ) == 'single_building' .OR. &
+ TRIM( topography ) == 'single_street_canyon' ) THEN
topography_grid_convention = 'cell_edge'
ELSEIF ( TRIM( topography ) == 'read_from_file' ) THEN
@@ -50,5 +55,6 @@
ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND. &
TRIM( topography_grid_convention ) /= 'cell_center' ) THEN
- message_string = 'The value for "topography_grid_convention" is '// &
+ WRITE( message_string, * ) &
+ 'The value for "topography_grid_convention" is ', &
'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
CALL message( 'user_check_parameters', 'UI0002', 1, 2, 0, 6, 0 )
Index: /palm/trunk/SOURCE/user_header.f90
===================================================================
--- /palm/trunk/SOURCE/user_header.f90 (revision 239)
+++ /palm/trunk/SOURCE/user_header.f90 (revision 240)
@@ -4,5 +4,5 @@
! Actual revisions:
! -----------------
-!
+! new topography case 'single_street_canyon'
!
! Former revisions:
@@ -49,5 +49,6 @@
WRITE ( io, 300 )
IF ( TRIM( topography_grid_convention ) == ' ' ) THEN
- IF ( TRIM( topography ) == 'single_building' ) THEN
+ IF ( TRIM( topography ) == 'single_building' .OR. &
+ TRIM( topography ) == 'single_street_canyon' ) THEN
WRITE ( io, 301 )
ELSEIF ( TRIM( topography ) == 'read_from_file' ) THEN
Index: /palm/trunk/SOURCE/user_init_grid.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_grid.f90 (revision 239)
+++ /palm/trunk/SOURCE/user_init_grid.f90 (revision 240)
@@ -4,5 +4,5 @@
! Actual revisions:
! -----------------
-!
+! add 'single_street_canyon' as standard topography case
!
! Former revisions:
@@ -39,5 +39,5 @@
SELECT CASE ( TRIM( topography ) )
- CASE ( 'flat', 'single_building' )
+ CASE ( 'flat', 'single_building', 'single_street_canyon' )
!
!-- Not allowed here since these are the standard cases used in init_grid.
Index: /palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- /palm/trunk/SOURCE/write_var_list.f90 (revision 239)
+++ /palm/trunk/SOURCE/write_var_list.f90 (revision 240)
@@ -4,5 +4,6 @@
! Actual revisions:
! -----------------
-!
+! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
+! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy
!
! Former revisions:
@@ -70,5 +71,5 @@
- binary_version = '3.2'
+ binary_version = '3.3'
WRITE ( 14 ) binary_version
@@ -151,4 +152,14 @@
WRITE ( 14 ) 'canopy_mode '
WRITE ( 14 ) canopy_mode
+ WRITE ( 14 ) 'canyon_height '
+ WRITE ( 14 ) canyon_height
+ WRITE ( 14 ) 'canyon_width_x '
+ WRITE ( 14 ) canyon_width_x
+ WRITE ( 14 ) 'canyon_width_y '
+ WRITE ( 14 ) canyon_width_y
+ WRITE ( 14 ) 'canyon_wall_left '
+ WRITE ( 14 ) canyon_wall_left
+ WRITE ( 14 ) 'canyon_wall_south '
+ WRITE ( 14 ) canyon_wall_south
WRITE ( 14 ) 'cloud_droplets '
WRITE ( 14 ) cloud_droplets
@@ -167,4 +178,12 @@
WRITE ( 14 ) 'dissipation_1d '
WRITE ( 14 ) dissipation_1d
+ WRITE ( 14 ) 'dp_external '
+ WRITE ( 14 ) dp_external
+ WRITE ( 14 ) 'dp_level_b '
+ WRITE ( 14 ) dp_level_b
+ WRITE ( 14 ) 'dp_smooth '
+ WRITE ( 14 ) dp_smooth
+ WRITE ( 14 ) 'dpdxy '
+ WRITE ( 14 ) dpdxy
WRITE ( 14 ) 'drag_coefficient '
WRITE ( 14 ) drag_coefficient