your guess was totally right. I was computing with 64 bits and writing with 32 bits only. I fixed it and restarting Enzo worked well. Great !
Great, I'm glad that worked. Entire fields of science have been
created because of that very issue. It's subtle, but a killer.
- change some global parameters like StopCycle, CycleDataDump,
GlobalDir,... Would it work if I only edit the files
DDnnnn/CommonEnvelopennnn ? Wouldn't it create a conflict somewhere ?
Changing cycle based outputs won't change the answer. Changing
timestep based outputs (like DtDataDump, Redshift) might introduce a
little diffusion, because there will usually be a short timestep to
make the output time right.
As long as you replace GlobalDir everywhere, you're fine.
ls -1 |grep -v grid | sed -i 's/GlobalDir.*/GlobalDir = $A'
should do it, but double check. (that's ls -One, not ls -Ell)(On some
platforms, like the native sed on OSX and AIX, sed doesn't have a -i
option, so you have to do this through some temp file.)
- keep all BaryonFields the same except the velocity that I need to set
up to 0. Is there an easy way to do that ?
This is pretty easy with Python and h5py. Basically, loop over all
the grid files, open them, and re-write the file into a new
directory,but make V = 0 as you go. Then copy all the files that
aren't *.grid* files to your new directory. (I don't think there's a
way to kill a dataset directly, so you need to copy everything. )
Something like:
for grid in glob.glob("*.grid"):
file1 = h5py.File(grid,'r')
file2 = h5py.File(other_dir + grid, 'w')
for group in file1.listitems():
open the group.
for field in group:
if field is not velocity:
file2.create_datasete(field, shape, data=file1[group][field)
else:
file2.create_dataset( field, shape, data=numpy.zeros(
file1[group][field].shape) )
with the appropriate syntax improvements.
d.