logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PnetCDF - Parallel library for accessing files in Network Common Data Form (CDF, CDF-2 and CDF-5 formats)

Attributes

integerfunctionnfmpi_put_att_text(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,character*(*)out)

              (Corresponds to nf_put_att_text() in netCDF)

       integerfunctionnfmpi_put_att_int1(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,integer*1out(1))

              (Corresponds to nf_put_att_int1() in netCDF)

       integerfunctionnfmpi_put_att_int2(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,integer*2out(1))

              (Corresponds to nf_put_att_int2() in netCDF)

       integerfunctionnfmpi_put_att_int(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,integerout(1))

              (Corresponds to nf_put_att_int() in netCDF)

       integerfunctionnfmpi_put_att_real(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,realout(1))

              (Corresponds to nf_put_att_real() in netCDF)

       integerfunctionnfmpi_put_att_double(integerncid,integervarid,character*(*)name,integerxtype,in‐teger(kind=MPI_OFFSET)len,doubleprecisionout(1))

              (Corresponds to nf_put_att_double() in netCDF)

       integerfunctionnfmpi_put_att(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len,void*ip)

              (Corresponds to nf_put_att() in netCDF)

       integerfunctionnfmpi_get_att(integerncid,integervarid,character*(*)name,void*ip)

              (Corresponds to nf_get_att() in netCDF)

              Unlike variables, attributes do not have separate functions for defining and writing values.  This
              family of functions defines a new attribute with a value or changes the value of an  existing  at‐
              tribute.   If  the  attribute  is  new,  or  if the space required to store the attribute value is
              greater than before, the netCDF dataset must be in define mode.  The parameter len is  the  number
              of  values  from  out  to transfer.  It is often one, except that for nfmpi_put_att_text() it will
              usually be len_trim(out).

              For these functions, the type component of the function name refers to the in-memory type  of  the
              value, whereas the xtype argument refers to the external type for storing the value.  An NF_ERANGE
              error results if a conversion between these types is not possible.  In this case the value is rep‐
              resented with the appropriate fill-value for the associated external type.

       integerfunctionnfmpi_inq_attname(integerncid,integervarid,integerattnum,character*(*)name)

              (Corresponds to nf_inq_attname() in netCDF)

              Gets  the name of an attribute, given its variable ID and attribute number.  This function is use‐
              ful in generic applications that need to get the names of all the  attributes  associated  with  a
              variable,  since  attributes  are accessed by name rather than number in all other attribute func‐
              tions.  The number of an attribute is more volatile than the name, since it can change when  other
              attributes of the same variable are deleted.  The attributes for each variable are numbered from 1
              (the first attribute) to nvatts, where nvatts is the number of attributes for the variable, as re‐
              turned from a call to nfmpi_inq_varnatts().

       integerfunctionnfmpi_inq_att(integerncid,integervarid,character*(*)name,integerxtype,inte‐ger(kind=MPI_OFFSET)len)

              (Corresponds to nf_inq_att() in netCDF)

       integerfunctionnfmpi_inq_attid(integerncid,integervarid,character*(*)name,integerattnum)

              (Corresponds to nf_inq_attid() in netCDF)

       integerfunctionnfmpi_inq_atttype(integerncid,integervarid,character*(*)name,integerxtype)

              (Corresponds to nf_inq_atttype() in netCDF)

       integerfunctionnfmpi_inq_attlen(integerncid,integervarid,character*(*)name,integer(kind=MPI_OFF‐SET)len)

              (Corresponds to nf_inq_attlen() in netCDF)

              These  functions return information about a netCDF attribute, given its variable ID and name.  The
              information returned is the external type in xtype and the number of elements in the attribute  as
              len.

       integerfunctionnfmpi_copy_att(integerncid,integervarid_in,character*(*)name,integerncid_out,in‐tegervarid_out)

              (Corresponds to nf_copy_att() in netCDF)

              Copies  an attribute from one netCDF dataset to another.  It can also be used to copy an attribute
              from one variable to another within the same netCDF.  ncid_in is the netCDF ID of an input  netCDF
              dataset  from which the attribute will be copied.  varid_in is the ID of the variable in the input
              netCDF dataset from which the attribute will be copied, or NF_GLOBAL for a global attribute.  name
              is the name of the attribute in the input netCDF dataset to be copied.  ncid_out is the netCDF  ID
              of the output netCDF dataset to which the attribute will be copied.  It is permissible for the in‐
              put  and output netCDF ID's to be the same.  The output netCDF dataset should be in define mode if
              the attribute to be copied does not already exist for the target variable, or if it would cause an
              existing target attribute to grow.  varid_out is the ID of  the  variable  in  the  output  netCDF
              dataset to which the attribute will be copied, or NF_GLOBAL to copy to a global attribute.

       integerfunctionnfmpi_rename_att(integerncid,integervarid,character*(*)name,character*(*)newname)

              (Corresponds to nf_rename_att() in netCDF)

              Changes  the  name  of an attribute.  If the new name is longer than the original name, the netCDF
              must be in define mode.  You cannot rename an attribute to have the same name as another attribute
              of the same variable.  name is the original attribute name.  newname is the new  name  to  be  as‐
              signed  to  the  specified  attribute.   If  the  new name is longer than the old name, the netCDF
              dataset must be in define mode.

       integerfunctionnfmpi_del_att(integerncid,integervarid,character*(*)name)

              (Corresponds to nf_del_att() in netCDF)

              Deletes an attribute from a netCDF dataset.  The dataset must be in define mode.

       integerfunctionnfmpi_get_att_text(integerncid,integervarid,character*(*)name,character*(*)in)

              (Corresponds to nf_get_att_text() in netCDF)

       integerfunctionnfmpi_get_att_int1(integerncid,integervarid,character*(*)name,integer*1in(1))

              (Corresponds to nf_get_att_int1() in netCDF)

       integerfunctionnfmpi_get_att_int2(integerncid,integervarid,character*(*)name,integer*2in(1))

              (Corresponds to nf_get_att_int2() in netCDF)

       integerfunctionnfmpi_get_att_int(integerncid,integervarid,character*(*)name,integerin(1))

              (Corresponds to nf_get_att_int() in netCDF)

       integerfunctionnfmpi_get_att_real(integerncid,integervarid,character*(*)name,realin(1))

              (Corresponds to nf_get_att_real() in netCDF)

       integerfunctionnfmpi_get_att_double(integerncid,integervarid,character*(*)name,doubleprecisionin(1))

              (Corresponds to nf_get_att_double() in netCDF)

              Gets the value(s) of a netCDF attribute, given its variable ID and name.  Converts from the exter‐
              nal  type  to the type specified in the function name, if possible, otherwise returns an NF_ERANGE
              error.  All elements of the vector of attribute values are returned, so you must  allocate  enough
              space to hold them.  If you don't know how much space to reserve, call nfmpi_inq_attlen() first to
              find out the length of the attribute.

Common Argument Descriptions

       In this section we define some common arguments which are used in the "FUNCTION DESCRIPTIONS" section.

       integer ncid
              is the netCDF ID returned from a previous, successful call to nfmpi_open() or nfmpi_create()

       character*(*) name
              is the name of a dimension, variable, or attribute. The names of dimensions, variables and attrib‐
              utes  consist of arbitrary sequences of alphanumeric characters (as well as underscore '_', period
              '.' and hyphen '-'), beginning with a letter or underscore. (However names commencing with  under‐
              score are reserved for system use.) Case is significant in netCDF names. A zero-length name is not
              allowed.

              The maximum allowable number of characters
               is NF_MAX_NAME.

       integer xtype
              specifies  the  external  data type of a netCDF variable or attribute and is one of the following:
              NF_BYTE, NF_CHAR, NF_SHORT, NF_INT, NF_FLOAT, or NF_DOUBLE  for  CDF-1  and  CDF-2  file  formats.
              These  are  used  to  specify 8-bit integers, characters, 16-bit integers, 32-bit integers, 32-bit
              IEEE floating point numbers, and 64-bit IEEE floating-point numbers, respectively.

              CDF-5 defines additional external types: NF_UBYTE, NF_USHORT, NF_UINT, NF_INT64, and NF_UINT64.

       integer dimids(1)
              is a vector of dimension ID's and defines the shape of a netCDF variable.  The size of the  vector
              shall  be  greater  than  or  equal  to  the  rank (i.e. the number of dimensions) of the variable
              (ndims).  The vector shall be ordered by the speed with which a dimension varies: dimids(1)  shall
              be the dimension ID of the most rapidly varying dimension and dimids(ndims) shall be the dimension
              ID of the most slowly varying dimension.  The maximum possible number of dimensions for a variable
              is given by the symbolic constant NF_MAX_VAR_DIMS.

       integer dimid
              is  the ID of a netCDF dimension.  netCDF dimension ID's are allocated sequentially from the posi‐
              tive integers beginning with 1.

       integer ndims
              is either the total number of dimensions in a netCDF dataset or the rank (i.e. the number  of  di‐
              mensions) of a netCDF variable.  The value shall not be negative or greater than the symbolic con‐
              stant NF_MAX_VAR_DIMS.

       integer varid
              is  the  ID  of  a  netCDF  variable or (for the attribute-access functions) the symbolic constant
              NF_GLOBAL, which is used to reference global attributes.  netCDF variable ID's are  allocated  se‐
              quentially from the positive integers beginning with 1.

       integer natts
              is  the  number  of global attributes in a netCDF dataset  for the nfmpi_inquire() function or the
              number of attributes associated with a netCDF variable for the nfmpi_varinq() function.

       integer(kind=MPI_OFFSET) index(1)
              specifies the  coordinates of the netCDF data value to be accessed.  The indices start at 1; thus,
              for example, the first data value of a two-dimensional variable is (1,1).  The size of the  vector
              shall be at least the rank of the associated netCDF variable and its elements shall correspond, in
              order, to the variable's dimensions.

       integer(kind=MPI_OFFSET) start(1)
              specifies  the  starting point for accessing a netCDF variable's data values in terms of the indi‐
              cial coordinates of the corner of the array section.  The indices start at 1; thus, the first data
              value of a variable is (1, 1, ..., 1).  The size of the vector shall be at least the rank  of  the
              associated  netCDF  variable and its elements shall correspond, in order, to the variable's dimen‐
              sions.

       integer(kind=MPI_OFFSET) count(1)
              specifies the number of indices selected along each dimension of the array section.  Thus, to  ac‐
              cess  a  single  value, for example, specify count as (1, 1, ..., 1).  Note that, for strided I/O,
              this argument must be adjusted to be compatible with the stride and start arguments  so  that  the
              interaction  of the three does not attempt to access an invalid data co-ordinate.  The elements of
              the count vector correspond, in order, to the variable's dimensions.

       integer(kind=MPI_OFFSET) stride(1)
              specifies the sampling interval along each dimension of the netCDF variable.   The elements of the
              stride vector correspond, in order, to the netCDF variable's dimensions (stride(1)) gives the sam‐
              pling interval along the most rapidly varying dimension of the netCDF variable).  Sampling  inter‐
              vals  are  specified  in type-independent units of elements (a value of 1 selects consecutive ele‐
              ments of the netCDF variable along the corresponding dimension, a value of 2 selects  every  other
              element, etc.).

       integer(kind=MPI_OFFSET) imap(1)
              specifies  the  mapping between the dimensions of a netCDF variable and the in-memory structure of
              the internal data array.  The elements of the index mapping vector correspond, in  order,  to  the
              netCDF  variable's  dimensions  (imap(1) gives the distance between elements of the internal array
              corresponding to the most rapidly varying dimension of the netCDF  variable).   Distances  between
              elements  are  specified in type-independent units of elements (the distance between internal ele‐
              ments that occupy adjacent memory locations is 1 and not the element's byte-length  as  in  netCDF
              2).

Date

       PNETCDF_RELEASE_DATE

       PnetCDFUser'sGuide, published by Northwestern University and Argonne National Laboratory.  This docu‐
       ment is adopted from the netCDFUser'sGuide, developed at the Unidata Program Center, University  Corpo‐
       ration for Atmospheric Research, located in Boulder, Colorado.

       PnetCDF home page at https://parallel-netcdf.github.io

Printed: 2025-08-22                              PnetCDF 1.14.0                                      PnetCDF(3f)

Dimensions

integerfunctionnfmpi_inq_dimid(integerncid,character*(*)name,integerdimid)

              (Corresponds to nf_inq_dimid() in netCDF)

              Given a dimension name, returns the ID of a netCDF dimension in dimid.

       integerfunctionnfmpi_inq_dim(integerncid,integerdimid,character*(*)name,integer(kind=MPI_OFFSET)len)

              (Corresponds to nf_inq_dim() in netCDF)

       integerfunctionnfmpi_inq_dimname(integerncid,integerdimid,character*(*)name)

              (Corresponds to nf_inq_dimname() in netCDF)

       integerfunctionnfmpi_inq_dimlen(integerncid,integerdimid,integer(kind=MPI_OFFSET)len)

              (Corresponds to nf_inq_dimlen() in netCDF)

              Use these functions to find out about a dimension.

              name should be  big enough (NF_MAX_NAME) to hold the dimension name as the name will be copied in‐
              to your storage.  The length return parameter, len will contain the size of  the  dimension.   For
              the  unlimited  dimension,  the returned length is the current maximum value used for writing into
              any of the variables which use the dimension.

       integerfunctionnfmpi_rename_dim(integerncid,integerdimid,character*(*)name)

              (Corresponds to nf_rename_dim() in netCDF)

              Renames an existing dimension in an open netCDF dataset.  If the new name is longer than  the  old
              name,  the  netCDF dataset must be in define mode.  You cannot rename a dimension to have the same
              name as another dimension.

Environment Variables

PNETCDF_SAFE_MODE
           Set  to 1 to enable metadata consistency check. Warning messages will be printed to stdout if any in‐
           consistency is detected.

File Operations

integerfunctionnfmpi_create(integercomm,character*(*)path,integercmode,integerinfo,integerncid)

              (Corresponds to nf_create() in netCDF)

              Creates a new netCDF dataset at path collectively by a group of MPI processes specified  by  comm,
              returning  a  netCDF  ID  in ncid.  The argument cmode may include the bitwise-or of the following
              flags: NF_NOCLOBBER to protect existing datasets  (default  is  NF_CLOBBER,  silently  blows  them
              away), NF_64BIT_OFFSET to create a file in the 64-bit offset format (CDF-2), as opposed to classic
              format, the default, or NF_64BIT_DATA to create a file in the 64-bit data format (CDF-5).  Use ei‐
              ther NF_64BIT_OFFSET or NF_64BIT_DATA.  The 64-bit offset format allows the creation of very large
              files  with  far fewer restrictions than netCDF classic format, but can only be read by the netCDF
              library version 3.6 or greater. Users are cautioned that files that use the 64-bit  offset  format
              will  not  be recognized by netCDF applications linked to an earlier version of the netCDF library
              than 3.6.  Applications linked to version 3.6 or later will be able to transparently access either
              the classic format or 64-bit offset format.  The 64-bit data format allows the  creation  of  very
              large array variables.  CDF-5 files currently will not be recognized by netCDF 3 or 4 library.

              The  argument  cmode must be consistent among all MPI processes that collectively create the file.
              The argument info is an MPI info object.  Users can use it to supply the file access hints further
              performance improvement.  The hints include existing MPI-IO hints as well  as  hints  defined  and
              used in PnetCDF.

              When  a netCDF dataset is created, it is opened in NF_WRITE mode.  When this function returns, the
              new netCDF dataset is in define mode.

       integerfunctionnfmpi_open(integercomm,character*(*)path,integermode,integerinfo,integerncid)

              (Corresponds to nf_open() in netCDF)

              Opens an existing netCDF dataset at path collectively by a group of  MPI  processes  specified  by
              comm, returning a netCDF ID in ncid.  The type of access is described by the mode parameter, which
              may  include  the bitwise-or of the following flags: NF_WRITE for read-write access (default read-
              only).

              The argument mode must be consistent among all MPI processes that collectively open the file.  The
              argument info is an MPI info object.  Users can use it to supply the  file  access  hints  further
              performance  improvement.   The  hints  include existing MPI-IO hints as well as hints defined and
              used in PnetCDF.

       integerfunctionnfmpi_redef(integerncid)

              (Corresponds to nf_redef() in netCDF)

              Puts an open netCDF dataset into define mode, so dimensions,  variables,  and  attributes  can  be
              added or renamed and attributes can be deleted.

       integerfunctionnfmpi_enddef(integerncid)

              (Corresponds to nf_enddef() in netCDF)

              Takes  an open netCDF dataset out of define mode.  The changes made to the netCDF dataset while it
              was in define mode are checked and committed to disk if no problems occurred.  After a  successful
              call, variable data can be read or written to the dataset.

       integerfunctionnfmpi_sync(integerncid)

              (Corresponds to nf_sync() in netCDF)

              Data  written  by  PnetCDF APIs may be cached by local file system on each compute node.  This API
              flushes cached data by calling MPI_File_sync.

       integerfunctionnfmpi_abort(integerncid)

              (Corresponds to nf_abort() in netCDF)

              You don't need to call this function.  This function is called automatically by  nfmpi_close()  if
              the  netCDF  was  in  define mode and something goes wrong with the commit.  If the netCDF dataset
              isn't in define mode, then this function is equivalent to nfmpi_close().  If it  is  called  after
              nfmpi_redef(), but before nfmpi_enddef(), the new definitions are not committed and the dataset is
              closed.  If it is called after nfmpi_create() but before nfmpi_enddef(), the dataset disappears.

       integerfunctionnfmpi_close(integerncid)

              (Corresponds to nf_close() in netCDF)

              Closes  an  open  netCDF dataset.  If the dataset is in define mode, nfmpi_enddef() will be called
              before closing.  After a dataset is closed, its ID may be reassigned to another dataset.

       integerfunctionnfmpi_inq(integerncid,integerndims,integernvars,integernatts,integerunlimdimid)

              (Corresponds to nf_inq() in netCDF)

       integerfunctionnfmpi_inq_ndims(integerncid,integerndims)

              (Corresponds to nf_inq_ndims() in netCDF)

       integerfunctionnfmpi_inq_nvars(integerncid,integernvars)

              (Corresponds to nf_inq_nvars() in netCDF)

       integerfunctionnfmpi_inq_natts(integerncid,integernatts)

              (Corresponds to nf_inq_natts() in netCDF)

       integerfunctionnfmpi_inq_unlimdim(integerncid,integerunlimdimid)

              (Corresponds to nf_inq_unlimdim() in netCDF)

       integerfunctionnfmpi_inq_format(integerncid,integerformatn)

              (Corresponds to nf_inq_format() in netCDF)

              Use these functions to find out what is in a netCDF dataset.  Upon successful return,  ndims  will
              contain   the  number of dimensions defined for this netCDF dataset, nvars will contain the number
              of variables, natts will contain the number of attributes, and unlimdimid will contain the  dimen‐
              sion  ID  of the unlimited dimension if one exists, or 0 otherwise.  formatn will contain the ver‐
              sion number of the  dataset  <format>,  one  of  NF_FORMAT_CLASSIC,  NF_FORMAT_64BIT,  or  NF_FOR‐MAT_64BIT_DATA.

       integerfunctionnfmpi_def_dim(integerncid,character*(*)name,integer(kind=MPI_OFFSET)len,integerdimid)

              (Corresponds to nf_def_dim() in netCDF)

              Adds a new dimension to an open netCDF dataset, which must be in define mode.  name is the  dimen‐
              sion name.  dimid will contain the dimension ID of the newly created dimension.

Library Version

       This document describes PnetCDF APIs for the FORTRAN programming language.

       character*80nfmpi_inq_libvers(void)

              (Corresponds to nf_inq_libvers() in netCDF)

              Returns a string identifying the version of the PnetCDF library, and  when  it  was  built,  like:
              "1.14.0 of PNETCDF_RELEASE_DATE_FULL".

       The RCS ident(1) command will find a string like "$Id: @(#) PnetCDF library version 1.14.0 of PNETCDF_RE‐
       LEASE_DATE_FULL $" in the library. The SCCS what(1) command will find a string like "PnetCDF library ver‐
       sion 1.14.0 of PNETCDF_RELEASE_DATE_FULL".

Mailing-Lists

       A mailing list is available for discussion of the PnetCDF interface and announcements about PnetCDF bugs,
       fixes,  and  enhancements.   To  subscribe  or  unsubscribe  to   the   PnetCDF   mailing   list,   visit
       https://lists.mcs.anl.gov/mailman/listinfo/parallel-netcdf

Name

       PnetCDF - Parallel library for accessing files in Network Common Data Form (CDF, CDF-2 and CDF-5 formats)

Return Values

       All PnetCDF functions (except nfmpi_inq_libvers() and nfmpi_strerror()) return an integer status.

       If  this  returned status value is not equal to NF_NOERR (zero), it indicates that an error occurred. The
       possible status values are defined in pnetcdf.inc.

       character*80nfmpi_strerror(integerstatus)

              (Corresponds to nf_strerror() in netCDF)

              Returns a string textual translation of the status value, like "Attribute or  variable  name  con‐
              tains illegal characters" or "No such file or directory".

See Also

ncmpidump(1), ncmpigen(1), ncmpidiff(1), ncvalidator(1), pnetcdf(3f).

Synopsis

include"pnetcdf.inc"MostSystems:
       mpif77 ...  -lpnetcdf

   CRAYPVPSystems:
       f90 -dp -i64 ... -lnetcdf

       Complete  documentation  for  the  PnetCDF  libraries  can  be  found  at the PnetCDF website: http://cu‐
       cis.ece.northwestern.edu/projects/PnetCDF/.

Variable Prefilling

       Prior  to  version  1.6.1,  PnetCDF  does  not support data filling.  The default fill mode in PnetCDF is
       NF_NOFILL This contrary to netCDF library whose default is NF_FILL When fill  mode  is  enabled,  PnetCDF
       sets  the values of all newly-defined variables of finite length (i.e. those that do not have an unlimit‐
       ed, dimension) to the type-dependent fill-value  associated  with  each  variable.   This  is  done  when
       nfmpi_enddef()  is called.  The fill-value for a variable may be changed from the default value by defin‐
       ing the attribute `_FillValue' for the variable.  This attribute must have the same type as the  variable
       and be of length one.

       Variables  with  an  unlimited  dimension are not prefilled in PnetCDF.  This is also contrary to netCDF,
       which does prefill record variables.  In PnetCDF, filling a record  variable  must  be  done  by  calling
       nfmpi_fill_var_rec(). Note this fills only one record of a variable.

       The fill mode for the entire file can be set by nfmpi_set_fill().  Per-variable fill mode setting is also
       available  through nfmpi_def_var_fill().  In PnetCDF, changing fill mode must be done in define mode.  In
       netCDF, it is true only for fixed-size variables.  For record variables, changing fill mode can  be  made
       at any time in NetCDF.

Variables

integerfunctionnfmpi_def_var(integerncid,character*(*)name,integerxtype,integerndims,integerdimids(1),integervarid)

              (Corresponds to nf_def_var() in netCDF)

              Adds  a new variable to a netCDF dataset. The netCDF must be in define mode.  varid will be set to
              the netCDF variable ID.  ndims will be the number of dimensions for the variable.   name  will  be
              the name of the netCDF variable.  xtype is the external, netCDF type of the variable and should be
              one  of  NF_BYTENF_CHAR, NF_SHORT, NF_INT, NF_FLOAT, or NF_DOUBLE, for CDF-1 and CDF-2 file for‐
              mats.  CDF-5 defines additional  external  types:  NF_UBYTE,  NF_USHORT,  NF_UINT,  NF_INT64,  and
              NF_UINT64.   dimids  argument is a vector of ndims dimension IDs corresponding to the variable di‐
              mensions.

       integerfunctionnfmpi_inq_varid(integerncid,character*(*)name,integervarid)

              (Corresponds to nf_inq_varid() in netCDF)

              Returns the ID of a netCDF variable in varid given its name.

       integerfunctionnfmpi_inq_var(integerncid,integervarid,character*(*)name,integerxtype,integerndims,integerdimids(1),integernatts)

              (Corresponds to nf_inq_var() in netCDF)

       integerfunctionnfmpi_inq_varname(integerncid,integervarid,character*(*)name)

              (Corresponds to nf_inq_varname() in netCDF)

       integerfunctionnfmpi_inq_vartype(integerncid,integervarid,integerxtype)

              (Corresponds to nf_inq_vartype() in netCDF)

       integerfunctionnfmpi_inq_varndims(integerncid,integervarid,integerndims)

              (Corresponds to nf_inq_varndims() in netCDF)

       integerfunctionnfmpi_inq_vardimid(integerncid,integervarid,integerdimids(1))

              (Corresponds to nf_inq_vardimid() in netCDF)

       integerfunctionnfmpi_inq_varnatts(integerncid,integervarid,integernatts)

              (Corresponds to nf_inq_varnatts() in netCDF)

              Returns information about a netCDF variable, given its ID.

       integerfunctionnfmpi_rename_var(integerncid,integervarid,character*(*)name)

              (Corresponds to nf_rename_var() in netCDF)

              Changes  the  name  of a netCDF variable.  If the new name is longer than the old name, the netCDF
              must be in define mode.  You cannot rename a variable to have the name of any existing variable.

Writing And Reading A Mapped Array

integerfunctionnfmpi_put_varm_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),character*(*)out)

              (Corresponds to nf_put_varm_text() in netCDF)

       integerfunctionnfmpi_put_varm_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integer*1out(1))

              (Corresponds to nf_put_varm_int1() in netCDF)

       integerfunctionnfmpi_put_varm_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integer*2out(1))

              (Corresponds to nf_put_varm_int2() in netCDF)

       integerfunctionnfmpi_put_varm_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integerout(1))

              (Corresponds to nf_put_varm_int() in netCDF)

       integerfunctionnfmpi_put_varm_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),realout(1))

              (Corresponds to nf_put_varm_real() in netCDF)

       integerfunctionnfmpi_put_varm_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),doubleprecisionout(1))

              (Corresponds to nf_put_varm_double() in netCDF)

              These  functions  are used for mappedoutput, which is like strided output described above, except
              that an additional index mapping vector is provided to specify the in-memory  arrangement  of  the
              data  values.   For  an explanation of the index mapping vector, see COMMON ARGUMENTS DESCRIPTIONS
              below.

       integerfunctionnfmpi_get_varm_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),character*(*)in)

              (Corresponds to nf_get_varm_text() in netCDF)

       integerfunctionnfmpi_get_varm_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integer*1in(1))

              (Corresponds to nf_get_varm_int1() in netCDF)

       integerfunctionnfmpi_get_varm_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integer*2in(1))

              (Corresponds to nf_get_varm_int2() in netCDF)

       integerfunctionnfmpi_get_varm_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),integerin(1))

              (Corresponds to nf_get_varm_int() in netCDF)

       integerfunctionnfmpi_get_varm_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),realin(1))

              (Corresponds to nf_get_varm_real() in netCDF)

       integerfunctionnfmpi_get_varm_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer(kind=MPI_OFFSET)imap(1),doubleprecisionin(1))

              (Corresponds to nf_get_varm_double() in netCDF)

              These  functions  are  used  for mappedinput, which is like strided input described above, except
              that an additional index mapping vector is provided to specify the in-memory  arrangement  of  the
              data  values.   For  an explanation of the index mapping vector, see COMMON ARGUMENTS DESCRIPTIONS
              below.

Writing And Reading A Sliced Array

integerfunctionnfmpi_put_vars_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),character*(*)out)

              (Corresponds to nf_put_vars_text() in netCDF)

       integerfunctionnfmpi_put_vars_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer*1out(1))

              (Corresponds to nf_put_vars_int1() in netCDF)

       integerfunctionnfmpi_put_vars_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer*2out(1))

              (Corresponds to nf_put_vars_int2() in netCDF)

       integerfunctionnfmpi_put_vars_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integerout(1))

              (Corresponds to nf_put_vars_int() in netCDF)

       integerfunctionnfmpi_put_vars_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),realout(1))

              (Corresponds to nf_put_vars_real() in netCDF)

       integerfunctionnfmpi_put_vars_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),doubleprecisionout(1))

              (Corresponds to nf_put_vars_double() in netCDF)

              These functions are used for stridedoutput, which is like  the  array  section  output  described
              above,  except  that  the  sampling stride (the interval between accessed values) is specified for
              each dimension.  For an explanation of the sampling stride vector, see COMMON  ARGUMENTS  DESCRIP‐
              TIONS below.

       integerfunctionnfmpi_get_vars_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),character*(*)in)

              (Corresponds to nf_get_vars_text() in netCDF)

       integerfunctionnfmpi_get_vars_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer*1in(1))

              (Corresponds to nf_get_vars_int1() in netCDF)

       integerfunctionnfmpi_get_vars_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integer*2in(1))

              (Corresponds to nf_get_vars_int2() in netCDF)

       integerfunctionnfmpi_get_vars_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),integerin(1))

              (Corresponds to nf_get_vars_int() in netCDF)

       integerfunctionnfmpi_get_vars_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),realin(1))

              (Corresponds to nf_get_vars_real() in netCDF)

       integerfunctionnfmpi_get_vars_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),integer(kind=MPI_OFFSET)stride(1),doubleprecisionin(1))

              (Corresponds to nf_get_vars_double() in netCDF)

              These functions are used for stridedinput, which is like the array section input described above,
              except that the sampling stride (the interval between accessed values) is specified for  each  di‐
              mension.   For an explanation of the sampling stride vector, see COMMON ARGUMENTS DESCRIPTIONS be‐
              low.

Writing And Reading An Array

integerfunctionnfmpi_put_vara_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),character*(*)out)

              (Corresponds to nf_put_vara_text() in netCDF)

       integerfunctionnfmpi_put_vara_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer*1out(1))

              (Corresponds to nf_put_vara_int1() in netCDF)

       integerfunctionnfmpi_put_vara_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer*2out(1))

              (Corresponds to nf_put_vara_int2() in netCDF)

       integerfunctionnfmpi_put_vara_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integerout(1))

              (Corresponds to nf_put_vara_int() in netCDF)

       integerfunctionnfmpi_put_vara_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),realout(1))

              (Corresponds to nf_put_vara_real() in netCDF)

       integerfunctionnfmpi_put_vara_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),doubleprecisionout(1))

              (Corresponds to nf_put_vara_double() in netCDF)

              Writes  an array section of values into a netCDF variable of an open netCDF dataset, which must be
              in data mode.  The array section is specified by the start  and  count  vectors,  which  give  the
              starting  index  and  count of values along each dimension of the specified variable.  The type of
              the data is specified in the function name and is converted to the external type of the  specified
              variable, if possible, otherwise an NF_ERANGE error is returned.

       integerfunctionnfmpi_get_vara_text(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),character*(*)in)

              (Corresponds to nf_get_vara_text() in netCDF)

       integerfunctionnfmpi_get_vara_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer*1in(1))

              (Corresponds to nf_get_vara_int1() in netCDF)

       integerfunctionnfmpi_get_vara_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),integer*2in(1))

              (Corresponds to nf_get_vara_int2() in netCDF)

       integerfunctionnfmpi_get_vara_int(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),inte‐ger(kind=MPI_OFFSET)count(1),integerin(1))

              (Corresponds to nf_get_vara_int() in netCDF)

       integerfunctionnfmpi_get_vara_real(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),in‐teger(kind=MPI_OFFSET)count(1),realin(1))

              (Corresponds to nf_get_vara_real() in netCDF)

       integerfunctionnfmpi_get_vara_double(integerncid,integervarid,integer(kind=MPI_OFFSET)start(1),integer(kind=MPI_OFFSET)count(1),doubleprecisionin(1))

              (Corresponds to nf_get_vara_double() in netCDF)

              Reads an array section of values from a netCDF variable of an open netCDF dataset, which  must  be
              in  data  mode.   The  array  section  is specified by the start and count vectors, which give the
              starting index and count of values along each dimension of the specified variable.   The  data  is
              converted from the external type of the specified variable, if necessary, to the type specified in
              the function name.  If conversion is not possible, an NF_ERANGE error is returned.

Writing And Reading One Datum

integerfunctionnfmpi_put_var1_text(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),character*1*out)

              (Corresponds to nf_put_var1_text() in netCDF)

       integerfunctionnfmpi_put_var1_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),in‐teger*1*out)

              (Corresponds to nf_put_var1_int1() in netCDF)

       integerfunctionnfmpi_put_var1_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),in‐teger*2*out)

              (Corresponds to nf_put_var1_int2() in netCDF)

       integerfunctionnfmpi_put_var1_int(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),inte‐ger*out)

              (Corresponds to nf_put_var1_int() in netCDF)

       integerfunctionnfmpi_put_var1_real(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),real*out)

              (Corresponds to nf_put_var1_real() in netCDF)

       integerfunctionnfmpi_put_var1_double(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),doubleprecision*out)

              (Corresponds to nf_put_var1_double() in netCDF)

              Puts a single data value into a variable at the position index of an open netCDF dataset  that  is
              in  data mode.  The type of the data is specified in the function name, and it is converted to the
              external type of the specified variable, if possible, otherwise an NF_ERANGE error is returned.

       integerfunctionnfmpi_get_var1_text(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),character*1in)

              (Corresponds to nf_get_var1_text() in netCDF)

       integerfunctionnfmpi_get_var1_int1(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),in‐teger*1in)

              (Corresponds to nf_get_var1_int1() in netCDF)

       integerfunctionnfmpi_get_var1_int2(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),in‐teger*2in)

              (Corresponds to nf_get_var1_int2() in netCDF)

       integerfunctionnfmpi_get_var1_int(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),inte‐gerin)

              (Corresponds to nf_get_var1_int() in netCDF)

       integerfunctionnfmpi_get_var1_real(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),realin)

              (Corresponds to nf_get_var1_real() in netCDF)

       integerfunctionnfmpi_get_var1_double(integerncid,integervarid,integer(kind=MPI_OFFSET)index(1),doubleprecisionin)

              (Corresponds to nf_get_var1_double() in netCDF)

              Gets a single data value from a variable at the position index of an open netCDF dataset  that  is
              in  data  mode.  The data is converted from the external type of the specified variable, if neces‐
              sary, to the type specified in the function name.  If conversion is not possible, an NF_ERANGE er‐
              ror is returned.

Writing And Reading Whole Variables

integerfunctionnfmpi_put_var_text(integerncid,integervarid,character*(*)out)

              (Corresponds to nf_put_var_text() in netCDF)

       integerfunctionnfmpi_put_var_int1(integerncid,integervarid,integer*1out(1))

              (Corresponds to nf_put_var_int1() in netCDF)

       integerfunctionnfmpi_put_var_int2(integerncid,integervarid,integer*2out(1))

              (Corresponds to nf_put_var_int2() in netCDF)

       integerfunctionnfmpi_put_var_int(integerncid,integervarid,integerout(1))

              (Corresponds to nf_put_var_int() in netCDF)

       integerfunctionnfmpi_put_var_real(integerncid,integervarid,realout(1))

              (Corresponds to nf_put_var_real() in netCDF)

       integerfunctionnfmpi_put_var_double(integerncid,integervarid,doubleprecisionout(1))

              (Corresponds to nf_put_var_double() in netCDF)

              Writes an entire netCDF variable (i.e. all the values).  The netCDF dataset must be  open  and  in
              data mode.  The type of the data is specified in the function name, and it is converted to the ex‐
              ternal type of the specified variable, if possible, otherwise an NF_ERANGE error is returned. Note
              that  rounding  is  not performed during the conversion. Floating point numbers are truncated when
              converted to integers.

       integerfunctionnfmpi_get_var_text(integerncid,integervarid,character*(*)in)

              (Corresponds to nf_get_var_text() in netCDF)

       integerfunctionnfmpi_get_var_int1(integerncid,integervarid,integer*1in(1))

              (Corresponds to nf_get_var_int1() in netCDF)

       integerfunctionnfmpi_get_var_int2(integerncid,integervarid,integer*2in(1))

              (Corresponds to nf_get_var_int2() in netCDF)

       integerfunctionnfmpi_get_var_int(integerncid,integervarid,integerin(1))

              (Corresponds to nf_get_var_int() in netCDF)

       integerfunctionnfmpi_get_var_real(integerncid,integervarid,realin(1))

              (Corresponds to nf_get_var_real() in netCDF)

       integerfunctionnfmpi_get_var_double(integerncid,integervarid,doubleprecisionin(1))

              (Corresponds to nf_get_var_double() in netCDF)

              Reads an entire netCDF variable (i.e. all the values).  The netCDF dataset must be open and in da‐
              ta mode.  The data is converted from the external type of the specified variable, if necessary, to
              the type specified in the function name.  If conversion is not possible, an NF_ERANGE error is re‐
              turned.

See Also