Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
georgu committed Oct 18, 2019
1 parent 58fab1d commit 4a27d85
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 117 deletions.
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

#-----------------------------------------------

.DS_Store

#-----------------------------------------------

fembfm1

arc
test
tmp
Expand All @@ -10,11 +16,9 @@ private

/lib
/bin
#fem3d/bin
bugs

femmpi
#rules
stable
femdoc/old/

Expand Down Expand Up @@ -245,6 +249,10 @@ fembin/mesh
fembin/exgrd

#-----------------------------------------------

# compiled examples
#-----------------------------------------------

Output

#-----------------------------------------------

19 changes: 19 additions & 0 deletions COMMIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
============================================================

Fri Oct 18 18:19:26 CEST 2019

bug fixes

.gitignore | 14 +++++++++---
Rules.make | 2 ++
fem3d/Makefile | 8 ++++---
fem3d/newbfm.f | 4 ++--
fem3d/subfind.f | 42 +++-------------------------------
fem3d/submask.f | 58 +----------------------------------------------
fem3d/subsys.f | 2 +-
femcheck/rules/Rules.dist | 2 ++
femcheck/test_compile.sh | 2 ++
femplot/mod_hydro_plot.f | 4 ++--
femplot/supano.f | 15 ++++++------
11 files changed, 38 insertions(+), 115 deletions(-)

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

Thu Oct 17 16:36:54 CEST 2019

several small changes
Expand Down
2 changes: 2 additions & 0 deletions Rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ ECOLOGICAL = NONE
#
# BFM model - how to
#
# this feature is still experimental - no support
#
# to integrate the BFM model the following has to be done:
# 1) set "NETCDF = true" in the lines above (BFM needs NETCDF)
# 2) set "ECOLOGICAL = BFM" in the lines above
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-18

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

version 7_5_64 19-07-2019 VERS_7_5_64 commit_2019-10-17
Expand Down
8 changes: 5 additions & 3 deletions fem3d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ ECOLOGICAL_OBJ = ecological_dummy.o newbfm_dummy.o
ifeq ($(ECOLOGICAL),EUTRO)
ECOLOGICAL_OBJ = bio3d.o bio3d_util.o \
weutro.o weutro_sedim.o weutro_light.o \
weutro_seed.o weutro_shell.o weutro_ulva.o
weutro_seed.o weutro_shell.o weutro_ulva.o \
newbfm_dummy.o
endif
ifeq ($(ECOLOGICAL),ERSEM)
ECOLOGICAL_OBJ = subbfm.o
ECOLOGICAL_OBJ = subbfm.o newbfm_dummy.o
LIBG_ERSEM = -l$(LIBERSEM)
LIBF_ERSEM = $(DIRLIB)/lib$(LIBERSEM).a
endif
Expand All @@ -168,7 +169,8 @@ ifeq ($(ECOLOGICAL),AQUABC)
aquabc_II_co2sys.o aquabc_II_apara.o aquabc_II_util.o \
aquabc_II_sediment_model_1.o aquabc_II_sediment_lib.o \
aquabc_II_pelagic_model.o aquabc_II.o \
aquabc_II_ini.o aquabc_II_svindex.o
aquabc_II_ini.o aquabc_II_svindex.o \
newbfm_dummy.o
endif
ifeq ($(ECOLOGICAL),BFM)
LIBBFM = bfm
Expand Down
4 changes: 2 additions & 2 deletions fem3d/newbfm.f
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ subroutine bfm_compute

do i=1,nvar

!$OMP TASK FIRSTPRIVATE(i,rkpar,wsink,difhv,difv,difmol,idbfm,what,
!$OMP& dt,nlvdi) SHARED(bfmv) DEFAULT(NONE)
!$OMP TASK FIRSTPRIVATE(i,rkpar,wsink,difhv,difv,difmol,idbfm,what
!$OMP& ,nlvdi) SHARED(bfmv) DEFAULT(NONE)

! use scal_adv_fact to pass wsink matrix into advection

