SUBROUTINE init_ocean !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! hydro_press renamed hyp ! ! Former revisions: ! ------------------ ! $Id:$ ! ! Initial revision (raasch 01/06/07) ! ! Description: ! ------------ ! Initialization of quantities needed for the ocean version !------------------------------------------------------------------------------! USE arrays_3d USE control_parameters USE eqn_state_seawater_mod USE grid_variables USE indices IMPLICIT NONE INTEGER :: k REAL :: sa_l, pt_l, rho_l ALLOCATE( hyp(nzb:nzt+1) ) ! !-- Set water density near the ocean surface rho_surface = 1027.62 ! !-- Calculate initial vertical profile of hydrostatic pressure (in Pa) hyp(nzt+1) = surface_pressure * 100.0 hyp(nzt) = hyp(nzt+1) + rho_surface * g * 0.5 * dzu(nzt+1) DO k = nzt-1, 0, -1 sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) ) pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) ) rho_l = eqn_state_seawater_func( hyp(k+1), pt_l, sa_l ) hyp(k) = hyp(k+1) + rho_l * g * dzu(k+1) ENDDO END SUBROUTINE init_ocean