<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I've hacked up a simple example of what
      I mean (attached).<br>
      <br>
      On 25/11/13 17:50, Nathan Goldbaum wrote:<br>
    </div>
    <blockquote
cite="mid:CAJXewOmRV=SDDuWhkKgjvsg3xJgeJKHBosdQK1ZWKjYNezym1w@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">Matt's opened a PR for this here: 
        <div><br>
        </div>
        <div><a moz-do-not-send="true"
href="https://bitbucket.org/yt_analysis/yt-3.0/pull-request/140/adding-field_aliases-to-ramses-datasets/diff">https://bitbucket.org/yt_analysis/yt-3.0/pull-request/140/adding-field_aliases-to-ramses-datasets/diff</a>
          <div>
            <br>
          </div>
          <div>Sam, if you could enumerate how to map from the boolean
            flags you're suggesting to a final field list, I think that
            would help immensely.</div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Mon, Nov 25, 2013 at 8:42 AM, Sam Geen <span dir="ltr"><<a
              moz-do-not-send="true"
              href="mailto:samgeen@astro.ox.ac.uk" target="_blank">samgeen@astro.ox.ac.uk</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Yes and no. NVAR must be big enough, but it can be
                bigger than necessary (I think); it's a Makefile setting
                when compiling Ramses. You can guarantee that the first
                4 variables are the same, but after that I suspect the
                best approach is to use boolean flags to specify whether
                the run contains MHD, RHD, metals, etc. Normally it's a
                good guess that 5 is pressure and 6 (if it exists) is
                metals, but as I said it seems like MHD puts the B-field
                before pressure and metallicity.
                <div>
                  <div class="h5"><br>
                    <br>
                    On 25/11/13 17:36, Nathan Goldbaum wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Does that mean that it should be
                      possible to infer the field list from NVAR alone?</div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">On Mon, Nov 25, 2013 at
                        8:29 AM, Sam Geen <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:samgeen@astro.ox.ac.uk"
                            target="_blank">samgeen@astro.ox.ac.uk</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">For MHD, the variables
                          stored are the B-field strengths on the faces
                          of each cell - the fields in order are: (1)
                          density, (2-4) [x,y,z] velocity, (5-7) [x,y,z]
                          B-field left, (8-10) [x,y,z] B-field right,
                          (11) pressure (thermal + MHD), then (12+) any
                          passive scalars (metals, etc) - see
                          mhd/output_hydro.f90. Note that the MHD module
                          adds 3 variables, so the number of variables
                          will be nvar+3.<br>
                          <br>
                          For RHD (Joki Rosdahl's M1 method
                          implementation, at least - someone else will
                          have to help with the ATON version), there is
                          a separate "rt_" output file for each CPU
                          (like the hydro/amr/particles), as well as a
                          separate info file (there is a bitbucket link
                          on the Ramses homepage if you want to see what
                          the latest version of the code does in
                          detail). The RHD module divides photons into
                          "nGroups" different flux bins; for each bin,
                          it writes a photon density and then a flux
                          vector. nGroups is stored in the rt info file;
                          nrtvar is written to the rt_ binary file, but
                          this is (I think) a Makefile setting and not
                          guaranteed to be nGroups/(1+ndim) (the user
                          is, I believe, normally free to waste memory
                          by allocating more variables than they need).
                          For details it might be easiest to download
                          the latest code and look at the code in the
                          folder rt/, or ask Romain or Joki Rosdahl
                          directly.<br>
                          <br>
                          (Feel free to correct me if any of this is
                          wrong!)<br>
                          <br>
                          I agree that setting the default to the
                          standard five (perhaps some boolean variables
                          for common configurations such as metals, RHD,
                          MHD, etc) and then letting users set or add
                          their own fields by hand if they need to is a
                          good approach.
                          <div>
                            <div><br>
                              <br>
                              On 25/11/13 16:23, Matthew Turk wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"> Hi all,
                                especially RAMSES users,<br>
                                <br>
                                I'm setting up aliases to make it easier
                                to load RAMSES datasets that<br>
                                have different field configurations.<br>
                                <br>
                                Right now, to specify a different set of
                                fields, you have to do:<br>
                                <br>
                                pf = load( ... , fields = [ "Density",
                                "x-velocity", ...])<br>
                                <br>
                                I am going to change this to add on
                                different field configurations<br>
                                that can be specified with just a
                                string.  For instance:<br>
                                <br>
                                pf = load(..., fields = "standard_five")<br>
                                <br>
                                I'm wondering what the different
                                configurations are.  I have these two:<br>
                                <br>
                                standard_five: Density, x-velocity,
                                y-velocity, z-velocity, Pressure<br>
                                standard_six: Density, x-velocity,
                                y-velocity, z-velocity, Pressure,
                                Metallicity<br>
                                <br>
                                But for MHD and RHD, what are the
                                additional fields that should be<br>
                                added, and in what order?  And are there
                                other common configurations<br>
                                that should be aliased?<br>
                                <br>
                                If we can come up with a set of aliases
                                that match most use cases,<br>
                                that'd work quite well.  I'm going to
                                issue a PR for this shortly, and<br>
                                hopefully it will make everybody's life
                                a bit easier.<br>
                                <br>
                                -Matt<br>
_______________________________________________<br>
                                yt-users mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:yt-users@lists.spacepope.org"
                                  target="_blank">yt-users@lists.spacepope.org</a><br>
                                <a moz-do-not-send="true"
                                  href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                                  target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                              </blockquote>
                              <br>
_______________________________________________<br>
                              yt-users mailing list<br>
                              <a moz-do-not-send="true"
                                href="mailto:yt-users@lists.spacepope.org"
                                target="_blank">yt-users@lists.spacepope.org</a><br>
                              <a moz-do-not-send="true"
                                href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                                target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
yt-users mailing list
<a moz-do-not-send="true" href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a>
<a moz-do-not-send="true" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            yt-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
              target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
yt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>
<a class="moz-txt-link-freetext" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>