4 subroutine restrt(nsteps,time,nvar)
7 implicit double precision (a-h,o-z)
21 dimension iqout(15), qout(4)
25 integer sfstart, sfend
26 external sfstart, sfend
30 integer DFACC_READ, DFACC_WRITE, DFACC_CREATE
31 parameter(dfacc_read = 1, dfacc_write = 2, dfacc_create = 4)
34 parameter(succeed = 0, fail = -1)
45 chkname =
'restart.data.hdf' 49 sd_id = sfstart(chkname,dfacc_read)
50 if (sd_id.eq.fail)
THEN 51 WRITE(*,*)
'Failed to open HDF file',
52 &
' (call to sfstart in restrt_hdf.f)' 123 if (istat.eq.fail)
then 124 WRITE(*,*)
'Failed to close SDS',
125 &
' (call to sfend in restrt_hdf.f)' 130 write(6,100) nsteps,time
131 100
format(/,
' RESTARTING the calculation after ',i5,
' steps',
132 1 /,
' (time = ',e15.7,
')')
135 if ( (
intratx(i) .ne. intrtx(i)) .or.
136 . (
intraty(i) .ne. intrty(i)) .or.
137 . (
kratio(i) .ne. intrtt(i)) )
then 139 .
" not allowed to change existing refinement ratios on Restart" 141 .
" not allowed to change existing refinement ratios on Restart" 143 write(*,*)
" Old ratios:" 144 write(
outunit,903)(intrtx(j),j=1,mxnold-1)
145 write(*,903) (intrtx(j),j=1,mxnold-1)
146 write(
outunit,903)(intrty(j),j=1,mxnold-1)
147 write(*,903) (intrty(j),j=1,mxnold-1)
148 write(
outunit,903)(intrtt(j),j=1,mxnold-1)
149 write(*,903) (intrtt(j),j=1,mxnold-1)
158 if (idif .gt. 0)
then 161 else if (idif .lt. 0)
then 164 900
format(
' size of alloc not allowed to shrink with restart ',/,
165 .
' old size ',i7,
' current size ',i7)
172 if (
mxnest .eq. mxnold)
go to 99
174 if (
mxnest .lt. mxnold)
then 179 write(*, 901) mxnold,
mxnest 180 901
format(
' only allow mxnest to increase: ',/,
181 &
' old mxnest ',i4,
' new mxnest ',i4)
188 do 10 level = 1, mxnold
196 write(* ,902) mxnold,
mxnest, kmust
197 902
format(/,
' only allow changes in mxnest (from ',
198 & i4,
' to ',i4,
')',/,
199 &
' when not time to error estimate: ',/,
200 &
' please run a few more steps before changing ',/,
201 &
' so that # of steps not greater then kcheck',/,
202 &
' or make kcheck > ',i4 )
207 15
if (mptr .eq. 0)
go to 25
218 35
if (level .gt.
mxnest)
go to 45
240 implicit double precision (a-h,o-z)
245 integer sd_id, sds_id
246 dimension iout(idims), istart(1), istride(1), iedges(1)
250 integer sfcreate, sfrdata, sfselect, sfendacc
251 external sfcreate, sfrdata, sfselect, sfendacc
255 integer SUCCEED, FAIL
256 parameter(succeed = 0, fail = -1)
260 sds_id = sfselect(sd_id,index)
261 if (sds_id.eq.fail)
THEN 262 WRITE(*,*)
'Failed to select data set for variable ', qname,
263 &
' in restart HDF file' 264 WRITE(*,*)
'(call to sfselect in restrt_hdf.f)' 276 istat = sfrdata(sds_id,istart,istride,iedges,iout)
277 if (istat.eq.fail)
THEN 278 WRITE(*,*)
'Failed to read variable ', qname,
279 &
' from restart HDF file' 280 WRITE(*,*)
'(call to sfrdata in restrt_hdf.f)' 286 istat = sfendacc(sds_id)
287 if (istat.eq.fail)
THEN 288 WRITE(*,*)
'Failed to end access to variable ', qname,
289 &
' in restart HDF file' 290 WRITE(*,*)
'(call to sfendacc in restrt_hdf.f)' 299 implicit double precision (a-h,o-z)
304 integer sd_id, sds_id
305 dimension istart(2), istride(2), iedges(2)
306 dimension iout(idim1,idim2)
310 integer sfcreate, sfrdata, sfselect, sfendacc
311 external sfcreate, sfrdata, sfselect, sfendacc
315 integer SUCCEED, FAIL
316 parameter(succeed = 0, fail = -1)
320 sds_id = sfselect(sd_id,index)
321 if (sds_id.eq.fail)
THEN 322 WRITE(*,*)
'Failed to select data set for variable ', qname,
323 &
' in restart HDF file' 324 WRITE(*,*)
'(call to sfselect in restrt_hdf.f)' 339 istat = sfrdata(sds_id,istart,istride,iedges,iout)
340 if (istat.eq.fail)
THEN 341 WRITE(*,*)
'Failed to read variable ', qname,
342 &
' from restart HDF file' 343 WRITE(*,*)
'(call to sfrdata in restrt_hdf.f)' 349 istat = sfendacc(sds_id)
350 if (istat.eq.fail)
THEN 351 WRITE(*,*)
'Failed to end access to variable ', qname,
352 &
' in restart HDF file' 353 WRITE(*,*)
'(call to sfendacc in restrt_hdf.f)' 362 implicit double precision (a-h,o-z)
367 integer sd_id, sds_id
368 dimension iout(idims), istart(1), istride(1), iedges(1), idim(1)
372 integer sfcreate, sfwdata, sfscompress, sfendacc
373 external sfcreate, sfwdata, sfscompress, sfendacc
377 integer DFNT_FLOAT64, DFNT_INT32
378 parameter(dfnt_float64 = 6, dfnt_int32 = 24)
380 integer SUCCEED, FAIL
381 parameter(succeed = 0, fail = -1)
385 integer COMP_CODE_DEFLATE, DEFLATE_LEVEL
386 parameter(comp_code_deflate = 4, deflate_level = 6)
393 sds_id = sfcreate(sd_id,qname,dfnt_int32,irank,idim)
394 if (sds_id.eq.fail)
THEN 395 WRITE(*,*)
'Failed to create variable ', qname,
396 &
' in restart HDF file' 397 WRITE(*,*)
'(call to sfcreate in check_hdf.f)' 409 istat=sfscompress(sds_id,comp_code_deflate,deflate_level)
410 istat = sfwdata(sds_id,istart,istride,iedges,iout)
411 if (istat.eq.fail)
THEN 412 WRITE(*,*)
'Failed to write variable ', qname,
413 &
' in restart HDF file' 414 WRITE(*,*)
'(call to sfwdata in check_hdf.f)' 420 istat = sfendacc(sds_id)
421 if (istat.eq.fail)
THEN 422 WRITE(*,*)
'Failed to end access to variable ', qname,
423 &
' in restart HDF file' 424 WRITE(*,*)
'(call to sfendacc in check_hdf.f)' 433 implicit double precision (a-h,o-z)
438 integer sd_id, sds_id
439 dimension idims(2), istart(2), istride(2), iedges(2)
440 dimension iout(idim1,idim2)
444 integer sfcreate, sfwdata, sfscompress, sfendacc
445 external sfcreate, sfwdata, sfscompress, sfendacc
449 integer DFNT_FLOAT64, DFNT_INT32
450 parameter(dfnt_float64 = 6, dfnt_int32 = 24)
452 integer SUCCEED, FAIL
453 parameter(succeed = 0, fail = -1)
457 integer COMP_CODE_DEFLATE, DEFLATE_LEVEL
458 parameter(comp_code_deflate = 4, deflate_level = 6)
466 sds_id = sfcreate(sd_id,qname,dfnt_int32,irank,idims)
467 if (sds_id.eq.fail)
THEN 468 WRITE(*,*)
'Failed to create variable ', qname,
469 &
' in restart HDF file' 470 WRITE(*,*)
'(call to sfcreate in check_hdf.f)' 485 istat=sfscompress(sds_id,comp_code_deflate,deflate_level)
486 istat = sfwdata(sds_id,istart,istride,iedges,iout)
487 if (istat.eq.fail)
THEN 488 WRITE(*,*)
'Failed to write variable ', qname,
489 &
' in restart HDF file' 490 WRITE(*,*)
'(call to sfwdata in check_hdf.f)' 496 istat = sfendacc(sds_id)
497 if (istat.eq.fail)
THEN 498 WRITE(*,*)
'Failed to end access to variable ', qname,
499 &
' in restart HDF file' 500 WRITE(*,*)
'(call to sfendacc in check_hdf.f)' integer, dimension(maxlv) kratio
subroutine read_double_array(sd_id, idim1, idim2, index, qname, out)
function igetsp(nwords)
Allocate contiguous space of length nword in main storage array alloc.
subroutine restrt(nsteps, time, nvar, naux)
subroutine reclam(index, nwords)
integer, dimension(maxlv) iregsz
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, dimension(maxlv) newstl
integer, parameter ndihi
global i index of right border of this grid
integer, dimension(maxlv) jregsz
integer, dimension(nsize, maxgr) node
real(kind=8), dimension(rsize, maxgr) rnode
subroutine dump_integer_array(sd_id, idim1, idim2, qname, iout)
integer, dimension(maxlv) icheck
subroutine read_integer_vector(sd_id, idims, index, qname, iout)
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, dimension(maxlv) lstart
subroutine read_double_vector(sd_id, idims, index, qname, out)
integer, parameter store2
pointer to the address of memory storing the second copy of solution data on this grid...
subroutine read_integer_array(sd_id, idim1, idim2, index, qname, iout)
integer, dimension(maxlv) intraty
real(kind=8), dimension(maxlv) rvoll
integer, parameter outunit
real(kind=8), dimension(maxlv) possk
integer, dimension(lfdim, 2) lfree
integer, parameter ndjhi
global j index of upper border of this grid
integer, dimension(maxlv) listsp
integer, dimension(maxlv) intratx
integer, parameter levelptr
node number (index) of next grid on the same level
The module contains the definition of a "node descriptor" as well as other global variables used duri...
subroutine dump_integer_vector(sd_id, idims, qname, iout)
real(kind=8), dimension(:), allocatable alloc