Write the results to the file fort.q<iframe> Use format required by matlab script plotclaw2.m or Python tools
set outaux = .true. to also output the aux arrays to fort.a<iframe>
7 implicit double precision (a-h,o-z)
8 character*10 fname1, fname2, fname3, fname4, fname5
19 integer output_aux_num
20 integer clock_start, clock_finish, clock_rate
21 real(kind=8) cpu_start, cpu_finish
25 iadd(ivar,i,j) = loc + ivar - 1 + nvar*((j-1)*mitot+i-1)
26 iaddaux(iaux,i,j) = locaux + iaux-1 + naux*(i-1) +
30 call system_clock(clock_start,clock_rate)
31 call cpu_time(cpu_start)
40 outaux = ((output_aux_num > 0) .and.
59 do 55 ipos = 10, 7, -1
61 fname1(ipos:ipos) = char(ichar(
'0') + idigit)
62 fname2(ipos:ipos) = char(ichar(
'0') + idigit)
63 fname3(ipos:ipos) = char(ichar(
'0') + idigit)
64 fname4(ipos:ipos) = char(ichar(
'0') + idigit)
68 open(unit=matunit1,file=fname1,status=
'unknown',
73 open(unit=matunit4,file=fname4,status=
'unknown',
80 65
if (level .gt. lend)
go to 90
82 70
if (mptr .eq. 0)
go to 80
91 write(matunit1,1001) mptr, level, nx, ny
94 write(matunit1,1003) mptr, level, nx
96 1001
format(i6,
' grid_number',/,
100 1003
format(i6,
' grid_number',/,
114 1002
format(e26.16,
' xlow', /,
118 1004
format(e26.16,
' xlow', /,
126 if (abs(
alloc(
iadd(ivar,i,j))) < 1d-90)
then 133 write(matunit1,*)
' ' 141 i2 =
iadd(nvar,mitot,mjtot)
143 write(matunit4)
alloc(i1:i2)
161 165
if (level .gt.
lfine)
go to 190
163 170
if (mptr .eq. 0)
go to 180
172 open(unit=matunit3,file=fname3,status=
'unknown',
175 write(matunit3,1001) mptr, level, nx, ny
178 write(matunit3,1003) mptr, level, nx
193 if (abs(
alloc(iaddaux(ivar,i,j))) .lt. 1d-90)
194 &
alloc(iaddaux(ivar,i,j)) = 0.d0
196 write(matunit3,109) (
alloc(iaddaux(ivar,i,j)),
199 write(matunit3,*)
' ' 205 open(unit=matunit3,file=fname3,status=
'unknown',
208 i2 = iaddaux(naux,mitot,mjtot)
210 write(matunit3)
alloc(i1:i2)
216 180 level = level + 1
228 open(unit=matunit2,file=fname2,status=
'unknown',
240 write(matunit2,1000) time,nvar,ngrids,naux,ndim,
nghost 241 1000
format(e18.8,
' time', /,
250 601
format(
'AMRCLAW: Frame ',i4,
251 &
' output files done at time t = ', d13.6,/)
261 call system_clock(clock_finish,clock_rate)
262 call cpu_time(cpu_finish)
logical output_aux_onlyonce
integer, parameter cornxlo
x-coordinate of the left border of this grid
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, parameter ndihi
global i index of right border of this grid
integer, dimension(nsize, maxgr) node
real(kind=8), dimension(rsize, maxgr) rnode
integer pure function iadd(ivar, i, j)
real(kind=8) timevaloutcpu
integer, parameter ndilo
global i index of left border of this grid
integer, parameter ndjlo
global j index of lower border of this grid
integer, parameter store1
pointer to the address of memory storing the first copy of solution data on this grid, usually for storing new solution
integer, dimension(maxlv) lstart
integer, parameter ndjhi
global j index of upper border of this grid
integer, parameter cornylo
y-coordinate of the lower border of this grid
integer, parameter levelptr
node number (index) of next grid on the same level
integer, dimension(:), allocatable output_aux_components
The module contains the definition of a "node descriptor" as well as other global variables used duri...
integer, parameter storeaux
pointer to the address of memory storing auxiliary data on this grid
real(kind=8), dimension(:), allocatable alloc