source: palm/trunk/SOURCE/init_ocean.f90 @ 281

Last change on this file since 281 was 139, checked in by raasch, 17 years ago

New:
---

Plant canopy model of Watanabe (2004,BLM 112,307-341) added.
It can be switched on by the inipar parameter plant_canopy.
The inipar parameter canopy_mode can be used to prescribe a
plant canopy type. The default case is a homogeneous plant
canopy. Heterogeneous distributions of the leaf area
density and the canopy drag coefficient can be defined in the
new routine user_init_plant_canopy (user_interface).
The inipar parameters lad_surface, lad_vertical_gradient and
lad_vertical_gradient_level can be used in order to
prescribe the vertical profile of leaf area density. The
inipar parameter drag_coefficient determines the canopy
drag coefficient.
Finally, the inipar parameter pch_index determines the
index of the upper boundary of the plant canopy.

Allow new case bc_uv_t = 'dirichlet_0' for channel flow.

For unknown variables (CASE DEFAULT) call new subroutine user_data_output_dvrp

Pressure boundary conditions for vertical walls added to the multigrid solver.
They are applied using new wall flag arrays (wall_flags_..) which are defined
for each grid level. New argument gls added to routine user_init_grid
(user_interface).

Frequence of sorting particles can be controlled with new particles_par
parameter dt_sort_particles. Sorting is moved from the SGS timestep loop in
advec_particles after the end of this loop.

advec_particles, check_parameters, data_output_dvrp, header, init_3d_model, init_grid, init_particles, init_pegrid, modules, package_parin, parin, plant_canopy_model, read_var_list, read_3d_binary, user_interface, write_var_list, write_3d_binary

Changed:


Redefine initial nzb_local as the actual total size of topography (later the
extent of topography in nzb_local is reduced by 1dx at the E topography walls
and by 1dy at the N topography walls to form the basis for nzb_s_inner);
for consistency redefine 'single_building' case.

Vertical profiles now based on nzb_s_inner; they are divided by
ngp_2dh_s_inner (scalars, procucts of scalars) and ngp_2dh (staggered velocity
components and their products, procucts of scalars and velocity components),
respectively.

Allow two instead of one digit to specify isosurface and slicer variables.

Status of 3D-volume NetCDF data file only depends on switch netcdf_64bit_3d (check_open)

prognostic_equations include the respective wall_*flux in the parameter list of
calls of diffusion_s. Same as before, only the values of wall_heatflux(0:4)
can be assigned. At present, wall_humidityflux, wall_qflux, wall_salinityflux,
and wall_scalarflux are kept zero. diffusion_s uses the respective wall_*flux
instead of wall_heatflux. This update serves two purposes:

  • it avoids errors in calculations with humidity/scalar/salinity and prescribed

non-zero wall_heatflux,

  • it prepares PALM for a possible assignment of wall fluxes of

humidity/scalar/salinity in a future release.

buoyancy, check_open, data_output_dvrp, diffusion_s, diffusivities, flow_statistics, header, init_3d_model, init_dvrp, init_grid, modules, prognostic_equations

Errors:


Bugfix: summation of sums_l_l in diffusivities.

Several bugfixes in the ocean part: Initial density rho is calculated
(init_ocean). Error in initializing u_init and v_init removed
(check_parameters). Calculation of density flux now starts from
nzb+1 (production_e).

Bugfix: pleft/pright changed to pnorth/psouth in sendrecv of particle tail
numbers along y, small bugfixes in the SGS part (advec_particles)

Bugfix: model_string needed a default value (combine_plot_fields)

Bugfix: wavenumber calculation for even nx in routines maketri (poisfft)

Bugfix: assignment of fluxes at walls

Bugfix: absolute value of f must be used when calculating the Blackadar mixing length (init_1d_model)

advec_particles, check_parameters, combine_plot_fields, diffusion_s, diffusivities, init_ocean, init_1d_model, poisfft, production_e

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1 SUBROUTINE init_ocean
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6!
7!
8! Former revisions:
9! ------------------
10! $Id: init_ocean.f90 139 2007-11-29 09:37:41Z letzel $
11!
12! 124 2007-10-19 15:47:46Z raasch
13! Bugfix: Initial density rho is calculated
14!
15! 97 2007-06-21 08:23:15Z raasch
16! Initial revision
17!
18! Description:
19! ------------
20! Initialization of quantities needed for the ocean version
21!------------------------------------------------------------------------------!
22
23    USE arrays_3d
24    USE control_parameters
25    USE eqn_state_seawater_mod
26    USE grid_variables
27    USE indices
28
29    IMPLICIT NONE
30
31    INTEGER ::  k
32
33    REAL    ::  sa_l, pt_l, rho_l
34
35    ALLOCATE( hyp(nzb:nzt+1) )
36
37!
38!-- Set water density near the ocean surface
39    rho_surface = 1027.62
40
41!
42!-- Calculate initial vertical profile of hydrostatic pressure (in Pa)
43!-- and the reference density (used later in buoyancy term)
44    hyp(nzt+1) = surface_pressure * 100.0
45
46    hyp(nzt)      = hyp(nzt+1) + rho_surface * g * 0.5 * dzu(nzt+1)
47    rho_reference = rho_surface * 0.5 * dzu(nzt+1)
48
49    DO  k = nzt-1, 0, -1
50
51       sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) )
52       pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) )
53
54       rho_l = eqn_state_seawater_func( hyp(k+1), pt_l, sa_l )
55
56       hyp(k)        = hyp(k+1) + rho_l * g * dzu(k+1)
57       rho_reference = rho_reference + rho_l * dzu(k+1)
58
59    ENDDO
60
61    rho_reference = rho_reference / ( zw(nzt) - zu(nzb) )
62
63!
64!-- Calculate the reference potential density
65    prho_reference = 0.0
66    DO  k = 0, nzt
67
68       sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) )
69       pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) )
70
71       prho_reference = prho_reference + dzu(k+1) * &
72                        eqn_state_seawater_func( hyp(0), pt_l, sa_l )
73
74    ENDDO
75
76    prho_reference = prho_reference / ( zu(nzt) - zu(nzb) )
77
78!
79!-- Calculate the initial potential density, based on the initial
80!-- temperature and salinity profile
81    CALL eqn_state_seawater
82
83
84 END SUBROUTINE init_ocean
Note: See TracBrowser for help on using the repository browser.