IO, DRIVER, PYTHON: Fix domain block dimensions with job restart.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-02-21 15:58:38 -03:00
parent e1ee6f39bb
commit 76d7cf8826
3 changed files with 8 additions and 6 deletions

View File

@ -222,6 +222,8 @@ def amun_dataset(fname, vname, shrink = 1, progress = False):
f = h5.File(fname, 'r')
if 'rdims' in f['attributes'].attrs:
rm = amun_attribute(fname, 'rdims')
elif 'bdims' in f['attributes'].attrs:
rm = amun_attribute(fname, 'bdims')
else:
rm = amun_attribute(fname, 'domain_base_dims')
f.close()

View File

@ -288,7 +288,7 @@ program amun
if (check_status(status /= 0)) go to 3800
call read_snapshot_parameter("maxlev" , toplev , status)
if (check_status(status /= 0)) go to 3800
call read_snapshot_parameter("rdims" , bdims , status)
call read_snapshot_parameter("bdims" , bdims , status)
if (check_status(status /= 0)) go to 3800
call read_snapshot_parameter("xmin" , xmin , status)
if (check_status(status /= 0)) go to 3800

View File

@ -1792,7 +1792,7 @@ module io
use blocks , only : get_last_id
use coordinates , only : minlev, maxlev
use coordinates , only : ncells, nghosts
use coordinates , only : ddims => domain_base_dims
use coordinates , only : bdims => domain_base_dims
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
use coordinates , only : periodic
use equations , only : eqsys, eos, gamma, csnd
@ -1819,7 +1819,7 @@ module io
! local vectors
!
integer, dimension(3) :: bdims = 1
integer, dimension(3) :: dims = 1
integer, dimension(3) :: per
! local allocatable arrays
@ -1904,9 +1904,9 @@ module io
! store the vector attributes
!
bdims(1:NDIMS) = ncells
call write_attribute(gid, 'dims' , bdims)
call write_attribute(gid, 'domain_base_dims', ddims)
dims(1:NDIMS) = ncells
call write_attribute(gid, 'dims' , dims)
call write_attribute(gid, 'bdims', bdims)
! store random number generator seed values
!