<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi David,<br>
<br>
thanks for your useful tips. Just a few more questions:<br>
<blockquote
 cite="mid:AANLkTilWk7Fp6NGth3SgMTRgN_i9iBcgUASa6u5M6zFX@mail.gmail.com"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">    - 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 ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.)

  </pre>
  <blockquote type="cite">
    <pre wrap="">    - keep all BaryonFields the same except the velocity that I need to set
up to 0. Is there an easy way to do that ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.
  </pre>
</blockquote>
There is no more *.grid* file. That was for Enzo 1.0 if I am not wrong.
You probably meant the *.cpu* files, right ?<br>
<br>
<br>
To go further, is there a way I can:<br>
<br>
    - restart Enzo with WritePotential = 1 using a file that had
WritePotential = 0 ?<br>
    - restart Enzo and use Tracer Particles with a file that did not
have any of them ?<br>
<br>
Thanks again for your help,<br>
<br>
<br>
JC<br>
</body>
</html>