Commit 4b76afff authored by Knut's avatar Knut
Browse files

replaced nml parameter advect_turbulence by turb_adv_[split|hor|ver]

parent f4075e88
<?xml version="1.0" ?>
<!-- this converter is currently an empty placeholder, but it is needed to tell xmlstore that direct conversion between 2.4 and 2.5 is permitted. -->
<converter source="getm-2.4" target="getm-2.5"/>
<converter source="getm-2.4" target="getm-2.5">
<custom>
<forward>
<![CDATA[
advect_turbulence = source['getm/m3d/advect_turbulence'].getValue(usedefault=True)
if advect_turbulence:
turb_adv_split = source['getm/m3d/vel3d_adv_split'].getValue(usedefault=True)
turb_adv_hor = source['getm/m3d/vel3d_adv_hor' ].getValue(usedefault=True)
turb_adv_ver = source['getm/m3d/vel3d_adv_ver' ].getValue(usedefault=True)
else:
turb_adv_split = 0
turb_adv_hor = 0
turb_adv_ver = 0
target['getm/m3d/turb_adv_split'].setValue(turb_adv_split)
target['getm/m3d/turb_adv_hor' ].setValue(turb_adv_hor )
target['getm/m3d/turb_adv_ver' ].setValue(turb_adv_ver )
]]>
</forward>
<backward>
<![CDATA[
turb_adv_hor = source['getm/m3d/turb_adv_hor'].getValue(usedefault=True)
turb_adv_ver = source['getm/m3d/turb_adv_ver'].getValue(usedefault=True)
advect_turbulence = (turb_adv_hor>0 and turb_adv_ver>0)
target['getm/m3d/advect_turbulence'].setValue(advect_turbulence)
]]>
</backward>
</custom>
</converter>
......@@ -289,6 +289,15 @@
<vel3d_adv_ver>
1
</vel3d_adv_ver>
<turb_adv_split>
0
</turb_adv_split>
<turb_adv_hor>
0
</turb_adv_hor>
<turb_adv_ver>
0
</turb_adv_ver>
<calc_temp>
True
</calc_temp>
......@@ -301,9 +310,6 @@
<avhback>
0.0
</avhback>
<advect_turbulence>
False
</advect_turbulence>
<ip_method>
1
</ip_method>
......
......@@ -410,11 +410,63 @@
<option value="6" label="TVD-P2-PDM (third-order, monotone)"/>
</options>
</element>
<element name="turb_adv_split" type="int" label="advection splitting for TKE and eps">
<condition type="ne" variable="./turb_adv_hor" value="0"/>
<options>
<option value="0" label="no split: one 3D uvw step"/>
<option value="1" label="full step splitting: u + v + w"/>
<option value="2" label="half step splitting: u/2 + v/2 + w + v/2 + u/2"/>
<option value="3" label="hor/ver splitting: uv + w"/>
</options>
</element>
<element name="turb_adv_hor" type="int" label="horizontal advection scheme for TKE and eps">
<options>
<option value="0" label="advection disabled"/>
<option value="1" label="upstream (first-order, monotone)"/>
<option value="2" label="2DH-upstream with forced monotonicity">
<condition type="or">
<condition type="eq" variable="./turb_adv_split" value="0"/>
<condition type="eq" variable="./turb_adv_split" value="3"/>
</condition>
</option>
<option value="3" label="P2 (third-order, non-monotone)"/>
<option value="4" label="TVD-Superbee (second-order, monotone)"/>
<option value="5" label="TVD-MUSCL (second-order, monotone)"/>
<option value="6" label="TVD-P2-PDM (third-order, monotone)"/>
<option value="7" label="2DH-J7">
<condition type="or">
<condition type="eq" variable="./turb_adv_split" value="0"/>
<condition type="eq" variable="./turb_adv_split" value="3"/>
</condition>
</option>
<option value="8" label="2DH-FCT">
<condition type="or">
<condition type="eq" variable="./turb_adv_split" value="0"/>
<condition type="eq" variable="./turb_adv_split" value="3"/>
</condition>
</option>
<option value="9" label="2DH-P2">
<condition type="or">
<condition type="eq" variable="./turb_adv_split" value="0"/>
<condition type="eq" variable="./turb_adv_split" value="3"/>
</condition>
</option>
</options>
</element>
<element name="turb_adv_ver" type="int" label="vertical advection scheme for TKE and eps">
<options>
<option value="0" label="advection disabled"/>
<option value="1" label="upstream (first-order, monotone)"/>
<option value="3" label="P2 (third-order, non-monotone)"/>
<option value="4" label="TVD-Superbee (second-order, monotone)"/>
<option value="5" label="TVD-MUSCL (second-order, monotone)"/>
<option value="6" label="TVD-P2-PDM (third-order, monotone)"/>
</options>
</element>
<element name="calc_temp" type="bool" label="solve temperature equation"/>
<element name="calc_salt" type="bool" label="solve salinity equation"/>
<element name="avmback" type="float" label="background viscosity" unit="m²/s"/>
<element name="avhback" type="float" label="background diffusivity" unit="m²/s"/>
<element name="advect_turbulence" type="bool" label="advect TKE and eps"/>
<element name="ip_method" type="int" label="internal pressure method">
<options>
<option value="1" label="Blumberg and Mellor"/>
......
......@@ -53,6 +53,9 @@
integer :: vel3d_adv_split=0
integer :: vel3d_adv_hor=1
integer :: vel3d_adv_ver=1
integer :: turb_adv_split=0
integer :: turb_adv_hor=0
integer :: turb_adv_ver=0
logical :: calc_temp=.true.
logical :: calc_salt=.true.
logical :: bdy3d=.false.
......@@ -119,8 +122,9 @@
bdy3d_tmrlx,bdy3d_tmrlx_ucut, &
bdy3d_tmrlx_max,bdy3d_tmrlx_min, &
vel3d_adv_split,vel3d_adv_hor,vel3d_adv_ver, &
turb_adv_split,turb_adv_hor,turb_adv_ver, &
calc_temp,calc_salt, &
avmback,avhback,advect_turbulence, &
avmback,avhback, &
ip_method,ip_ramp, &
vel_check,min_vel,max_vel
!EOP
......@@ -170,6 +174,38 @@
#endif
call print_adv_settings_3d(vel3d_adv_split,vel3d_adv_hor,vel3d_adv_ver,_ZERO_)
#ifndef CONSTANT_VISCOSITY
LEVEL2 'Advection of TKE and eps'
#ifdef NO_ADVECT
if (turb_adv_hor .ne. NOADV) then
LEVEL2 "reset turb_adv_hor= ",NOADV," because of"
LEVEL2 "obsolete NO_ADVECT macro. Note that this"
LEVEL2 "behaviour will be removed in the future."
turb_adv_hor = NOADV
end if
if (turb_adv_ver .ne. NOADV) then
LEVEL2 "reset turb_adv_ver= ",NOADV," because of"
LEVEL2 "obsolete NO_ADVECT macro. Note that this"
LEVEL2 "behaviour will be removed in the future."
turb_adv_ver = NOADV
end if
#endif
call print_adv_settings_3d(turb_adv_split,turb_adv_hor,turb_adv_ver,_ZERO_)
advect_turbulence = (turb_adv_hor.ne.NOADV .or. turb_adv_ver.ne.NOADV)
#ifdef TURB_ADV
if (.not. advect_turbulence) then
LEVEL2 "WARNING: ignored obsolete TURB_ADV macro!"
end if
#endif
#endif
! Sanity checks for bdy 3d
if (.not.openbdy .or. runtype.eq.2) bdy3d=.false.
if (bdy3d .and. bdy3d_tmrlx) then
......@@ -211,18 +247,6 @@
#else
num=1.d-15
nuh=1.d-15
#ifdef TURB_ADV
if (.not. advect_turbulence) then
LEVEL2 "reenabled advection of TKE and eps due to"
LEVEL2 "obsolete TURB_ADV macro. Note that this"
LEVEL2 "behaviour will be removed in the future!"
advect_turbulence = .true.
end if
#endif
LEVEL2 "advect_turbulence = ",advect_turbulence
#endif
! Needed for interpolation of temperature and salinity
......
......@@ -22,7 +22,7 @@
#else
use domain, only: dx,dy
#endif
use m3d, only: vel3d_adv_split,vel3d_adv_hor,vel3d_adv_ver
use m3d, only: turb_adv_split,turb_adv_hor,turb_adv_ver
use variables_3d, only: tke,eps,dt,uu,vv,ww,hun,hvn,ho,hn
use advection, only: J7
use advection_3d, only: do_advection_3d,W_TAG
......@@ -99,7 +99,7 @@
!$OMP END PARALLEL
if (vel3d_adv_hor .eq. J7) then
if (turb_adv_hor .eq. J7) then
#ifdef SLICE_MODEL
uuadv(:,j+1,:) = uuadv(:,j,:)
#endif
......@@ -133,10 +133,10 @@
call wait_halo(H_TAG)
call do_advection_3d(dt,tke,uuadv,vvadv,wwadv,huadv,hvadv,hoadv,hnadv, &
vel3d_adv_split,vel3d_adv_hor,vel3d_adv_ver,_ZERO_,W_TAG)
turb_adv_split,turb_adv_hor,turb_adv_ver,_ZERO_,W_TAG)
call do_advection_3d(dt,eps,uuadv,vvadv,wwadv,huadv,hvadv,hoadv,hnadv, &
vel3d_adv_split,vel3d_adv_hor,vel3d_adv_ver,_ZERO_,W_TAG)
turb_adv_split,turb_adv_hor,turb_adv_ver,_ZERO_,W_TAG)
tke = max(k_min,tke)
eps = max(eps_min,eps)
......
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