<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Doug took a few minutes to explain this to me in person, and it
    sounds like a great addition.&nbsp; It allows us to add allocatable
    scratch variables in the Registry.&nbsp; This all looks good to me.<br>
    <br>
    Mark<br>
    <br>
    On 10/16/12 15:20, Doug Jacobsen wrote:
    <blockquote
cite="mid:CAEn+Zpv1rLCNSe__z-_9TKHwcHPiFq3MuDAUG1AKYPqMKOp0tg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Hi All,
      <div><br>
      </div>
      <div>I figured I would check again to see if anyone had any
        questions/comment on this. Otherwise I'll commit it tomorrow.</div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div>Doug</div>
      <div><br>
        <div class="gmail_quote">
          On Thu, Oct 11, 2012 at 3:05 PM, Doug Jacobsen <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:jacobsen.douglas@gmail.com" target="_blank">jacobsen.douglas@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            Hi All,
            <div><br>
            </div>
            <div>This is a commit check for two files which allow the
              addition of scratch variables in mpas registry files. Just
              to explain how to use them a bit, typical registry
              variable definitions look like this:</div>
            <div>var persistent real &nbsp; &nbsp;dvEdge ( nEdges ) 0 iro dvEdge
              mesh - -</div>
            <div><br>
            </div>
            <div>where persistent means that the variable is allocated
              once on initialize, persists throughout the run, and then
              is deallocated on finalize. The proposed changes allow you
              to change persistent to scratch, in which case the field
              is allocated on initialize but the % array pointer is not.
              Then if you want to allocate/deallocate space for the
              scratch variable in the middle of the run routines are
              provided from mpas_grid_types.F. These routines are named</div>
            <div><br>
            </div>
            <div>mpas_allocate_scratch_field</div>
            <div>and</div>
            <div>mpas_deallocate_scratch_field</div>
            <div><br>
            </div>
            <div>As a template for these routines, both look like the
              following.</div>
            <div>mpas_allocate_scratch_field1d_integer(f,
              single_block_in)</div>
            <div><br>
            </div>
            <div>where f is a pointer for a field, and single_block_in
              is an optional logical that allows the allocation of a
              single block or the entire block list. If single_block_in
              is omitted or set to be false f is assumed to be the field
              in the header block as opposed to a field pointer to any
              other block. The same is true for the deallocate routine.
              The allocate and deallocate routines only work on scratch
              variables with at least 1d (no 0d integers or reals).</div>
            <div><br>
            </div>
            <div>Some restrictions apply to scratch variables.</div>
            <div>1) Scratch variables cannot exists within a super
              array. IE. No scratch tracers/scalars.</div>
            <div>2) Currently, registry doesn't allow single variable
              types. IE. if you create a new type called scratch (domain
              % blocklist % scratch) it has to have more than one
              variable.</div>
            <div><br>
            </div>
            <div>This change is needed to explore some of the OpenMP,
              and hopefully at a later time 2) in the restrictions list
              will get fixed.</div>
            <div><br>
            </div>
            <div>Please let me know if anyone has questions or comments.
              If not I'll probably commit it next wednesday.</div>
            <div><br>
            </div>
            <div>Thanks,</div>
            <div>Doug</div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mpas-developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mpas-developers@mailman.ucar.edu">mpas-developers@mailman.ucar.edu</a>
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a>
</pre>
    </blockquote>
  </body>
</html>