From d3fa24daad9642bc8509702cc1f2e6c1d27c2345 Mon Sep 17 00:00:00 2001 From: Georg Umgiesser Date: Thu, 31 Oct 2019 16:13:29 +0100 Subject: [PATCH] bsdry for bottom stress --- COMMIT | 10 ++++++++++ VERSION | 2 ++ fem3d/substress.f | 35 +++++++++++++++++++++++++++++------ fem3d/subver.f | 4 ++-- fembin/diffs | 7 +++++-- 5 files changed, 48 insertions(+), 10 deletions(-) diff --git a/COMMIT b/COMMIT index 99acc845..ec652439 100644 --- a/COMMIT +++ b/COMMIT @@ -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 diff --git a/VERSION b/VERSION index 1d3dd415..2106276c 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/fem3d/substress.f b/fem3d/substress.f index 9817b50c..07cbd3ef 100644 --- a/fem3d/substress.f +++ b/fem3d/substress.f @@ -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) ! !***************************************************************** @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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****************************************************************** + diff --git a/fem3d/subver.f b/fem3d/subver.f index 60442ba7..cd62e4a2 100644 --- a/fem3d/subver.f +++ b/fem3d/subver.f @@ -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 diff --git a/fembin/diffs b/fembin/diffs index df3f2203..174e043a 100755 --- a/fembin/diffs +++ b/fembin/diffs @@ -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) @@ -228,7 +229,8 @@ Confirm() #must confirm before anything else Ok() { - echo $1 + #echo $1 + echo $printfile } Differing() @@ -239,7 +241,8 @@ Differing() Nonexisting() { - echo $1 + [ ! -f $locdir/$1 ] && return + echo $printfile Update $update $1 }