<div dir="ltr">Thank you, Wei-keng.<div><br></div><div>Won't that result in a temporary argument array being created? The actual arrays in my program are very large. Is there a method to achieve the same effect without resulting in the creation of a temporary array.</div><div><br></div><div>Again, thank you so much,</div><div>Thiago.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 11:55 AM, Wei-keng Liao <span dir="ltr"><<a href="mailto:wkliao@eecs.northwestern.edu" target="_blank">wkliao@eecs.northwestern.edu</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Thiago<br>
<br>
You can use data(10:90, 10:90). For example,<br>
<br>
err = nfmpi_put_vara_real_all(ncid, varid, start, count, data(10:90, 10:90))<br>
<br>
In this case, your have to make sure the write amounts are matched, i.e.<br>
  count(1)*count(2) must be equal to 80*80<br>
<span class="HOEnZb"><font color="#888888"><br>
Wei-keng<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Dec 18, 2014, at 10:36 AM, Thiago Quirino - NOAA Federal wrote:<br>
<br>
> Hello, folks.<br>
><br>
> I've reading through the Fortran examples and documentation in the Pnetcdf website, and it seems like all calls to nfmpi_put_var* subroutines will write a specified 2D/3D data array found in memory starting at location (1,1) of the array. Suppose that I have a 2D fortran real array of 100x100 elements. For example:<br>
><br>
> real(4) :: data(100,100)<br>
><br>
> Is it possible to write out only a portion of this 2D array to file without copying the desired portion to another smaller 2D array? For example, can all the elements between data(10,10) and data(90,90) (or 80x80 elements) be written out to file directly, that is, ignoring 10 rows and columns on each side of the data array? These ignored rows and columns correspond to halo points in my application that don't need to be written out.<br>
><br>
> Thank you so much,<br>
> Thiago.<br>
><br>
><br>
><br>
> ---------------------------------------------------<br>
> Thiago Quirino, Ph.D.<br>
> NOAA Hurricane Research Division<br>
> Numerical Modeling Group<br>
> 4301 Rickenbacker Cswy.<br>
> Miami, FL 33149<br>
> P: 305-361-4337<br>
> E: <a href="mailto:Thiago.Quirino@noaa.gov">Thiago.Quirino@noaa.gov</a><br>
> <a href="http://hwrf.aoml.noaa.gov" target="_blank">http://hwrf.aoml.noaa.gov</a><br>
<br>
</div></div></blockquote></div></div>