Expand Down
42 changes: 3 additions & 39 deletions fem3d/subfind.f
Original file line number Diff line number Diff line change
Expand Up @@ -27,51 +27,14 @@
c
c contents :
c
c subroutine setgeo(x0,y0,dx,dy,flag)
c sets grid values for interpolation
c subroutine getgeo(x0,y0,dx,dy,flag)
c gets grid values for interpolation
c subroutine getgeoflag(flag)
c gets flag value for interpolation
c
c subroutine av2am(av,am,ip,jp)
c interpolation of av onto a regular net
c subroutine av2amk(bwater,av,am,ip,jp)
c interpolation of av onto a regular net
c function intri(x,y,xp,yp)
c point in triangle or not
c function intrid(x,y,xp,yp)
c point in triangle or not (double precision version)
c subroutine am2av(am,av,ip,jp)
c interpolation of am onto finite element mesh
c function am2val(am,ip,jp,xx,yy)
c interpolation of am onto finite element mesh
c subroutine ave2am(av,am,ip,jp)
c interpolation of av (elementwise) onto a regular net
c
c subroutine mkmask(bwater,zv,href,hzoff)
c makes mask in element
c
c subroutine mimareg(am,ip,jp,amin,amax)
c computes min/max of regular matrix (without flag values)
c subroutine a2char(am,ac,ip,jp)
c creates 1 char representation of matrix
c subroutine prchar(ac,ip,jp)
c prints 1 char representation of matrix
c
c subroutine femintp(ie,z,xp,yp,zp)
c interpolation in element (with ev)
c subroutine elemintp(x,y,z,xp,yp,zp)
c interpolation in element (no ev)
c
c subroutine find_close_elem(ieold,xp,yp,ielem)
c finds element for point (xp,yp) starting from ieold
c subroutine find_elem_from_old(ieold,xp,yp,ielem)
c finds element for point (xp,yp) starting from ieold
c subroutine find_element(xp,yp,ielem)
c finds element for point (xp,yp)
c function in_element(ie,xp,yp)
c checks if point (xp,yp) is in element ie
c subroutine get_xy_elem(ie,x,y)
c returns x,y of vertices of element ie
c
c revision log :
c
Expand Down Expand Up @@ -102,6 +65,7 @@
c 25.05.2017 ggu changed VERS_7_5_28
c 16.02.2019 ggu changed VERS_7_5_60
c 13.03.2019 ggu changed VERS_7_5_61
c 18.10.2019 ggu cleaned contents
c
c notes :
c
Expand Down
58 changes: 1 addition & 57 deletions fem3d/submask.f
Original file line number Diff line number Diff line change
Expand Up @@ -27,52 +27,6 @@
c
c contents :
c
c subroutine setgeo(x0,y0,dx,dy,flag)
c sets grid values for interpolation
c subroutine getgeo(x0,y0,dx,dy,flag)
c gets grid values for interpolation
c subroutine getgeoflag(flag)
c gets flag value for interpolation
c
c subroutine av2am(av,am,ip,jp)
c interpolation of av onto a regular net
c subroutine av2amk(bwater,av,am,ip,jp)
c interpolation of av onto a regular net
c function intri(x,y,xp,yp)
c point in triangle or not
c function intrid(x,y,xp,yp)
c point in triangle or not (double precision version)
c subroutine am2av(am,av,ip,jp)
c interpolation of am onto finite element mesh
c function am2val(am,ip,jp,xx,yy)
c interpolation of am onto finite element mesh
c subroutine ave2am(av,am,ip,jp)
c interpolation of av (elementwise) onto a regular net
c
c subroutine mkmask(bwater,zv,href,hzoff)
c makes mask in element
c
c subroutine mimareg(am,ip,jp,amin,amax)
c computes min/max of regular matrix (without flag values)
c subroutine a2char(am,ac,ip,jp)
c creates 1 char representation of matrix
c subroutine prchar(ac,ip,jp)
c prints 1 char representation of matrix
c
c subroutine femintp(ie,z,xp,yp,zp)
c interpolation in element (with ev)
c subroutine elemintp(x,y,z,xp,yp,zp)
c interpolation in element (no ev)
c
c subroutine find_elem_from_old(ieold,xp,yp,ielem)
c finds element for point (xp,yp) starting from ieold
c subroutine find_element(xp,yp,ielem)
c finds element for point (xp,yp)
c function in_element(ie,xp,yp)
c checks if point (xp,yp) is in element ie
c subroutine get_xy_elem(ie,x,y)
c returns x,y of vertices of element ie
c
c revision log :
c
c 18.11.1998 ggu routine commented
Expand Down Expand Up @@ -103,12 +57,7 @@
c 11.07.2017 ggu changed VERS_7_5_30
c 16.02.2019 ggu changed VERS_7_5_60
c 13.03.2019 ggu changed VERS_7_5_61
c
c notes :
c
c pxareg,pyareg coordinates of lower left point of matrix
c pxdreg,pydreg grid size of matrix
c pzlreg value of z for land points
c 18.10.2019 ggu cleaned contents
c
c******************************************************
c******************************************************
Expand Down Expand Up @@ -175,18 +124,13 @@ subroutine set_level_mask(bwater,ilhv,level)

