Skip to content

Commit

Permalink
bsdry for bottom stress
Browse files Browse the repository at this point in the history
  • Loading branch information
georgu committed Oct 31, 2019
1 parent 151f765 commit d3fa24d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 10 deletions.
10 changes: 10 additions & 0 deletions COMMIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
============================================================

Thu Oct 31 16:13:26 CET 2019

bsdry for bottom stress

fem3d/substress.f | 35 +++++++++++++++++++++++++++++------
fembin/diffs | 7 +++++--
2 files changed, 34 insertions(+), 8 deletions(-)

============================================================

Fri Oct 25 15:29:03 CEST 2019

sedi3d bug fix
Expand Down
2 changes: 2 additions & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version 7_5_64 19-07-2019 VERS_7_5_64 commit_2019-10-31

version 7_5_64 19-07-2019 VERS_7_5_64 commit_2019-10-25

version 7_5_64 19-07-2019 VERS_7_5_64 commit_2019-10-24
Expand Down
35 changes: 29 additions & 6 deletions fem3d/substress.f
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
! 14.02.2019 ggu changed VERS_7_5_56
! 16.02.2019 ggu changed VERS_7_5_60
! 13.03.2019 ggu changed VERS_7_5_61
! 31.10.2019 ggu introduced bdry, bugfix for wave bottom stress (depth<0)
!
!*****************************************************************

Expand All @@ -41,9 +42,11 @@ module mod_bstress

implicit none

integer, private, save :: nkn_stres = 0
integer, private, save :: nkn_stress = 0
real, allocatable, save :: taubot(:) !bottom shear stress [N/m2]

logical, save :: bsdry = .true. !compute stress in dry areas

integer, save :: ibstress = 0 !parameter for stress module
double precision, save :: da_str(4) = 0 !for output

Expand All @@ -55,7 +58,7 @@ subroutine mod_bstress_init(nkn)

integer :: nkn

if( nkn == nkn_stres ) return
if( nkn == nkn_stress ) return

if( nkn > 0 ) then
if( nkn == 0 ) then
Expand All @@ -64,11 +67,11 @@ subroutine mod_bstress_init(nkn)
end if
end if

if( nkn_stres > 0 ) then
if( nkn_stress > 0 ) then
deallocate(taubot)
end if

nkn_stres = nkn
nkn_stress = nkn

if( nkn == 0 ) return

Expand Down Expand Up @@ -184,7 +187,9 @@ subroutine current_bottom_stress(taucur)
use levels
use evgeom
use mod_diff_visc_fric
use mod_geom_dynamic
use mod_ts
use mod_bstress

implicit none

Expand All @@ -210,8 +215,10 @@ subroutine current_bottom_stress(taucur)
do ii=1,3
k = nen3v(ii,ie)
rho = rowass + rhov(lmax,k)
taucur(k) = taucur(k) + rho * bnstress * area
aux(k) = aux(k) + area
if( bsdry .or. iwegv(ie) == 0 ) then
taucur(k) = taucur(k) + rho * bnstress * area
aux(k) = aux(k) + area
end if
end do
end do

Expand Down Expand Up @@ -268,6 +275,7 @@ subroutine compute_wave_bottom_stress(h,p,depth,z0,tauw)

tauw = 0.
if( p == 0. ) return
if( depth <= 0. ) return !bug fix

omega = 2.*pi/p
zeta = omega * omega * depth / grav
Expand All @@ -292,3 +300,18 @@ subroutine compute_wave_bottom_stress(h,p,depth,z0,tauw)
end subroutine compute_wave_bottom_stress

c******************************************************************

subroutine compute_bstress_dry(bset)

use mod_bstress

implicit none

logical bset

bsdry = bset

end

c******************************************************************

4 changes: 2 additions & 2 deletions fem3d/subver.f
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ module shyfem_version
c
c \newcommand{\VERSION}{7.5.64}
c \newcommand{\version}{7\_5\_64}
c \newcommand{\COMMIT}{2019-10-25}
c \newcommand{\COMMIT}{2019-10-31}
c
c DOCS END

implicit none

character*10, parameter :: version = '7.5.64'
character*10, parameter :: commit = '2019-10-25'
character*10, parameter :: commit = '2019-10-31'
character*17, parameter :: text = 'SHYFEM VERSION = '

character*40, parameter :: string = text//version//' '//commit
Expand Down
7 changes: 5 additions & 2 deletions fembin/diffs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
################################################################
#
# version 2.13 31.10.2019 no error when comparing dirs (not existing)
# version 2.12 01.10.2019 make recursive -R work
# version 2.11 16.07.2019 new option -g (use gui to show diff)
# version 2.10 16.07.2019 new option -R (recurse into directories)
Expand Down Expand Up @@ -228,7 +229,8 @@ Confirm() #must confirm before anything else

Ok()
{
echo $1
#echo $1
echo $printfile
}

Differing()
Expand All @@ -239,7 +241,8 @@ Differing()

Nonexisting()
{
echo $1
[ ! -f $locdir/$1 ] && return
echo $printfile
Update $update $1
}

Expand Down

0 comments on commit d3fa24d

Please sign in to comment.