Commit 75621142 authored by Knut's avatar Knut
Browse files

moved uv_depths from 2d to domain

parent 4114d6d1
......@@ -49,7 +49,6 @@
<File RelativePath="..\..\src\2d\sealevel.F90"/>
<File RelativePath="..\..\src\2d\update_2d_bdy.F90"/>
<File RelativePath="..\..\src\2d\uv_advect.F90"/>
<File RelativePath="..\..\src\2d\uv_depths.F90"/>
<File RelativePath="..\..\src\2d\uv_diffusion.F90"/>
<File RelativePath="..\..\src\2d\variables_2d.F90"/></Filter>
<Filter Name="3d">
......@@ -107,6 +106,7 @@
<Filter Name="domain">
<File RelativePath="..\..\src\domain\bdy_spec.F90"/>
<File RelativePath="..\..\src\domain\domain.F90"/>
<File RelativePath="..\..\src\domain\uv_depths.F90"/>
<File RelativePath="..\..\src\domain\mirror_bdy_2d.F90"/>
<File RelativePath="..\..\src\domain\mirror_bdy_3d.F90"/>
<File RelativePath="..\..\src\domain\part_domain.F90"/>
......
......@@ -40,7 +40,6 @@
<File RelativePath="..\..\src\2d\sealevel.F90"/>
<File RelativePath="..\..\src\2d\update_2d_bdy.F90"/>
<File RelativePath="..\..\src\2d\uv_advect.F90"/>
<File RelativePath="..\..\src\2d\uv_depths.F90"/>
<File RelativePath="..\..\src\2d\uv_diffusion.F90"/>
<File RelativePath="..\..\src\2d\variables_2d.F90"/></Filter>
<Filter Name="3d">
......@@ -97,6 +96,7 @@
<Filter Name="domain">
<File RelativePath="..\..\src\domain\bdy_spec.F90"/>
<File RelativePath="..\..\src\domain\domain.F90"/>
<File RelativePath="..\..\src\domain\uv_depths.F90"/>
<File RelativePath="..\..\src\domain\mirror_bdy_2d.F90"/>
<File RelativePath="..\..\src\domain\mirror_bdy_3d.F90"/>
<File RelativePath="..\..\src\domain\part_domain.F90"/>
......
......@@ -5,4 +5,3 @@
<link source="/getm/io_spec/save_mix_analysis" target="/getm/io_spec/save_numerical_analyses"/>
</links>
</converter>
<?xml version="1.0" ?>
<!-- this converter is currently an empty placeholder, but it is needed to tell xmlstore that direct conversion between 1.8 and 2.0 is permitted. -->
<converter source="getm-2.2" target="getm-2.3"/>
<converter source="getm-2.2" target="getm-2.3">
<links>
<link source="/getm/m2d/vel_depth_method" target="/getm/domain/vel_depth_method"/>
</links>
</converter>
......@@ -54,6 +54,9 @@
<bathymetry>
topo.nc
</bathymetry>
<vel_depth_method>
0
</vel_depth_method>
<longitude>
0.0
</longitude>
......@@ -189,9 +192,6 @@
<MM>
1
</MM>
<vel_depth_method>
0
</vel_depth_method>
<Am>
-1.0
</Am>
......
......@@ -52,6 +52,13 @@
<condition type="eq" variable="./vert_cord" value="3"/>
</element>
<element name="bathymetry" type="string" label="name of file with bathymetry and grid" />
<element name="vel_depth_method" type="int" label="vel_depth_method">
<options>
<option value="0" label="use mean value of neighboring H points (default)"/>
<option value="1" label="use minimum value of neighboring H points"/>
<option value="2" label="use mixture of mean and minimum values: see code for details"/>
</options>
</element>
<element name="longitude" type="float" unit="° East" description="Longitude used for calculating short wave radiation (if not from bathymetry file)"/>
<element name="latitude" type="float" unit="° North" description="Latitude used for meteo and the Coriolis force (if not from bathymetry file)"/>
<element name="f_plane" type="bool" label="compute (constant) f latitude (otherwise calculated from latitude,longitude in bathymetry)"/>
......@@ -219,13 +226,6 @@
<element name="m2d" label="variables related to 2D model">
<element name="MM" type="int" label="time steps between calls to bottom_friction()" unit="micro time steps" minInclusive="0"/>
<element name="vel_depth_method" type="int" label="vel_depth_method">
<options>
<option value="0" label="use mean value of neighboring H points (default)"/>
<option value="1" label="use minimum value of neighboring H points"/>
<option value="2" label="use mixture of mean and minimum values: see code for details"/>
</options>
</element>
<element name="Am" type="float" label="constant horizontal momentum diffusion coefficient" unit="m²/s"/>
<element name="An_method" type="int" label="method for constant horizontal numerical diffusion coefficient (m²/s) used to filter the surface elevation">
<options>
......
......@@ -9,7 +9,7 @@ LIB = $(LIBDIR)/lib2d${buildtype}.a
MODSRC = m2d.F90 variables_2d.F90
LIBSRC = momentum.F90 uv_advect.F90 uv_diffusion.F90 bottom_friction.F90 sealevel.F90 depth_update.F90 uv_depths.F90 update_2d_bdy.F90 cfl_check.F90 have_bdy.F90 residual.F90
LIBSRC = momentum.F90 uv_advect.F90 uv_diffusion.F90 bottom_friction.F90 sealevel.F90 depth_update.F90 update_2d_bdy.F90 cfl_check.F90 have_bdy.F90 residual.F90
SRC = $(MODSRC) $(LIBSRC)
......@@ -25,7 +25,6 @@ ${LIB}(momentum.o) \
${LIB}(sealevel.o) \
${LIB}(uv_advect.o) \
${LIB}(uv_diffusion.o) \
${LIB}(uv_depths.o) \
${LIB}(have_bdy.o) \
${LIB}(residual.o) \
${LIB}(update_2d_bdy.o)
......
......@@ -100,9 +100,8 @@
! !LOCAL VARIABLES:
integer :: rc
integer :: i,j
integer :: vel_depth_method=0
namelist /m2d/ &
MM,vel_depth_method,Am,An_method,An_const,An_file,residual, &
MM,Am,An_method,An_const,An_file,residual, &
sealevel_check,bdy2d,bdyfmt_2d,bdyramp_2d,bdyfile_2d
!EOP
!-------------------------------------------------------------------------
......@@ -221,8 +220,6 @@
LEVEL2 'Format=',bdyfmt_2d
end if
call uv_depths(vel_depth_method)
where ( -H+min_depth .gt. _ZERO_ )
z = -H+min_depth
end where
......
......@@ -10,7 +10,7 @@ LIB = $(LIBDIR)/libdomain${buildtype}.a
MODSRC = domain.F90
LIBSRC = part_domain.F90 bdy_spec.F90 print_bdy.F90 \
LIBSRC = part_domain.F90 uv_depths.F90 bdy_spec.F90 print_bdy.F90 \
mirror_bdy_2d.F90 mirror_bdy_3d.F90
SRC = $(MODSRC) $(LIBSRC)
......@@ -21,6 +21,7 @@ ${LIB}(domain.o)
OBJ = \
${LIB}(part_domain.o) \
${LIB}(uv_depths.o) \
${LIB}(bdy_spec.o) \
${LIB}(print_bdy.o) \
${LIB}(mirror_bdy_2d.o) \
......
......@@ -148,13 +148,15 @@
integer :: i,j,n
integer :: kdum
character(len=PATH_MAX) :: bathymetry = 'topo.nc'
integer :: vel_depth_method=0
character(len=PATH_MAX) :: bdyinfofile = 'bdyinfo.dat'
character(len=PATH_MAX) :: min_depth_file = 'minimum_depth.dat'
character(len=PATH_MAX) :: bathymetry_adjust_file = 'bathymetry.adjust'
character(len=PATH_MAX) :: mask_adjust_file = 'mask.adjust'
integer :: il=-1,ih=-1,jl=-1,jh=-1
namelist /domain/ &
vert_cord,maxdepth,bathy_format,bathymetry, &
vert_cord,maxdepth, &
bathy_format,bathymetry,vel_depth_method, &
longitude,latitude,f_plane,openbdy,bdyinfofile, &
crit_depth,min_depth,kdum,ddu,ddl, &
d_gamma,gamma_surf,il,ih,jl,jh,z0_method,z0_const
......@@ -233,6 +235,8 @@
call update_2d_halo(H,H,az,imin,jmin,imax,jmax,H_TAG,mirror=.true.)
call wait_halo(H_TAG)
call uv_depths(vel_depth_method)
! Reads boundary location information
if (openbdy) then
call bdy_spec(trim(input_dir) // bdyinfofile)
......
......@@ -45,7 +45,6 @@
! !USES:
use exceptions
use domain, only: imin,imax,jmin,jmax,az,au,av,H,HU,HV
use variables_2d, only: DU,DV
use getm_timers, only: tic,toc,TIM_UVDEPTHS
IMPLICIT NONE
!
......@@ -72,14 +71,14 @@
do i=imin-HALO,imax+HALO-1
select case (vel_depth_method)
case (0)
HU(i,j)=0.5*(H(i,j)+H(i+1,j))
HU(i,j) = _HALF_ * ( 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))
HU(i,j) = _HALF_ * ( H(i,j) + H(i+1,j) )
end if
case default
call getm_error("uv_depths()", &
......@@ -92,14 +91,14 @@
do i=imin-HALO,imax+HALO
select case (vel_depth_method)
case (0)
HV(i,j)=0.5*(H(i,j)+H(i,j+1))
HV(i,j) = _HALF_ * ( 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))
HV(i,j) = _HALF_ * ( H(i,j) + H(i,j+1) )
end if
case default
call getm_error("uv_depths()", &
......@@ -116,7 +115,6 @@
return
end subroutine uv_depths
!EOC
!-----------------------------------------------------------------------
! Copyright (C) 2001 - Hans Burchard and Karsten Bolding !
!-----------------------------------------------------------------------
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