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

Last change on this file since 95 was 95, checked in by raasch, 18 years ago

further preliminary uncomplete changes for ocean version

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1 SUBROUTINE init_ocean
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6! hydro_press renamed hyp
7!
8! Former revisions:
9! ------------------
10! $Id:$
11!
12! Initial revision (raasch 01/06/07)
13!
14! Description:
15! ------------
16! Initialization of quantities needed for the ocean version
17!------------------------------------------------------------------------------!
18
19    USE arrays_3d
20    USE control_parameters
21    USE eqn_state_seawater_mod
22    USE grid_variables
23    USE indices
24
25    IMPLICIT NONE
26
27    INTEGER ::  k
28
29    REAL    ::  sa_l, pt_l, rho_l
30
31    ALLOCATE( hyp(nzb:nzt+1) )
32
33!
34!-- Set water density near the ocean surface
35    rho_surface = 1027.62
36
37!
38!-- Calculate initial vertical profile of hydrostatic pressure (in Pa)
39    hyp(nzt+1) = surface_pressure * 100.0
40
41    hyp(nzt)   = hyp(nzt+1) + rho_surface * g * 0.5 * dzu(nzt+1)
42
43    DO  k = nzt-1, 0, -1
44
45       sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) )
46       pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) )
47
48       rho_l = eqn_state_seawater_func( hyp(k+1), pt_l, sa_l )
49
50       hyp(k) = hyp(k+1) + rho_l * g * dzu(k+1)
51
52    ENDDO
53
54
55 END SUBROUTINE init_ocean
Note: See TracBrowser for help on using the repository browser.