2D AMRCLAW
setgauges.f
Go to the documentation of this file.
1 c=========================================================================
2  subroutine setgauges
3 c=========================================================================
4 
5  use amr_module
6  use gauges_module
7  implicit double precision (a-h,o-z)
8  character*25 fname
9  logical foundFile
10 
11 
12  fname = 'gauges.data'
13  inquire(file=fname,exist=foundfile)
14  if (.not. foundfile) then
15  write(*,*) 'You must provide a file ', fname
16  stop
17  endif
18 
19  iunit = 7
20  call opendatafile(iunit,fname)
21 
22  read(iunit,*) mgauges
23  write(6,*) '+++ in setgauges: mgauges = ',mgauges
24  if (mgauges.gt.maxgauges) then
25  write(*,*) 'ERROR in setgauges'
26  write(*,*) 'mgauges = ',mgauges,' maxgauges = ',maxgauges
27  write(*,*) 'increase maxgauges in amr_module.f90'
28  stop
29  endif
30 
31  do i=1,mgauges
32  read(iunit,*) igauge(i),xgauge(i),ygauge(i),
33  & t1gauge(i),t2gauge(i)
34  mbestsrc(i) = 0 ! initialize for starters
35  enddo
36  close(iunit)
37 
38 c # open file for output of gauge data
39 c # all data is output in one binary file with format
40 c # gauge number, level, time, depth
41 c # by dumpgauge.
42 
43  open(unit=outgaugeunit,file='fort.gauge',status='unknown',
44  . form='formatted')
45 
46  return
47  end
subroutine setgauges
Definition: setgauges.f:3
integer, dimension(:), allocatable igauge
integer, parameter outgaugeunit
subroutine opendatafile(iunit, fname)
Definition: opendatafile.f:3
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
integer, dimension(:), allocatable mbestsrc