Commit e7526322 authored by kbk's avatar kbk
Browse files

different velocity point depth calculations using vel_depth_method

parent f0bf7b25
!$Id: m2d.F90,v 1.8 2003-09-13 10:00:51 kbk Exp $ !$Id: m2d.F90,v 1.9 2004-01-05 08:59:38 kbk Exp $
#include "cppdefs.h" #include "cppdefs.h"
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOP !BOP
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
! Original author(s): Karsten Bolding & Hans Burchard ! Original author(s): Karsten Bolding & Hans Burchard
! !
! $Log: m2d.F90,v $ ! $Log: m2d.F90,v $
! Revision 1.8 2003-09-13 10:00:51 kbk ! Revision 1.9 2004-01-05 08:59:38 kbk
! different velocity point depth calculations using vel_depth_method
!
! Revision 1.8 2003/09/13 10:00:51 kbk
! added numerical diffusion - An - to namelist - passed to uv_diffusion() ! added numerical diffusion - An - to namelist - passed to uv_diffusion()
! !
! Revision 1.7 2003/08/28 10:28:40 kbk ! Revision 1.7 2003/08/28 10:28:40 kbk
...@@ -136,6 +139,7 @@ ...@@ -136,6 +139,7 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: rc integer :: rc
integer :: vel_depth_method=0
namelist /m2d/ & namelist /m2d/ &
MM,z0_const,Am,An,residual,bdy2d,bdyfmt_2d,bdyramp_2d,bdyfile_2d MM,z0_const,Am,An,residual,bdy2d,bdyfmt_2d,bdyramp_2d,bdyfile_2d
!EOP !EOP
...@@ -185,7 +189,7 @@ ...@@ -185,7 +189,7 @@
!kbk if (have_boundaries) call init_2d_bdy(bdyfmt_2d,bdyfile_2d) !kbk if (have_boundaries) call init_2d_bdy(bdyfmt_2d,bdyfile_2d)
end if end if
call uv_depths() call uv_depths(vel_depth_method)
where ( -H+min_depth .gt. _ZERO_ ) where ( -H+min_depth .gt. _ZERO_ )
z = -H+min_depth z = -H+min_depth
......
!$Id: uv_depths.F90,v 1.7 2003-06-18 08:27:41 kbk Exp $ !$Id: uv_depths.F90,v 1.8 2004-01-05 08:59:38 kbk Exp $
#include "cppdefs.h" #include "cppdefs.h"
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOP !BOP
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
! !IROUTINE: uv_depths - calculate depths in u and v points. ! !IROUTINE: uv_depths - calculate depths in u and v points.
! !
! !INTERFACE: ! !INTERFACE:
subroutine uv_depths subroutine uv_depths(vel_depth_method)
! !
! !DESCRIPTION: ! !DESCRIPTION:
! !
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
IMPLICIT NONE IMPLICIT NONE
! !
! !INPUT PARAMETERS: ! !INPUT PARAMETERS:
integer, intent(in) :: vel_depth_method
! !
! !INPUT/OUTPUT PARAMETERS: ! !INPUT/OUTPUT PARAMETERS:
! !
...@@ -25,7 +26,10 @@ ...@@ -25,7 +26,10 @@
! Original author(s): Hans Burchard & Karsten Bolding ! Original author(s): Hans Burchard & Karsten Bolding
! !
! $Log: uv_depths.F90,v $ ! $Log: uv_depths.F90,v $
! Revision 1.7 2003-06-18 08:27:41 kbk ! Revision 1.8 2004-01-05 08:59:38 kbk
! different velocity point depth calculations using vel_depth_method
!
! Revision 1.7 2003/06/18 08:27:41 kbk
! using HALO in loop boundaries ! using HALO in loop boundaries
! !
! Revision 1.6 2003/05/12 09:22:39 kbk ! Revision 1.6 2003/05/12 09:22:39 kbk
...@@ -53,7 +57,7 @@ ...@@ -53,7 +57,7 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: i,j integer :: i,j
logical, save :: first=.true. REALTYPE :: d_crit=2.0
! !
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
...@@ -66,12 +70,41 @@ ...@@ -66,12 +70,41 @@
do j=jmin-HALO,jmax+HALO do j=jmin-HALO,jmax+HALO
do i=imin-HALO,imax+HALO-1 do i=imin-HALO,imax+HALO-1
HU(i,j)=0.5*(H(i,j)+H(i+1,j)) select case (vel_depth_method)
case (0)
HU(i,j)=0.5*(H(i,j)+H(i+1,j))
case (1)
HU(i,j)=min(H(i,j),H(i+1,j))
case (2)
if (H(i,j) .lt. d_crit .or. H(i+1,j) .lt. d_crit) then
HU(i,j)=min(H(i,j),H(i+1,j))
else
HU(i,j)=0.5*(H(i,j)+H(i+1,j))
end if
case default
call getm_error("uv_depths()", &
"vel_depth_method must be 0, 1 or 2")
end select
end do end do
end do end do
do j=jmin-HALO,jmax+HALO-1 do j=jmin-HALO,jmax+HALO-1
do i=imin-HALO,imax+HALO do i=imin-HALO,imax+HALO
HV(i,j)=0.5*(H(i,j)+H(i,j+1)) select case (vel_depth_method)
case (0)
HV(i,j)=0.5*(H(i,j)+H(i,j+1))
case (1)
HV(i,j)=min(H(i,j),H(i,j+1))
case (2)
if (H(i,j) .lt. d_crit .or. H(i,j+1) .lt. d_crit) then
HV(i,j)=min(H(i,j),H(i,j+1))
else
HV(i,j)=0.5*(H(i,j)+H(i,j+1))
end if
case default
call getm_error("uv_depths()", &
"vel_depth_method must be 0, 1 or 2")
end select
end do end do
end do end do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment