Write portion of 2D/3D fortran array in memory to file

Thiago Quirino - NOAA Federal thiago.quirino at noaa.gov
Thu Dec 18 10:36:03 CST 2014


Hello, folks.

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:

real(4) :: data(100,100)

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.

Thank you so much,
Thiago.



---------------------------------------------------
Thiago Quirino, Ph.D.
NOAA Hurricane Research Division
Numerical Modeling Group
4301 Rickenbacker Cswy.
Miami, FL 33149
P: 305-361-4337
E: Thiago.Quirino at noaa.gov
http://hwrf.aoml.noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20141218/4af9d0ec/attachment.html>


More information about the parallel-netcdf mailing list