nedry = 0

!write(6,*) 'set_level_mask: ',level
!write(6,*) (ilhv(ie),ie=1,nel,nel/10)

do ie=1,nel
if( level .gt. ilhv(ie) ) then
bwater(ie) = .false.
nedry = nedry + 1
end if
end do

!write(6,*) 'level exist (dry/wet/total): ',nedry,nel-nedry,nel

end

c******************************************************
Expand Down
2 changes: 1 addition & 1 deletion fem3d/subsys.f
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ subroutine nlsinh_general
c value of 2 will guarantee that the program will not
c abort and continue running, but it might not
c be doing what you intended. (Default 0)
c |flgrst| This variable indicateswhich variables are read
c |flgrst| This variable indicates which variables are read
c from the restart file. By default all available
c variables are read and used. If some variables
c are not wanted (because, e.g., you want to restart
Expand Down
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-17}
c \newcommand{\COMMIT}{2019-10-18}
c
c DOCS END

implicit none

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

character*40, parameter :: string = text//version//' '//commit
Expand Down
2 changes: 2 additions & 0 deletions femcheck/rules/Rules.dist
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ ECOLOGICAL = NONE
#
# BFM model - how to
#
# this feature is still experimental - no support
#
# to integrate the BFM model the following has to be done:
# 1) set "NETCDF = true" in the lines above (BFM needs NETCDF)
# 2) set "ECOLOGICAL = BFM" in the lines above
Expand Down
2 changes: 2 additions & 0 deletions femcheck/test_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Clean_before()
cp $rules_dist ./Rules.make
[ -f allstdout.txt ] && rm allstdout.txt
[ -f allstderr.txt ] && rm allstderr.txt
make cleanall
}

Clean_after()
Expand All @@ -54,6 +55,7 @@ Clean_after()
mv -f $rules_save ./Rules.make
[ -f allstdout.txt ] && mv allstdout.txt allstdout.tmp
[ -f allstderr.txt ] && mv allstderr.txt allstderr.tmp
make cleanall
}

SetUp()
Expand Down
4 changes: 2 additions & 2 deletions femplot/mod_hydro_plot.f
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ module mod_hydro_plot

logical, allocatable, save :: bwater(:)
logical, allocatable, save :: bkwater(:)
logical, allocatable, save :: bplot(:)
logical, allocatable, save :: bkplot(:)
logical, allocatable, save :: bplot(:) !.false. if iarv(ie) == ianopl
logical, allocatable, save :: bkplot(:) !.false. if iarv(ie) == ianopl

real, allocatable, save :: fvlv(:,:)
real, allocatable, save :: wauxv(:,:)
Expand Down
15 changes: 7 additions & 8 deletions femplot/supano.f
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ subroutine occupy(iquad)

integer iqc(4)

logical bplot
logical bwrite
character*80 line
integer i,j,k,n
integer iq,jq,ip
Expand All @@ -2116,8 +2116,8 @@ subroutine occupy(iquad)
save ijq
data ijq /1,2,4,3/

bplot = bbverb
bplot = .false.
bwrite = bbverb
bwrite = .false.

do j=1,ndim
do i=1,ndim
Expand All @@ -2144,10 +2144,9 @@ subroutine occupy(iquad)

n = min(ndim,80)

if( bplot ) write(6,*) 'occupy... ',n,ndim,x0,y0,x1,y1

if( bplot ) then
do j=n,1,-1
if( bwrite ) then
write(6,*) 'occupy... ',n,ndim,x0,y0,x1,y1
do j=n,1,-1
do i=1,n
if( ia(i,j) .ne. 0 ) then
line(i:i) = '*'
Expand All @@ -2156,7 +2155,7 @@ subroutine occupy(iquad)
end if
end do
write(6,*) line(1:n)
end do
end do
end if

do i=1,4
Expand Down

0 comments on commit 4a27d85

Please sign in to comment.