Hi All,<div><br></div><div>Here is an updated version of the gen_inc.c file. Last week Michael pointed out some issues with it, so this new version fixes those.</div><div><br></div><div>I've tested it and from my tests it seems to work well. The issues I mentioned previously still exist though (can't have a single variable in a group ie. state, mesh, etc). So those will have to be tackled at some point in time.</div>
<div><br></div><div>If no one has any issues I'll commit these tomorrow.</div><div><br></div><div>Thanks!</div><div>Doug</div><div><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 3:55 PM, Mark Petersen <span dir="ltr"><<a href="mailto:mpetersen@lanl.gov" target="_blank">mpetersen@lanl.gov</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">
Doug took a few minutes to explain this to me in person, and it
sounds like a great addition. It allows us to add allocatable
scratch variables in the Registry. This all looks good to me.<br>
<br>
Mark<div><div class="h5"><br>
<br>
On 10/16/12 15:20, Doug Jacobsen wrote:
</div></div><blockquote type="cite"><div><div class="h5">
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"><<a href="mailto:jacobsen.douglas@gmail.com" target="_blank">jacobsen.douglas@gmail.com</a>></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 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></fieldset>
<br>
</div></div><pre>_______________________________________________
mpas-developers mailing list
<a href="mailto:mpas-developers@mailman.ucar.edu" target="_blank">mpas-developers@mailman.ucar.edu</a>
<a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers" target="_blank">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a>
</pre>
</blockquote>
</div>
</blockquote></div><br></div>