From d788fff8d4b1f09fe555f417f29495b8e1c00b18 Mon Sep 17 00:00:00 2001 From: Knut Date: Fri, 6 Jul 2012 12:33:42 +0200 Subject: [PATCH] initialise z[u|v]b for gotm --- src/2d/bottom_friction.F90 | 4 ++++ src/3d/variables_3d.F90 | 1 + src/domain/domain.F90 | 8 +++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/2d/bottom_friction.F90 b/src/2d/bottom_friction.F90 index 7f9ebafb..ad9ed9fc 100644 --- a/src/2d/bottom_friction.F90 +++ b/src/2d/bottom_friction.F90 @@ -85,6 +85,10 @@ !$OMP FIRSTPRIVATE(j) & !$OMP PRIVATE(i,vel,cd,it,z0d) + +! KK-TODO: the present implementation sets normal velocity outside open +! bdy cell to zero (we need proper mirror) + ! zonal velocity !$OMP DO SCHEDULE(RUNTIME) #ifndef SLICE_MODEL diff --git a/src/3d/variables_3d.F90 b/src/3d/variables_3d.F90 index 270dabce..f0744c3b 100644 --- a/src/3d/variables_3d.F90 +++ b/src/3d/variables_3d.F90 @@ -195,6 +195,7 @@ ssen = _ZERO_ ; ssun = _ZERO_ ; ssvn = _ZERO_ Dn = _ZERO_ ; Dun = _ZERO_ ; Dvn = _ZERO_ + zub = -9999.0 ; zvb = -9999.0 ! must be initialised for gotm if (bottfric_method .eq. 1) then rru = rdrag rrv = rdrag diff --git a/src/domain/domain.F90 b/src/domain/domain.F90 index 937f44e5..6d79ac17 100644 --- a/src/domain/domain.F90 +++ b/src/domain/domain.F90 @@ -395,6 +395,7 @@ call getm_error("init_domain()", & "non-positive bottom roughness"); end if + z0 = z0_const zub0 = z0_const zvb0 = z0_const case(3) @@ -422,7 +423,7 @@ end do case default call getm_error("init_domain()", & - "A non valid z0 method has been chosen"); + "A non valid bottfric method has been chosen"); end select if (bottfric_method.eq.2 .or. bottfric_method.eq.3) then if (cd_min .gt. _ZERO_) then @@ -433,6 +434,11 @@ if (z0d_iters .gt. 0) then LEVEL3 'iterations for dynamic bottom roughness: ',z0d_iters end if + else +#ifndef CONSTANT_VISCOSITY + call getm_error("init_domain()", & + "consistency with GOTM requires quadratic bottom friction"); +#endif end if #ifdef DEBUG -- GitLab