Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/sfincs_lib/sfincs_lib.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<File RelativePath="..\src\sfincs_crosssections.f90"/>
<File RelativePath="..\src\sfincs_data.f90"/>
<File RelativePath="..\src\sfincs_data.f90"/>
<File RelativePath="..\src\sfincs_timers.f90"/>
<File RelativePath="..\src\sfincs_date.f90"/>
<File RelativePath="..\src\sfincs_discharges.f90">
</File>
Expand Down
1 change: 1 addition & 0 deletions source/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ libsfincs_la_SOURCES = \
../third_party_open/utils/toml-f/src/tomlf/build.f90 \
../third_party_open/utils/toml-f/src/tomlf/all.f90 \
../third_party_open/utils/toml-f/src/tomlf.f90 \
sfincs_timers.f90 \
sfincs_log.f90 \
sfincs_date.f90 \
sfincs_read.f90 \
Expand Down
14 changes: 4 additions & 10 deletions source/src/sfincs_bathtub.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,18 @@ subroutine initialize_bathtub()
end subroutine


subroutine bathtub_compute_water_levels(tloop)
subroutine bathtub_compute_water_levels()
!
use sfincs_data
use sfincs_timers
use geometry
!
implicit none
!
integer :: count0
integer :: count1
integer :: count_rate
integer :: count_max
real :: tloop
!
integer :: nm, i1, i2
real*4 :: zbt, w1, w2
!
call system_clock(count0, count_rate, count_max)
call timer_start('continuity')
!
!$omp parallel &
!$omp private ( nm, i1, i2, w1, w2 )
Expand Down Expand Up @@ -168,8 +163,7 @@ subroutine bathtub_compute_water_levels(tloop)
!
!$acc update device( zs, zsmax )
!
call system_clock(count1, count_rate, count_max)
tloop = tloop + 1.0 * (count1 - count0) / count_rate
call timer_stop('continuity')
!
end subroutine

Expand Down
20 changes: 7 additions & 13 deletions source/src/sfincs_boundaries.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1123,26 +1123,21 @@ subroutine update_boundary_fluxes(dt, t)



subroutine update_boundaries(t, dt, tloop)
subroutine update_boundaries(t, dt)
!
! Update all boundary conditions
!
use sfincs_data
use sfincs_timers
!
implicit none
!
integer :: count0
integer :: count1
integer :: count_rate
integer :: count_max
real :: tloop
!
real*8 :: t
real*4 :: dt
!
call system_clock(count0, count_rate, count_max)
!
if (boundaries_in_mask) then
!
call timer_start('boundaries')
!
if (nbnd > 0) then
!
Expand All @@ -1156,7 +1151,7 @@ subroutine update_boundaries(t, dt, tloop)
! as these are not used in bathtub mode
!
if (.not. bathtub) then
!
!
! Update boundary conditions at grid points (water levels)
!
call update_boundary_conditions(t, dt)
Expand All @@ -1167,11 +1162,10 @@ subroutine update_boundaries(t, dt, tloop)
!
endif
!
call timer_stop('boundaries')
!
endif
!
call system_clock(count1, count_rate, count_max)
tloop = tloop + 1.0 * (count1 - count0) / count_rate
!
end subroutine
!
!
Expand Down
13 changes: 4 additions & 9 deletions source/src/sfincs_continuity.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ module sfincs_continuity

contains

subroutine compute_water_levels(t, dt, tloop)
subroutine compute_water_levels(t, dt)
!
use sfincs_data
use sfincs_timers
!
implicit none
!
real*4 :: dt
real*8 :: t
!
integer :: count0
integer :: count1
integer :: count_rate
integer :: count_max
real :: tloop
!
call system_clock(count0, count_rate, count_max)
call timer_start('continuity')
!
if (subgrid) then
!
Expand All @@ -37,8 +33,7 @@ subroutine compute_water_levels(t, dt, tloop)
!
endif
!
call system_clock(count1, count_rate, count_max)
tloop = tloop + 1.0*(count1 - count0)/count_rate
call timer_stop('continuity')
!
end subroutine

Expand Down
3 changes: 0 additions & 3 deletions source/src/sfincs_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module sfincs_data
character*256 :: build_revision, build_date
!!!!
!!! Time variables
real :: tstart_all, tfinish_all
real*4 :: dtavg
real*4 :: min_dt
!!!
Expand Down Expand Up @@ -34,8 +33,6 @@ module sfincs_data
real*4 gn2
real*4 t0
real*4 t1
real*4 t3
real*4 t4
real*4 dx
real*4 dy
real*4 dxinv
Expand Down
2 changes: 1 addition & 1 deletion source/src/sfincs_date.f90
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function time_to_vector(t_sec, tref_string) result (date_time_vector)
!
subroutine timer(t)
real*4,intent(out) :: t
integer*4 :: count,count_rate,count_max
integer*8 :: count,count_rate,count_max
call system_clock (count,count_rate,count_max)
t = dble(count)/count_rate
end subroutine timer
Expand Down
13 changes: 4 additions & 9 deletions source/src/sfincs_discharges.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ subroutine read_discharges()
! Reads discharge files
!
use sfincs_data
use sfincs_timers
use sfincs_ncinput
use quadtree
!
Expand Down Expand Up @@ -322,19 +323,14 @@ subroutine read_discharges()
!
!
!
subroutine update_discharges(t, dt, tloop)
subroutine update_discharges(t, dt)
!
! Update discharges
!
use sfincs_data
!
implicit none
!
integer :: count0
integer :: count1
integer :: count_rate
integer :: count_max
real :: tloop
!
real*8 :: t
real*4 :: dt
Expand All @@ -346,7 +342,7 @@ subroutine update_discharges(t, dt, tloop)
!
integer isrc, itsrc, idrn, jin, jout, nmin, nmout
!
call system_clock(count0, count_rate, count_max)
call timer_start('discharges')
!
! Compute instantaneous discharges from point sources
!
Expand Down Expand Up @@ -654,8 +650,7 @@ subroutine update_discharges(t, dt, tloop)
!
endif
!
call system_clock(count1, count_rate, count_max)
tloop = tloop + 1.0 * (count1 - count0) / count_rate
call timer_stop('discharges')
!
end subroutine

Expand Down
13 changes: 4 additions & 9 deletions source/src/sfincs_infiltration.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module sfincs_infiltration
subroutine initialize_infiltration()
!
use sfincs_data
use sfincs_timers
use sfincs_ncinput
!
implicit none
Expand Down Expand Up @@ -604,7 +605,7 @@ subroutine initialize_infiltration()
end subroutine


subroutine update_infiltration_map(dt, tloop)
subroutine update_infiltration_map(dt)
!
! Update infiltration rates in each grid cell
!
Expand All @@ -619,13 +620,8 @@ subroutine update_infiltration_map(dt, tloop)
real*4 :: hh_local, a
real*4 :: dt
!
integer :: count0
integer :: count1
integer :: count_rate
integer :: count_max
real :: tloop
!
call system_clock(count0, count_rate, count_max)
call timer_start('infiltration')
!
if (inftype == 'con' .or. inftype == 'c2d') then
!
Expand Down Expand Up @@ -1031,8 +1027,7 @@ subroutine update_infiltration_map(dt, tloop)
!
endif
!
call system_clock(count1, count_rate, count_max)
tloop = tloop + 1.0 * (count1 - count0) / count_rate
call timer_stop('infiltration')
!
end subroutine

Expand Down
Loading