@c ---------------------------------------------------
@node High-level functions
@section High-level functions
@cindex High-level functions
@c High-level functions nccreate
@c -----------------------------------------
@subsection nccreate
@cindex nccreate
@deftypefn  {Function File} {} nccreate(@var{filename},@var{varname})
@deftypefnx  {Function File} {} nccreate(@var{filename},@var{varname},"property",@var{value},...)

 Create the variable @var{varname} in the file @var{filename}.

@subsubheading Properties
 The following properties can be used:
@itemize
@item "Dimensions": a cell array with the dimension names followed by their
 length or Inf if the dimension is unlimited. If the property is omitted, a
 scalar variable is created.
@item "Datatype": a string with the Octave data type name
 (see @code{ncinfo} for the correspondence between Octave and NetCDF data
 types). The default data type is a "double".
@item "Format": This can be "netcdf4_classic" (default), "classic", "64bit"
 or "netcdf4".
@item "FillValue": the value used for undefined elements of the NetCDF
 variable.
@item "ChunkSize": the size of the data chunks. If omitted, the variable is
 not chunked.
@item "DeflateLevel": The deflate level for compression. It can be the string
 "disable" (default) for no compression or an integer between 0 (no
 compression) and 9 (maximum compression).
@item "Shuffle": true for enabling the shuffle filter or false (default) for
 disabling it.
@end itemize

@subsubheading Example
@example
 nccreate("test.nc","temp","Dimensions",@{"lon",10,"lat",20@},"Format","classic");
 ncdisp("test.nc");
@end example
@xseealso{ncwrite}
@end deftypefn
@c High-level functions ncdisp
@c -----------------------------------------
@subsection ncdisp
@cindex ncdisp
@deftypefn {Function File} {} ncdisp (@var{filename})
 Display meta-data of the NetCDF file @var{filename}

@subsubheading Example
@example
 ncdisp("test.nc");
@end example
@xseealso{ncinfo}
@end deftypefn
@c High-level functions ncinfo
@c -----------------------------------------
@subsection ncinfo
@cindex ncinfo
@deftypefn  {Function File} {@var{info} =} ncinfo (@var{filename})
@deftypefnx  {Function File} {@var{info} =} ncinfo (@var{filename}, @var{varname})
@deftypefnx  {Function File} {@var{info} =} ncinfo (@var{filename}, @var{groupname})
 Return information about an entire NetCDF file @var{filename} (i.e. the root
 group "/"), about the variable called @var{varname} or the group called
@var{groupname}.

 The structure @var{info} has always the following fields:
@itemize
@item @var{Filename}: the name of the NetCDF file
@item @var{Format}: one of the strings "CLASSIC", "64BIT", "NETCDF4"
 or "NETCDF4_CLASSIC"
@end itemize

 The structure @var{info} has additional fields depending on whether a
 group of variable is queried.

@subsubheading Groups

 Groups are returned as an array structure with the following fields:

@itemize
@item @var{Name}: the group name. The root group is named "/".
@item @var{Dimensions}: a array structure with the dimensions.
@item @var{Variables}: a array structure with the variables.
@item @var{Attributes}: a array structure with global attributes.
@item @var{Groups}: a array structure (one for each group) with the
 same fields as this structure.
@end itemize

@subsubheading Dimensions

 Dimensions are returned as an array structure with the following fields:
@itemize
   @item @var{Name}: the name of the dimension
   @item @var{Length}: the length of the dimension
   @item @var{Unlimited}: true of the dimension has no fixed limited, false
@end itemize

@subsubheading Variables

 Variables are returned as an array structure with the following fields:
@itemize
   @item @var{Name}: the name of the dimension
   @item @var{Dimensions}: array structure of all dimensions of this variable
 with the same structure as above.
   @item @var{Size}: array with the size of the variable
   @item @var{Datatype}: string with the corresponding octave data-type
 (see below)
   @item @var{Attributes}: a array structure of attributes
   @item @var{FillValue}: the NetCDF fill value of the variable. If the fill
 value is not defined, then this attribute is an empty array ([]).
   @item @var{DeflateLevel}: the NetCDF deflate level between 0 (no
   compression) and 9 (maximum compression).
   @item @var{Shuffle}: is true if the shuffle filter is activated to improve
   compression, otherwise false.
   @item @var{CheckSum}: is set to "fletcher32", if check-sums are used,
    otherwise this field is not defined.
@end itemize

@subsubheading Attributes

 Attributes are returned as an array structure with the following fields:
@itemize
   @item @var{Name}: the name of the attribute
   @item @var{Value}: the value of the attribute (with the corresponding type)
   @item @var{Unlimited}: true of the dimension has no fixed limited, false
@end itemize

@subsubheading Data-types

 The following the the correspondence between the Octave and NetCDF
 data-types:

@multitable @columnfractions .5 .5
@headitem Octave type @tab NetCDF type
@item @code{int8}    @tab @code{NC_BYTE}
@item @code{uint8}   @tab @code{NC_UBYTE}
@item @code{int16}   @tab @code{NC_SHORT}
@item @code{uint16}  @tab @code{NC_USHORT}
@item @code{int32}   @tab @code{NC_INT}
@item @code{uint32}  @tab @code{NC_UINT}
@item @code{int64}   @tab @code{NC_INT64}
@item @code{uint64}  @tab @code{NC_UINT64}
@item @code{single}  @tab @code{NC_FLOAT}
@item @code{double}  @tab @code{NC_DOUBLE}
@item @code{char}    @tab @code{NC_CHAR}
@end multitable

 The output of @code{ncinfo} can be used to create a NetCDF file with the same
 meta-data using @code{ncwriteschema}.

 Note: If there are no attributes (or variable or groups), the corresponding
 field is an empty matrix and not an empty struct array for compatibility
 with matlab.

@xseealso{ncread,nccreate,ncwriteschema,ncdisp}

@end deftypefn
@c High-level functions ncread
@c -----------------------------------------
@subsection ncread
@cindex ncread
@deftypefn  {Function File} {@var{x} =} ncread (@var{filename}, @var{varname})
@deftypefnx  {Function File} {@var{x} =} ncread (@var{filename}, @var{varname},@var{start},@var{count},@var{stride})

 Read the variable @var{varname} from the NetCDF file @var{filename}.

 If @var{start},@var{count} and @var{stride} are present, a subset of the
 variable is loaded. The parameter @var{start} contains the starting indices
 (1-based), @var{count} is the number of elements and @var{stride} the
 increment between two successive elements. These parameters are vectors whose
 length is equal to the number of dimension of the variable. Elements of
@var{count} might be Inf which means that as many values as possible are
 loaded.

 If the variable has the _FillValue attribute, then the corresponding values
 are replaced by NaN (except for characters). NetCDF attributes scale_factor
 (default 1) and add_offset (default 0) are use the transform the variable
 during the loading:

 x = scale_factor * x_in_file + add_offset

 The output data type matches the NetCDF datatype, except when the attributes
 _FillValue, add_offset or scale_factor are defined in which case the output
 is a array in double precision.

 Note that values equal to the attribute missing_value are not replaced by
 NaN (for compatibility).

@subsubheading Example
 Read the data from variable 'mydata' in the file test.nc.
@example
 data  = ncread('test.nc','mydata');
@end example

@xseealso{ncwrite,ncinfo,ncdisp}

@end deftypefn
@c High-level functions ncreadatt
@c -----------------------------------------
@subsection ncreadatt
@cindex ncreadatt
@deftypefn  {Function File} {@var{val} =} ncreadatt(@var{filename},@var{varname},@var{attname})

 Return the attribute @var{attname} of the variable @var{varname} in the file
@var{filename}.

 Global attributes can be accessed by using "/" or the group name as
@var{varname}. The type of attribute is mapped to the Octave data types.
 (see @code{ncinfo}).

@subsubheading Example
 Read global attribute 'creation_date'
@example
 d = ncreadatt('test.nc','/','creation_date')
@end example
 Read atribute 'myattr' assigned to variable mydata.
@example
 d = ncreadattr('test.nc', 'mydata', 'myattr');
@end example
@xseealso{ncinfo,ncwriteatt}
@end deftypefn
@c High-level functions ncwrite
@c -----------------------------------------
@subsection ncwrite
@cindex ncwrite
@deftypefn  {Function File} {} ncwrite (@var{filename}, @var{varname}, @var{x})
@deftypefnx  {Function File} {} ncwrite (@var{filename}, @var{varname}, @var{x}, @var{start}, @var{stride})

 Write array @var{x} to the the variable @var{varname} in the NetCDF file
@var{filename}.

 The variable with the name @var{varname} and the appropriate dimension must
 already exist in the NetCDF file.

 If @var{start} and @var{stride} are present, a subset of the
 variable is written. The parameter @var{start} contains the starting indices
 (1-based) and @var{stride} the
 increment between two successive elements. These parameters are vectors whose
 length is equal to the number of dimension of the variable.

 If the variable has the _FillValue attribute, then the values equal to NaN
 are replaced by corresponding fill value NetCDF attributes scale_factor
 (default 1) and add_oddset (default 0) are use the transform the variable
 during writing:

 x_in_file = (x - add_offset)/scale_factor

@subsubheading Example
 Create a netcdf file with a variable of 'mydata' and then write
 data to that variable.
@example
 nccreate('myfile.nc','mydata');
 ncwrite('myfile.nc','mydata', 101);
@end example

@xseealso{ncread,nccreate}

@end deftypefn
@c High-level functions ncwriteatt
@c -----------------------------------------
@subsection ncwriteatt
@cindex ncwriteatt
@deftypefn  {Function File} {} ncwriteatt(@var{filename},@var{varname},@var{attname},@var{val})

 Defines the attribute @var{attname} of the variable @var{varname} in the file
@var{filename} with the value @var{val}.

 Global attributes can be defined by using "/" or the group name as
@var{varname}. The type of value is mapped to the NetCDF data types.
 (see @code{ncinfo}).

@subsubheading Example
 Create a netcdf4 format file with a variable mydata and assign an attribute "units" to it.
@example
 nccreate("myfile.nc", "mydata", "Format", "netcdf4");
 ncwriteatt("myfile.nc", "mydata", "Units", "K");
@end example

@xseealso{ncinfo}
@end deftypefn
@c High-level functions ncwriteschema
@c -----------------------------------------
@subsection ncwriteschema
@cindex ncwriteschema
@deftypefn  {Function File} {} ncwriteschema (@var{filename}, @var{schema})

 Create a NetCDF called @var{filename} with the dimensions, attributes,
 variables and groups given by the structure @var{schema}.

 The variable @var{schema} has the same structure as the results of
@code{ncinfo}. @code{ncinfo} and @code{ncwriteschema} can be used together to
 create a NetCDF using another file as a template:

@subsubheading Example
@example
 schema = ncinfo("template.nc");
 # the new file should be named "new_file.nc"
 ncwriteschema("new_file.nc",schema);
@end example

 Unused field in @var{schema} such as @var{ChunkSize}, @var{Shuffle},
@var{DeflateLevel}, @var{FillValue}, @var{Checksum} can be left-out if the
 corresponding feature is not used.

 Dimensions are considered as limited if the field @var{Unlimited} is missing,
 unless the dimension length is Inf.

@xseealso{ncinfo}

@end deftypefn
@c ---------------------------------------------------
@node Low-level functions (Deprecated)
@section Low-level functions (Deprecated)
@cindex Low-level functions (Deprecated)
@c Low-level functions (Deprecated) netcdf_abort
@c -----------------------------------------
@subsection netcdf_abort
@cindex netcdf_abort
@deftypefn {Loadable Function} {} netcdf_abort(@var{ncid}) 
Aborts all changes since the last time the dataset entered in define mode.
@end deftypefn
@xseealso{netcdf_reDef}

@c Low-level functions (Deprecated) netcdf_close
@c -----------------------------------------
@subsection netcdf_close
@cindex netcdf_close
@deftypefn {Loadable Function} {} netcdf_close(@var{ncid}) 
Close the NetCDF file with the id @var{ncid}.
@end deftypefn
@xseealso{netcdf_open}

@c Low-level functions (Deprecated) netcdf_copyAtt
@c -----------------------------------------
@subsection netcdf_copyAtt
@cindex netcdf_copyAtt
@deftypefn {Loadable Function} {} netcdf_copyAtt (@var{ncid},@var{varid},@var{name},@var{ncid_out},@var{varid_out}) 
Copies the attribute named @var{old_name} of the variable @var{varid} in the data set @var{ncid} 
to the variable @var{varid_out} in the data set @var{ncid_out}. 
To copy a global attribute use netcdf_getConstant("global") for @var{varid} or @var{varid_out}.
@xseealso{netcdf_getAtt,netcdf_getConstant}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_create
@c -----------------------------------------
@subsection netcdf_create
@cindex netcdf_create
@deftypefn {Loadable Function} {@var{ncid} =} netcdf_create(@var{filename},@var{mode}) 
Creates the file named @var{filename} in the mode @var{mode} which can have the 
following values: 
"clobber" (overwrite existing files), 
"noclobber" (prevent to overwrite existing files) 
"64bit_offset" (use the 64bit-offset format), 
"netcdf4" (use the NetCDF4, i.e. HDF5 format) or 
"share" (concurrent reading of the dataset). 
@var{mode} can also be the numeric value return by netcdf_getConstant. In the later-case it can be combined with a bitwise-or. 
@end deftypefn
@subsubheading Example
@example 
mode =  bitor(netcdf.getConstant("classic_model"), ...
netcdf.getConstant("netcdf4")); 
ncid = netcdf.create("test.nc",mode); 
@end example 
@xseealso{netcdf_close}

@c Low-level functions (Deprecated) netcdf_defDim
@c -----------------------------------------
@subsection netcdf_defDim
@cindex netcdf_defDim
@deftypefn {Loadable Function} {@var{dimid} =} netcdf_defDim(@var{ncid},@var{name},@var{len}) 
Define the dimension with the name @var{name} and the length @var{len} in the dataset @var{ncid}. The id of the dimension is returned.
@end deftypefn
@xseealso{netcdf_defVar}

@c Low-level functions (Deprecated) netcdf_defGrp
@c -----------------------------------------
@subsection netcdf_defGrp
@cindex netcdf_defGrp
@deftypefn {Loadable Function} {@var{new_ncid} =} netcdf_defGrp(@var{ncid},@var{name}) 
Define a group in a NetCDF file.
@xseealso{netcdf_inqGrps}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_defVar
@c -----------------------------------------
@subsection netcdf_defVar
@cindex netcdf_defVar
@deftypefn {Loadable Function} {@var{varid} = } netcdf_defVar(@var{ncid},@var{name},@var{xtype},@var{dimids}) 
Defines a variable with the name @var{name} in the dataset @var{ncid}. @var{xtype} can be "byte", "ubyte", "short", "ushort", "int", "uint", "int64", "uint64", "float", "double", "char" or the corresponding number as returned by netcdf_getConstant. The parameter @var{dimids} define the ids of the dimension. For scalar this parameter is the empty array ([]). The variable id is returned. 
@end deftypefn
@xseealso{netcdf_open,netcdf_defDim}

@c Low-level functions (Deprecated) netcdf_defVarChunking
@c -----------------------------------------
@subsection netcdf_defVarChunking
@cindex netcdf_defVarChunking
@deftypefn {Loadable Function} {} netcdf_defVarChunking (@var{ncid},@var{varid},@var{storage},@var{chunkSizes}) 
Define the chunking settings of NetCDF variable @var{varid}.
If @var{storage} is the string "chunked", the variable is stored by chunk of the size @var{chunkSizes}.
If @var{storage} is the string "contiguous", the variable is stored in a contiguous way.
@end deftypefn
@xseealso{netcdf_inqVarChunking}

@c Low-level functions (Deprecated) netcdf_defVarDeflate
@c -----------------------------------------
@subsection netcdf_defVarDeflate
@cindex netcdf_defVarDeflate
@deftypefn {Loadable Function} {} netcdf_defVarDeflate (@var{ncid},@var{varid},@var{shuffle},@var{deflate},@var{deflate_level}) 
Define the compression settings NetCDF variable @var{varid}.
If @var{deflate} is true, then the variable is compressed. The compression level @var{deflate_level} is an integer between 0 (no compression) and 9 (maximum compression).
@end deftypefn
@xseealso{netcdf_inqVarDeflate}

@c Low-level functions (Deprecated) netcdf_defVarFill
@c -----------------------------------------
@subsection netcdf_defVarFill
@cindex netcdf_defVarFill
@deftypefn {Loadable Function} {} netcdf_defVarFill(@var{ncid},@var{varid},@var{no_fill},@var{fillvalue}) 
Define the fill-value settings of the NetCDF variable @var{varid}.
If @var{no_fill} is false, then the values between no-contiguous writes are filled with the value @var{fill_value}. This is disabled by setting @var{no_fill} to true.
@end deftypefn
@xseealso{netcdf_inqVarFill}

@c Low-level functions (Deprecated) netcdf_defVarFletcher32
@c -----------------------------------------
@subsection netcdf_defVarFletcher32
@cindex netcdf_defVarFletcher32
@deftypefn {Loadable Function} {} netcdf_defVarFletcher32(@var{ncid},@var{varid},@var{checksum}) 
Defines the checksum settings of the variable with the id @var{varid} in the data set @var{ncid}. If @var{checksum} is the string "FLETCHER32", then fletcher32 checksums will be turned on for this variable. If @var{checksum} is "NOCHECKSUM", then checksums will be disabled. 
@end deftypefn
@xseealso{netcdf_defVar,netcdf_inqVarFletcher32}

@c Low-level functions (Deprecated) netcdf_defVlen
@c -----------------------------------------
@subsection netcdf_defVlen
@cindex netcdf_defVlen
@deftypefn {Loadable Function} {@var{varid} = } netcdf_defVlen(@var{ncid},@var{typename},@var{basetype}) 
Defines a NC_VLEN variable length array type with the type name @var{typename} and a base datatype of @var{basetype} in the dataset @var{ncid}. @var{basetype} can be "byte", "ubyte", "short", "ushort", "int", "uint", "int64", "uint64", "float", "double", "char" or the corresponding number as returned by netcdf_getConstant. The new data type id is returned. 
@end deftypefn
@xseealso{netcdf_open,netcdf_defVar, netcdf_inqVlen}

@c Low-level functions (Deprecated) netcdf_delAtt
@c -----------------------------------------
@subsection netcdf_delAtt
@cindex netcdf_delAtt
@deftypefn {Loadable Function} {} netcdf_delAtt(@var{ncid},@var{varid},@var{name}) 
Deletes the attribute named @var{name} of the variable @var{varid} in the data set @var{ncid}. 
To delete a global attribute use netcdf_getConstant("global") for @var{varid}.
@xseealso{netcdf_defAtt,netcdf_getConstant}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_endDef
@c -----------------------------------------
@subsection netcdf_endDef
@cindex netcdf_endDef
@deftypefn {Loadable Function} {} netcdf_endDef (@var{ncid}) 
Leaves define-mode of NetCDF file @var{ncid}.
@end deftypefn
@xseealso{netcdf_reDef}

@c Low-level functions (Deprecated) netcdf_getAtt
@c -----------------------------------------
@subsection netcdf_getAtt
@cindex netcdf_getAtt
@deftypefn  {Loadable Function} {@var{data} =} netcdf_getAtt (@var{ncid},@var{varid},@var{name}) 
Get the value of a NetCDF attribute.
This function returns the value of the attribute called @var{name} of the variable 
@var{varid} in the NetCDF file @var{ncid}. For global attributes @var{varid} can be 
netcdf_getConstant("global").
@xseealso{netcdf_putAtt}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_getChunkCache
@c -----------------------------------------
@subsection netcdf_getChunkCache
@cindex netcdf_getChunkCache
@deftypefn {Loadable Function} {[@var{size}, @var{nelems}, @var{preemption}] =} netcdf_getChunkCache() 
Gets the default chunk cache settings in the HDF5 library. 
@end deftypefn
@xseealso{netcdf_setChunkCache}

@c Low-level functions (Deprecated) netcdf_getConstant
@c -----------------------------------------
@subsection netcdf_getConstant
@cindex netcdf_getConstant
@deftypefn {Loadable Function} {@var{value} =} netcdf_getConstant(@var{name}) 
Returns the value of a NetCDF constant called @var{name}.
@xseealso{netcdf_getConstantNames}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_getConstantNames
@c -----------------------------------------
@subsection netcdf_getConstantNames
@cindex netcdf_getConstantNames
@deftypefn {Loadable Function} {@var{value} =} netcdf_getConstantNames() 
Returns a list of all constant names.
@end deftypefn
@xseealso{netcdf_getConstant}

@c Low-level functions (Deprecated) netcdf_getVar
@c -----------------------------------------
@subsection netcdf_getVar
@cindex netcdf_getVar
@deftypefn  {Loadable Function} {@var{data} =} netcdf_getVar (@var{ncid},@var{varid}) 
@deftypefnx {Loadable Function} {@var{data} =} netcdf_getVar (@var{ncid},@var{varid},@var{start}) 
@deftypefnx {Loadable Function} {@var{data} =} netcdf_getVar (@var{ncid},@var{varid},@var{start},@var{count}) 
@deftypefnx {Loadable Function} {@var{data} =} netcdf_getVar (@var{ncid},@var{varid},@var{start},@var{count},@var{stride}) 
Get the data from a NetCDF variable.
The data @var{data} is loaded from the variable @var{varid} of the NetCDF file @var{ncid}. 
@var{start} is the start index of each dimension (0-based and defaults to a vector of zeros), 
@var{count} is the number of elements of to be written along each dimension (default all elements)
and @var{stride} is the sampling interval.
@end deftypefn
@xseealso{netcdf_putVar}

@c Low-level functions (Deprecated) netcdf_inq
@c -----------------------------------------
@subsection netcdf_inq
@cindex netcdf_inq
@deftypefn {Loadable Function} {@var{vers} =} netcdf_inqLibVers() 
Returns the version of the NetCDF library.
@end deftypefn
@xseealso{netcdf_open}

@c Low-level functions (Deprecated) netcdf_inqAtt
@c -----------------------------------------
@subsection netcdf_inqAtt
@cindex netcdf_inqAtt
@deftypefn  {Loadable Function} {@var{name} =} netcdf_inqAttName (@var{ncid},@var{varid},@var{attnum}) 
Get the name of a NetCDF attribute.
This function returns the name of the attribute with the id @var{attnum} of the variable 
@var{varid} in the NetCDF file @var{ncid}. For global attributes @var{varid} can be 
netcdf_getConstant("global").
@xseealso{netcdf_inqAttName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqAttID
@c -----------------------------------------
@subsection netcdf_inqAttID
@cindex netcdf_inqAttID
@deftypefn {Loadable Function} {@var{attnum} =} netcdf_inqAttID(@var{ncid},@var{varid},@var{attname}) 
Return the attribute id @var{attnum} of the attribute named @var{attname} of the variable @var{varid} in the dataset @var{ncid}. 
For global attributes @var{varid} can be 
netcdf_getConstant("global").
@xseealso{netcdf_inqAttName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqAttName
@c -----------------------------------------
@subsection netcdf_inqAttName
@cindex netcdf_inqAttName
@deftypefn  {Loadable Function} {@var{name} =} netcdf_inqAttName (@var{ncid},@var{varid},@var{attnum}) 
Get the name of a NetCDF attribute.
This function returns the name of the attribute with the id @var{attnum} of the variable 
@var{varid} in the NetCDF file @var{ncid}. For global attributes @var{varid} can be 
netcdf_getConstant("global").
@xseealso{netcdf_inqAttName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqDim
@c -----------------------------------------
@subsection netcdf_inqDim
@cindex netcdf_inqDim
@deftypefn {Loadable Function} {[@var{name},@var{length}] =} netcdf_inqDim(@var{ncid},@var{dimid}) 
Returns the name and length of a NetCDF dimension.
@xseealso{netcdf_inqDimID}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqDimID
@c -----------------------------------------
@subsection netcdf_inqDimID
@cindex netcdf_inqDimID
@deftypefn {Loadable Function} {@var{dimid} =} netcdf_inqDimID(@var{ncid},@var{dimname}) 
Return the id of a NetCDF dimension.
@xseealso{netcdf_inqDim}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqDimIDs
@c -----------------------------------------
@subsection netcdf_inqDimIDs
@cindex netcdf_inqDimIDs
@deftypefn {Loadable Function} {@var{dimids} =} netcdf_inqDimID(@var{ncid}) 
@deftypefnx {Loadable Function} {@var{dimids} =} netcdf_inqDimID(@var{ncid},@var{include_parents}) 
Return the dimension ids defined in a NetCDF file.
If @var{include_parents} is 1, the dimension ids of the parent group are also returned.
Per default this is not the case (@var{include_parents} is 0).
@xseealso{netcdf_inqDim}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqFormat
@c -----------------------------------------
@subsection netcdf_inqFormat
@cindex netcdf_inqFormat
@deftypefn {Loadable Function} {@var{format} =} netcdf_inqFormat(@var{ncid}) 
Return the NetCDF format of the dataset @var{ncid}.
Format might be one of the following 
"FORMAT_CLASSIC", "FORMAT_64BIT", "FORMAT_NETCDF4" or "FORMAT_NETCDF4_CLASSIC" 
@end deftypefn
@xseealso{netcdf_inq}

@c Low-level functions (Deprecated) netcdf_inqGrpFullNcid
@c -----------------------------------------
@subsection netcdf_inqGrpFullNcid
@cindex netcdf_inqGrpFullNcid
@deftypefn {Loadable Function} {@var{grp_ncid} =} netcdf_inqGrpFullNcid(@var{ncid},@var{name}) 
Return the group id based on the full group name.
@xseealso{netcdf_inqGrpName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqGrpName
@c -----------------------------------------
@subsection netcdf_inqGrpName
@cindex netcdf_inqGrpName
@deftypefn {Loadable Function} {@var{name} =} netcdf_inqGrpName(@var{ncid}) 
Return group name in a NetCDF file.
@xseealso{netcdf_inqGrps}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqGrpNameFull
@c -----------------------------------------
@subsection netcdf_inqGrpNameFull
@cindex netcdf_inqGrpNameFull
@deftypefn {Loadable Function} {@var{name} =} netcdf_inqGrpNameFull(@var{ncid}) 
Return full name of group in NetCDF file.
@xseealso{netcdf_inqGrpName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqGrpParent
@c -----------------------------------------
@subsection netcdf_inqGrpParent
@cindex netcdf_inqGrpParent
@deftypefn {Loadable Function} {@var{parent_ncid} =} netcdf_inqGrpParent(@var{ncid}) 
Return id of the parent group
@xseealso{netcdf_inqGrpName}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqGrps
@c -----------------------------------------
@subsection netcdf_inqGrps
@cindex netcdf_inqGrps
@deftypefn {Loadable Function} {@var{ncids} =} netcdf_inqGrps(@var{ncid}) 
Return all groups ids in a NetCDF file.
@xseealso{netcdf_inqGrps}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqLibVers
@c -----------------------------------------
@subsection netcdf_inqLibVers
@cindex netcdf_inqLibVers
@deftypefn {Loadable Function} {@var{vers} =} netcdf_inqLibVers() 
Returns the version of the NetCDF library.
@end deftypefn
@xseealso{netcdf_open}

@c Low-level functions (Deprecated) netcdf_inqNcid
@c -----------------------------------------
@subsection netcdf_inqNcid
@cindex netcdf_inqNcid
@deftypefn {Loadable Function} {@var{grp_ncid} =} netcdf_inqNcid(@var{ncid},@var{name}) 
Return group id based on its name
@xseealso{netcdf_inqGrpFullNcid}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqUnlimDims
@c -----------------------------------------
@subsection netcdf_inqUnlimDims
@cindex netcdf_inqUnlimDims
@deftypefn {Loadable Function} {@var{unlimdimids} =} netcdf_inqUnlimDims(@var{ncid}) 
Return the id of all unlimited dimensions of the NetCDF file @var{ncid}.
@end deftypefn
@xseealso{netcdf_inq}

@c Low-level functions (Deprecated) netcdf_inqUserType
@c -----------------------------------------
@subsection netcdf_inqUserType
@cindex netcdf_inqUserType
@deftypefn {Loadable Function} {[@var{typename}, @var{bytesize}, @var{basetypeid}, @var{numfields}, @var{classid}] = } netcdf_inqUserType(@var{ncid},@var{typeid}) 
Provide information on a user defined type @var{typeid} in the dataset @var{ncid}.

The function returns the typename, bytesize, base type id, number of fields and class identifier of the type.

@end deftypefn
@xseealso{netcdf_open, netcdf_defVlen, netcdf_inqVlen}

@c Low-level functions (Deprecated) netcdf_inqVar
@c -----------------------------------------
@subsection netcdf_inqVar
@cindex netcdf_inqVar
@deftypefn {Loadable Function} {[@var{no_fill},@var{fillvalue}] = } netcdf_inqVarFill(@var{ncid},@var{varid}) 
Determines the fill-value settings of the NetCDF variable @var{varid}.
If @var{no_fill} is false, then the values between no-contiguous writes are filled with the value @var{fill_value}. This is disabled by setting @var{no_fill} to true.
@end deftypefn
@xseealso{netcdf_defVarFill}

@c Low-level functions (Deprecated) netcdf_inqVarChunking
@c -----------------------------------------
@subsection netcdf_inqVarChunking
@cindex netcdf_inqVarChunking
@deftypefn {Loadable Function} {[@var{storage},@var{chunkSizes}] = } netcdf_inqVarChunking (@var{ncid},@var{varid}) 
Determines the chunking settings of NetCDF variable @var{varid}.
If @var{storage} is the string "chunked", the variable is stored by chunk of the size @var{chunkSizes}.
If @var{storage} is the string "contiguous", the variable is stored in a contiguous way.
@end deftypefn
@xseealso{netcdf_defVarChunking}

@c Low-level functions (Deprecated) netcdf_inqVarDeflate
@c -----------------------------------------
@subsection netcdf_inqVarDeflate
@cindex netcdf_inqVarDeflate
@deftypefn {Loadable Function} {[@var{shuffle},@var{deflate},@var{deflate_level}] = } netcdf_inqVarDeflate (@var{ncid},@var{varid}) 
Determines the compression settings NetCDF variable @var{varid}.
If @var{deflate} is true, then the variable is compressed. The compression level @var{deflate_level} is an integer between 0 (no compression) and 9 (maximum compression).
@end deftypefn
@xseealso{netcdf_defVarDeflate}

@c Low-level functions (Deprecated) netcdf_inqVarFill
@c -----------------------------------------
@subsection netcdf_inqVarFill
@cindex netcdf_inqVarFill
@deftypefn {Loadable Function} {[@var{no_fill},@var{fillvalue}] = } netcdf_inqVarFill(@var{ncid},@var{varid}) 
Determines the fill-value settings of the NetCDF variable @var{varid}.
If @var{no_fill} is false, then the values between no-contiguous writes are filled with the value @var{fill_value}. This is disabled by setting @var{no_fill} to true.
@end deftypefn
@xseealso{netcdf_defVarFill}

@c Low-level functions (Deprecated) netcdf_inqVarFletcher32
@c -----------------------------------------
@subsection netcdf_inqVarFletcher32
@cindex netcdf_inqVarFletcher32
@deftypefn {Loadable Function} {@var{checksum} =} netcdf_inqVarFletcher32(@var{ncid},@var{varid}) 
Determines the checksum settings of the variable with the id @var{varid} in the data set @var{ncid}. If fletcher32 checksums is turned on for this variable, then @var{checksum} is the string "FLETCHER32". Otherwise it is the string "NOCHECKSUM". 
@end deftypefn
@xseealso{netcdf_defVar,netcdf_inqVarFletcher32}

@c Low-level functions (Deprecated) netcdf_inqVarID
@c -----------------------------------------
@subsection netcdf_inqVarID
@cindex netcdf_inqVarID
@deftypefn {Loadable Function} {@var{varid} = } netcdf_inqVarID (@var{ncid},@var{name}) 
Return the id of a variable based on its name.
@xseealso{netcdf_defVar,netcdf_inqVarIDs}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqVarIDs
@c -----------------------------------------
@subsection netcdf_inqVarIDs
@cindex netcdf_inqVarIDs
@deftypefn {Loadable Function} {@var{varids} = } netcdf_inqVarID (@var{ncid}) 
Return all variable ids.
This functions returns all variable ids in a NetCDF file or NetCDF group.
@xseealso{netcdf_inqVarID}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_inqVlen
@c -----------------------------------------
@subsection netcdf_inqVlen
@cindex netcdf_inqVlen
@deftypefn {Loadable Function} {[@var{typename}, @var{bytesize}, @var{basetypeid}] = } netcdf_inqVlen(@var{ncid},@var{typeid}) 
Provide information on a NC_VLEN variable length array type @var{typeid} in the dataset @var{ncid}.

The function returns the typename, bytesize, and base type id.

@end deftypefn
@xseealso{netcdf_open, netcdf_defVlen}

@c Low-level functions (Deprecated) netcdf_open
@c -----------------------------------------
@subsection netcdf_open
@cindex netcdf_open
@deftypefn {Loadable Function} {@var{ncid} =} netcdf_open(@var{filename},@var{mode}) 
Opens the file named @var{filename} in the mode @var{mode}.
@end deftypefn
@xseealso{netcdf_close}

@c Low-level functions (Deprecated) netcdf_putAtt
@c -----------------------------------------
@subsection netcdf_putAtt
@cindex netcdf_putAtt
@deftypefn  {Loadable Function} {} netcdf_putAtt (@var{ncid},@var{varid},@var{name},@var{data}) 
Defines a NetCDF attribute.
This function defines the attribute called @var{name} of the variable 
@var{varid} in the NetCDF file @var{ncid}. The value of the attribute will be @var{data}. 
For global attributes @var{varid} can be 
netcdf_getConstant("global").
@xseealso{netcdf_getAtt}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_putVar
@c -----------------------------------------
@subsection netcdf_putVar
@cindex netcdf_putVar
@deftypefn  {Loadable Function} {} netcdf_putVar (@var{ncid},@var{varid},@var{data}) 
@deftypefnx {Loadable Function} {} netcdf_putVar (@var{ncid},@var{varid},@var{start},@var{data}) 
@deftypefnx {Loadable Function} {} netcdf_putVar (@var{ncid},@var{varid},@var{start},@var{count},@var{data}) 
@deftypefnx {Loadable Function} {} netcdf_putVar (@var{ncid},@var{varid},@var{start},@var{count},@var{stride},@var{data}) 
Put data in a NetCDF variable.
The data @var{data} is stored in the variable @var{varid} of the NetCDF file @var{ncid}. 
@var{start} is the start index of each dimension (0-based and defaults to a vector of zeros), 
@var{count} is the number of elements of to be written along each dimension (default all elements)
and @var{stride} is the sampling interval.
@end deftypefn
@xseealso{netcdf_endDef}

@c Low-level functions (Deprecated) netcdf_reDef
@c -----------------------------------------
@subsection netcdf_reDef
@cindex netcdf_reDef
@deftypefn {Loadable Function} {} netcdf_reDef (@var{ncid}) 
Enter define-mode of NetCDF file @var{ncid}.
@end deftypefn
@xseealso{netcdf_endDef}

@c Low-level functions (Deprecated) netcdf_renameAtt
@c -----------------------------------------
@subsection netcdf_renameAtt
@cindex netcdf_renameAtt
@deftypefn {Loadable Function} {} netcdf_renameAtt(@var{ncid},@var{varid},@var{old_name},@var{new_name}) 
Renames the attribute named @var{old_name} of the variable @var{varid} in the data set @var{ncid}. @var{new_name} is the new name of the attribute.
To rename a global attribute use netcdf_getConstant("global") for @var{varid}.
@xseealso{netcdf_copyAtt,netcdf_getConstant}
@end deftypefn
@c Low-level functions (Deprecated) netcdf_renameDim
@c -----------------------------------------
@subsection netcdf_renameDim
@cindex netcdf_renameDim
@deftypefn {Loadable Function} {} netcdf_renameDim(@var{ncid},@var{dimid},@var{name}) 
Renames the dimension with the id @var{dimid} in the data set @var{ncid}. @var{name} is the new name of the dimension.
@end deftypefn
@xseealso{netcdf_defDim}

@c Low-level functions (Deprecated) netcdf_renameVar
@c -----------------------------------------
@subsection netcdf_renameVar
@cindex netcdf_renameVar
@deftypefn {Loadable Function} {} netcdf_renameVar(@var{ncid},@var{varid},@var{name}) 
Renames the variable with the id @var{varid} in the data set @var{ncid}. @var{name} is the new name of the variable.
@end deftypefn
@xseealso{netcdf_defVar}

@c Low-level functions (Deprecated) netcdf_setChunkCache
@c -----------------------------------------
@subsection netcdf_setChunkCache
@cindex netcdf_setChunkCache
@deftypefn {Loadable Function} {} netcdf_setChunkCache(@var{size}, @var{nelems}, @var{preemption}) 
Sets the default chunk cache settings in the HDF5 library. The settings applies to all files which are subsequently opened or created.
@end deftypefn
@xseealso{netcdf_getChunkCache}

@c Low-level functions (Deprecated) netcdf_setDefaultFormat
@c -----------------------------------------
@subsection netcdf_setDefaultFormat
@cindex netcdf_setDefaultFormat
@deftypefn {Loadable Function} {@var{old_format} =} netcdf_setDefaultFormat(@var{format}) 
Sets the default format of the NetCDF library and returns the previous default format (as a numeric value). @var{format} can be 
"format_classic", "format_64bit",  "format_netcdf4" or "format_netcdf4_classic". 
@end deftypefn
@xseealso{netcdf_open}

@c Low-level functions (Deprecated) netcdf_setFill
@c -----------------------------------------
@subsection netcdf_setFill
@cindex netcdf_setFill
@deftypefn {Loadable Function} {@var{old_mode} =} netcdf_setFill(@var{ncid},@var{fillmode}) 
Change the fill mode (@var{fillmode}) of the data set @var{ncid}. The previous value of the fill mode is returned. @var{fillmode} can be either "fill" or "nofill".
@end deftypefn
@xseealso{netcdf_open}

@c Low-level functions (Deprecated) netcdf_sync
@c -----------------------------------------
@subsection netcdf_sync
@cindex netcdf_sync
@deftypefn {Loadable Function} {} netcdf_sync(@var{ncid}) 
Writes all changes to the disk and leaves the file open.
@end deftypefn
@xseealso{netcdf_close}

@c ---------------------------------------------------
@node Low-level functions
@section Low-level functions
@cindex Low-level functions
@c Low-level functions netcdf.abort
@c -----------------------------------------
@subsection netcdf.abort
@cindex abort
@deftypefn {} {} netcdf.abort(@var{ncid})
 Aborts all changes since the last time the dataset entered in define mode.
@end deftypefn
@c Low-level functions netcdf.close
@c -----------------------------------------
@subsection netcdf.close
@cindex close
@deftypefn {} {} netcdf.close(@var{ncid})
 Close the NetCDF file with the id @var{ncid}.
@end deftypefn
@c Low-level functions netcdf.copyAtt
@c -----------------------------------------
@subsection netcdf.copyAtt
@cindex copyAtt
@deftypefn {} {} netcdf.copyAtt (@var{ncid},@var{varid},@var{name},@var{ncid_out},@var{varid_out})
 Copies the attribute named @var{old_name} of the variable @var{varid} in the data set @var{ncid}
 to the variable @var{varid_out} in the data set @var{ncid_out}.
 To copy a global attribute use netcdf.getConstant("global") for @var{varid} or @var{varid_out}.
@xseealso{netcdf.getAtt,netcdf.getConstant}
@end deftypefn
@c Low-level functions netcdf.create
@c -----------------------------------------
@subsection netcdf.create
@cindex create
@deftypefn {} {@var{ncid} =} netcdf.create(@var{filename},@var{mode})
 Creates the file named @var{filename} in the mode @var{mode} which can have the
 following values:
 "clobber" (overwrite existing files),
 "noclobber" (prevent to overwrite existing files)
 "64bit_offset" (use the 64bit-offset format),
 "netcdf4" (use the NetCDF4, i.e. HDF5 format) or
 "share" (concurrent reading of the dataset).
@var{mode} can also be the numeric value return by netcdf.getConstant. In the later-case it can be combined with a bitwise-or.
@end deftypefn
@subsubheading Example
@example
 mode = bitor(netcdf.getConstant("classic_model"), ...
 netcdf.getConstant("netcdf4"));
 ncid = netcdf.create("test.nc",mode);
@end example
@c Low-level functions netcdf.defDim
@c -----------------------------------------
@subsection netcdf.defDim
@cindex defDim
@deftypefn {} {@var{dimid} =} netcdf.defDim(@var{ncid},@var{name},@var{len})
 Define the dimension with the name @var{name} and the length @var{len} in the dataset @var{ncid}. The id of the dimension is returned.
@end deftypefn
@c Low-level functions netcdf.defGrp
@c -----------------------------------------
@subsection netcdf.defGrp
@cindex defGrp
@deftypefn {} {@var{new_ncid} =} netcdf.defGrp(@var{ncid},@var{name})
 Define a group in a NetCDF file.
@xseealso{netcdf.inqGrps}
@end deftypefn
@c Low-level functions netcdf.defVar
@c -----------------------------------------
@subsection netcdf.defVar
@cindex defVar
@deftypefn {} {@var{varid} = } netcdf.defVar(@var{ncid},@var{name},@var{xtype},@var{dimids})
 Defines a variable with the name @var{name} in the dataset @var{ncid}. @var{xtype} can be "byte", "ubyte", "short", "ushort", "int", "uint", "int64", "uint64", "float", "double", "char" or the corresponding number as returned by netcdf.getConstant. The parameter @var{dimids} define the ids of the dimension. For scalar this parameter is the empty array ([]). The variable id is returned.
@end deftypefn
@c Low-level functions netcdf.defVarChunking
@c -----------------------------------------
@subsection netcdf.defVarChunking
@cindex defVarChunking
@deftypefn {} {} netcdf.defVarChunking (@var{ncid},@var{varid},@var{storage},@var{chunkSizes})
 Define the chunking settings of NetCDF variable @var{varid}.
 If @var{storage} is the string "chunked", the variable is stored by chunk of the size @var{chunkSizes}.
 If @var{storage} is the string "contiguous", the variable is stored in a contiguous way.
@end deftypefn
@c Low-level functions netcdf.defVarDeflate
@c -----------------------------------------
@subsection netcdf.defVarDeflate
@cindex defVarDeflate
@deftypefn {} {} netcdf.defVarDeflate (@var{ncid},@var{varid},@var{shuffle},@var{deflate},@var{deflate_level})
 Define the compression settings NetCDF variable @var{varid}.
 If @var{deflate} is true, then the variable is compressed. The compression level @var{deflate_level} is an integer between 0 (no compression) and 9 (maximum compression).
@end deftypefn
@c Low-level functions netcdf.defVarFill
@c -----------------------------------------
@subsection netcdf.defVarFill
@cindex defVarFill
@deftypefn {} {} netcdf.defVarFill(@var{ncid},@var{varid},@var{no_fill},@var{fillvalue})
 Define the fill-value settings of the NetCDF variable @var{varid}.
 If @var{no_fill} is false, then the values between no-contiguous writes are filled with the value @var{fill_value}. This is disabled by setting @var{no_fill} to true.
@end deftypefn
@c Low-level functions netcdf.defVarFletcher32
@c -----------------------------------------
@subsection netcdf.defVarFletcher32
@cindex defVarFletcher32
@deftypefn {} {} netcdf.defVarFletcher32(@var{ncid},@var{varid},@var{checksum})
 Defines the checksum settings of the variable with the id @var{varid} in the data set @var{ncid}. If @var{checksum} is the string "FLETCHER32", then fletcher32 checksums will be turned on for this variable. If @var{checksum} is "NOCHECKSUM", then checksums will be disabled.
@end deftypefn
@c Low-level functions netcdf.defVlen
@c -----------------------------------------
@subsection netcdf.defVlen
@cindex defVlen
@deftypefn {} {@var{varid} = } netcdf.defVlen(@var{ncid},@var{typename},@var{basetype})
 Defines a NC_VLEN variable length array type with the type name @var{typename} and a base datatype of @var{basetype} in the dataset @var{ncid}. @var{basetype} can be "byte", "ubyte", "short", "ushort", "int", "uint", "int64", "uint64", "float", "double", "char" or the corresponding number as returned by netcdf.getConstant. The new data type id is returned.
@end deftypefn
@c Low-level functions netcdf.delAtt
@c -----------------------------------------
@subsection netcdf.delAtt
@cindex delAtt
@deftypefn {} {} netcdf.delAtt(@var{ncid},@var{varid},@var{name})
 Deletes the attribute named @var{name} of the variable @var{varid} in the data set @var{ncid}.
 To delete a global attribute use netcdf.getConstant("global") for @var{varid}.
@xseealso{netcdf.defAtt,netcdf.getConstant}
@end deftypefn
@c Low-level functions netcdf.endDef
@c -----------------------------------------
@subsection netcdf.endDef
@cindex endDef
@deftypefn {} {} netcdf.endDef (@var{ncid})
 Leaves define-mode of NetCDF file @var{ncid}.
@end deftypefn
@c Low-level functions netcdf.getAtt
@c -----------------------------------------
@subsection netcdf.getAtt
@cindex getAtt
@deftypefn {} {@var{data} =} netcdf.getAtt (@var{ncid},@var{varid},@var{name})
 Get the value of a NetCDF attribute.
 This function returns the value of the attribute called @var{name} of the variable
@var{varid} in the NetCDF file @var{ncid}. For global attributes @var{varid} can be
 netcdf.getConstant("global").
@xseealso{netcdf.putAtt}
@end deftypefn
@c Low-level functions netcdf.getChunkCache
@c -----------------------------------------
@subsection netcdf.getChunkCache
@cindex getChunkCache
@deftypefn {} {[@var{size}, @var{nelems}, @var{preemption}] =} netcdf.getChunkCache()
 Gets the default chunk cache settings in the HDF5 library.
@end deftypefn
@c Low-level functions netcdf.getConstant
@c -----------------------------------------
@subsection netcdf.getConstant
@cindex getConstant
@deftypefn {} {@var{value} =} netcdf.getConstant(@var{name})
 Returns the value of a NetCDF constant called @var{name}.
@xseealso{netcdf.getConstantNames}
@end deftypefn
@c Low-level functions netcdf.getConstantNames
@c -----------------------------------------
@subsection netcdf.getConstantNames
@cindex getConstantNames
@deftypefn {} {@var{value} =} netcdf.getConstantNames()
 Returns a list of all constant names.
@end deftypefn
@c Low-level functions netcdf.getVar
@c -----------------------------------------
@subsection netcdf.getVar
@cindex getVar
@deftypefn {} {@var{data} =} netcdf.getVar (@var{ncid},@var{varid})
@deftypefnx {} {@var{data} =} netcdf.getVar (@var{ncid},@var{varid},@var{start})
@deftypefnx {} {@var{data} =} netcdf.getVar (@var{ncid},@var{varid},@var{start},@var{count})
@deftypefnx {} {@var{data} =} netcdf.getVar (@var{ncid},@var{varid},@var{start},@var{count},@var{stride})
 Get the data from a NetCDF variable.
 The data @var{data} is loaded from the variable @var{varid} of the NetCDF file @var{ncid}.
@var{start} is the start index of each dimension (0-based and defaults to a vector of zeros),
@var{count} is the number of elements of to be written along each dimension (default all elements)
 and @var{stride} is the sampling interval.
@end deftypefn
@c Low-level functions netcdf.inq
@c -----------------------------------------
@subsection netcdf.inq
@cindex inq
@deftypefn {} {[@var{ndims},@var{nvars},@var{ngatts},@var{unlimdimid}] =} netcdf.inq(@var{ncid})
 Return the number of dimension (@var{ndims}), the number of variables (@var{nvars}), the number of global attributes (@var{ngatts}) and the id of the unlimited dimension (@var{unlimdimid}).
 If no unlimited dimension is declared -1 is returned. For NetCDF4 files, one should use
 the function netcdf.inqUnlimDims as multiple unlimite dimension exists.
@end deftypefn
@c Low-level functions netcdf.inqAtt
@c -----------------------------------------
@subsection netcdf.inqAtt
@cindex inqAtt
@deftypefn {} {[@var{xtype},@var{len}] = } netcdf.inqAtt(@var{ncid},@var{varid},@var{name})
 Get attribute type and length.
@xseealso{netcdf.inqAttName}
@end deftypefn
@c Low-level functions netcdf.inqAttID
@c -----------------------------------------
@subsection netcdf.inqAttID
@cindex inqAttID
@deftypefn {} {@var{attnum} =} netcdf.inqAttID(@var{ncid},@var{varid},@var{attname})
 Return the attribute id @var{attnum} of the attribute named @var{attname} of the variable @var{varid} in the dataset @var{ncid}.
 For global attributes @var{varid} can be
 netcdf.getConstant("global").
@xseealso{netcdf.inqAttName}
@end deftypefn
@c Low-level functions netcdf.inqAttName
@c -----------------------------------------
@subsection netcdf.inqAttName
@cindex inqAttName
@deftypefn {} {@var{name} =} netcdf.inqAttName (@var{ncid},@var{varid},@var{attnum})
 Get the name of a NetCDF attribute.
 This function returns the name of the attribute with the id @var{attnum} of the variable
@var{varid} in the NetCDF file @var{ncid}. For global attributes @var{varid} can be
 netcdf.getConstant("global").
@xseealso{netcdf.inqAttName}
@end deftypefn
@c Low-level functions netcdf.inqDim
@c -----------------------------------------
@subsection netcdf.inqDim
@cindex inqDim
@deftypefn {} {[@var{name},@var{length}] =} netcdf.inqDim(@var{ncid},@var{dimid})
 Returns the name and length of a NetCDF dimension.
@xseealso{netcdf.inqDimID}
@end deftypefn
@c Low-level functions netcdf.inqDimID
@c -----------------------------------------
@subsection netcdf.inqDimID
@cindex inqDimID
@deftypefn {} {@var{dimid} =} netcdf.inqDimID(@var{ncid},@var{dimname})
 Return the id of a NetCDF dimension.
@xseealso{netcdf.inqDim}
@end deftypefn
@c Low-level functions netcdf.inqDimIDs
@c -----------------------------------------
@subsection netcdf.inqDimIDs
@cindex inqDimIDs
@deftypefn {} {@var{dimids} =} netcdf.inqDimID(@var{ncid})
@deftypefnx {} {@var{dimids} =} netcdf.inqDimID(@var{ncid},@var{include_parents})
 Return the dimension ids defined in a NetCDF file.
 If @var{include_parents} is 1, the dimension ids of the parent group are also returned.
 Per default this is not the case (@var{include_parents} is 0).
@xseealso{netcdf.inqDim}
@end deftypefn
@c Low-level functions netcdf.inqFormat
@c -----------------------------------------
@subsection netcdf.inqFormat
@cindex inqFormat
@deftypefn {} {@var{format} =} netcdf.inqFormat(@var{ncid})
 Return the NetCDF format of the dataset @var{ncid}.
 Format might be one of the following
 "FORMAT_CLASSIC", "FORMAT_64BIT", "FORMAT_NETCDF4" or "FORMAT_NETCDF4_CLASSIC"
@end deftypefn
@c Low-level functions netcdf.inqGrpFullNcid
@c -----------------------------------------
@subsection netcdf.inqGrpFullNcid
@cindex inqGrpFullNcid
@deftypefn {} {@var{grp_ncid} =} netcdf.inqGrpFullNcid(@var{ncid},@var{name})
 Return the group id based on the full group name.
@xseealso{netcdf.inqGrpName}
@end deftypefn
@c Low-level functions netcdf.inqGrpName
@c -----------------------------------------
@subsection netcdf.inqGrpName
@cindex inqGrpName
@deftypefn {} {@var{name} =} netcdf.inqGrpName(@var{ncid})
 Return group name in a NetCDF file.
@xseealso{netcdf.inqGrps}
@end deftypefn
@c Low-level functions netcdf.inqGrpNameFull
@c -----------------------------------------
@subsection netcdf.inqGrpNameFull
@cindex inqGrpNameFull
@deftypefn {} {@var{name} =} netcdf.inqGrpNameFull(@var{ncid})
 Return full name of group in NetCDF file.
@xseealso{netcdf.inqGrpName}
@end deftypefn
@c Low-level functions netcdf.inqGrpParent
@c -----------------------------------------
@subsection netcdf.inqGrpParent
@cindex inqGrpParent
@deftypefn {} {@var{parent_ncid} =} netcdf.inqGrpParent(@var{ncid})
 Return id of the parent group
@xseealso{netcdf.inqGrpName}
@end deftypefn
@c Low-level functions netcdf.inqGrps
@c -----------------------------------------
@subsection netcdf.inqGrps
@cindex inqGrps
@deftypefn {} {@var{ncids} =} netcdf.inqGrps(@var{ncid})
 Return all groups ids in a NetCDF file.
@xseealso{netcdf.inqGrps}
@end deftypefn
@c Low-level functions netcdf.inqLibVers
@c -----------------------------------------
@subsection netcdf.inqLibVers
@cindex inqLibVers
@deftypefn {} {@var{vers} =} netcdf.inqLibVers()
 Returns the version of the NetCDF library.
@end deftypefn
@c Low-level functions netcdf.inqNcid
@c -----------------------------------------
@subsection netcdf.inqNcid
@cindex inqNcid
@deftypefn {} {@var{grp_ncid} =} netcdf.inqNcid(@var{ncid},@var{name})
 Return group id based on its name
@xseealso{netcdf.inqGrpFullNcid}
@end deftypefn
@c Low-level functions netcdf.inqUnlimDims
@c -----------------------------------------
@subsection netcdf.inqUnlimDims
@cindex inqUnlimDims
@deftypefn {} {@var{unlimdimids} =} netcdf.inqUnlimDims(@var{ncid})
 Return the id of all unlimited dimensions of the NetCDF file @var{ncid}.
@end deftypefn
@c Low-level functions netcdf.inqUserType
@c -----------------------------------------
@subsection netcdf.inqUserType
@cindex inqUserType
@deftypefn {} {[@var{typename}, @var{bytesize}, @var{basetypeid}, @var{numfields}, @var{classid}] = } netcdf.inqUserType(@var{ncid},@var{typeid})
 Provide information on a user defined type @var{typeid} in the dataset @var{ncid}.

 The function returns the typename, bytesize, base type id, number of fields and class identifier of the type.

@end deftypefn
@c Low-level functions netcdf.inqVar
@c -----------------------------------------
@subsection netcdf.inqVar
@cindex inqVar
@deftypefn {} {[@var{name},@var{nctype},@var{dimids},@var{nattr}] = } netcdf.inqVar (@var{ncid},@var{varid})
 Inquires information about a NetCDF variable.
 This functions returns the @var{name}, the NetCDF type @var{nctype}, an array of dimension ids
@var{dimids} and the number of attributes @var{nattr} of the NetCDF variable. @var{nctype} in an
 integer corresponding NetCDF constants.
@xseealso{netcdf.inqVarID,netcdf.getConstant}
@end deftypefn
@c Low-level functions netcdf.inqVarChunking
@c -----------------------------------------
@subsection netcdf.inqVarChunking
@cindex inqVarChunking
@deftypefn {} {[@var{storage},@var{chunkSizes}] = } netcdf.inqVarChunking (@var{ncid},@var{varid})
 Determines the chunking settings of NetCDF variable @var{varid}.
 If @var{storage} is the string "chunked", the variable is stored by chunk of the size @var{chunkSizes}.
 If @var{storage} is the string "contiguous", the variable is stored in a contiguous way.
@end deftypefn
@c Low-level functions netcdf.inqVarDeflate
@c -----------------------------------------
@subsection netcdf.inqVarDeflate
@cindex inqVarDeflate
@deftypefn {} {[@var{shuffle},@var{deflate},@var{deflate_level}] = } netcdf.inqVarDeflate (@var{ncid},@var{varid})
 Determines the compression settings NetCDF variable @var{varid}.
 If @var{deflate} is true, then the variable is compressed. The compression level @var{deflate_level} is an integer between 0 (no compression) and 9 (maximum compression).
@end deftypefn
@c Low-level functions netcdf.inqVarFill
@c -----------------------------------------
@subsection netcdf.inqVarFill
@cindex inqVarFill
@deftypefn {} {[@var{no_fill},@var{fillvalue}] = } netcdf.inqVarFill(@var{ncid},@var{varid})
 Determines the fill-value settings of the NetCDF variable @var{varid}.
 If @var{no_fill} is false, then the values between no-contiguous writes are filled with the value @var{fill_value}. This is disabled by setting @var{no_fill} to true.
@end deftypefn
@c Low-level functions netcdf.inqVarFletcher32
@c -----------------------------------------
@subsection netcdf.inqVarFletcher32
@cindex inqVarFletcher32
@deftypefn {} {@var{checksum} =} netcdf.inqVarFletcher32(@var{ncid},@var{varid})
 Determines the checksum settings of the variable with the id @var{varid} in the data set @var{ncid}. If fletcher32 checksums is turned on for this variable, then @var{checksum} is the string "FLETCHER32". Otherwise it is the string "NOCHECKSUM".
@end deftypefn
@c Low-level functions netcdf.inqVarID
@c -----------------------------------------
@subsection netcdf.inqVarID
@cindex inqVarID
@deftypefn {} {@var{varid} = } netcdf.inqVarID (@var{ncid},@var{name})
 Return the id of a variable based on its name.
@xseealso{netcdf.defVar,netcdf.inqVarIDs}
@end deftypefn
@c Low-level functions netcdf.inqVarIDs
@c -----------------------------------------
@subsection netcdf.inqVarIDs
@cindex inqVarIDs
@deftypefn {} {@var{varids} = } netcdf.inqVarID (@var{ncid})
 Return all variable ids.
 This functions returns all variable ids in a NetCDF file or NetCDF group.
@xseealso{netcdf.inqVarID}
@end deftypefn
@c Low-level functions netcdf.inqVlen
@c -----------------------------------------
@subsection netcdf.inqVlen
@cindex inqVlen
@deftypefn {} {[@var{typename}, @var{bytesize}, @var{basetypeid}] = } netcdf.inqVlen(@var{ncid},@var{typeid})
 Provide information on a NC_VLEN variable length array type @var{typeid} in the dataset @var{ncid}.

 The function returns the typename, bytesize, and base type id.

@end deftypefn
@c Low-level functions netcdf.open
@c -----------------------------------------
@subsection netcdf.open
@cindex open
@deftypefn {} {@var{ncid} =} netcdf.open(@var{filename},@var{mode})
 Opens the file named @var{filename} in the mode @var{mode}.
@end deftypefn
@c Low-level functions netcdf.putAtt
@c -----------------------------------------
@subsection netcdf.putAtt
@cindex putAtt
@deftypefn {} {} netcdf.putAtt (@var{ncid},@var{varid},@var{name},@var{data})
 Defines a NetCDF attribute.
 This function defines the attribute called @var{name} of the variable
@var{varid} in the NetCDF file @var{ncid}. The value of the attribute will be @var{data}.
 For global attributes @var{varid} can be
 netcdf.getConstant("global").
@xseealso{netcdf.getAtt}
@end deftypefn
@c Low-level functions netcdf.putVar
@c -----------------------------------------
@subsection netcdf.putVar
@cindex putVar
@deftypefn {} {} netcdf.putVar (@var{ncid},@var{varid},@var{data})
@deftypefnx {} {} netcdf.putVar (@var{ncid},@var{varid},@var{start},@var{data})
@deftypefnx {} {} netcdf.putVar (@var{ncid},@var{varid},@var{start},@var{count},@var{data})
@deftypefnx {} {} netcdf.putVar (@var{ncid},@var{varid},@var{start},@var{count},@var{stride},@var{data})
 Put data in a NetCDF variable.
 The data @var{data} is stored in the variable @var{varid} of the NetCDF file @var{ncid}.
@var{start} is the start index of each dimension (0-based and defaults to a vector of zeros),
@var{count} is the number of elements of to be written along each dimension (default all elements)
 and @var{stride} is the sampling interval.
@end deftypefn
@c Low-level functions netcdf.reDef
@c -----------------------------------------
@subsection netcdf.reDef
@cindex reDef
@deftypefn {} {} netcdf.reDef (@var{ncid})
 Enter define-mode of NetCDF file @var{ncid}.
@end deftypefn
@c Low-level functions netcdf.renameAtt
@c -----------------------------------------
@subsection netcdf.renameAtt
@cindex renameAtt
@deftypefn {} {} netcdf.renameAtt(@var{ncid},@var{varid},@var{old_name},@var{new_name})
 Renames the attribute named @var{old_name} of the variable @var{varid} in the data set @var{ncid}. @var{new_name} is the new name of the attribute.
 To rename a global attribute use netcdf.getConstant("global") for @var{varid}.
@xseealso{netcdf.copyAtt,netcdf.getConstant}
@end deftypefn
@c Low-level functions netcdf.renameDim
@c -----------------------------------------
@subsection netcdf.renameDim
@cindex renameDim
@deftypefn {} {} netcdf.renameDim(@var{ncid},@var{dimid},@var{name})
 Renames the dimension with the id @var{dimid} in the data set @var{ncid}. @var{name} is the new name of the dimension.
@end deftypefn
@c Low-level functions netcdf.renameVar
@c -----------------------------------------
@subsection netcdf.renameVar
@cindex renameVar
@deftypefn {} {} netcdf.renameVar(@var{ncid},@var{varid},@var{name})
 Renames the variable with the id @var{varid} in the data set @var{ncid}. @var{name} is the new name of the variable.
@end deftypefn
@c Low-level functions netcdf.setChunkCache
@c -----------------------------------------
@subsection netcdf.setChunkCache
@cindex setChunkCache
@deftypefn {} {} netcdf.setChunkCache(@var{size}, @var{nelems}, @var{preemption})
 Sets the default chunk cache settings in the HDF5 library. The settings applies to all files which are subsequently opened or created.
@end deftypefn
@c Low-level functions netcdf.setDefaultFormat
@c -----------------------------------------
@subsection netcdf.setDefaultFormat
@cindex setDefaultFormat
@deftypefn {} {@var{old_format} =} netcdf.setDefaultFormat(@var{format})
 Sets the default format of the NetCDF library and returns the previous default format (as a numeric value). @var{format} can be
 "format_classic", "format_64bit", "format_netcdf4" or "format_netcdf4_classic".
@end deftypefn
@c Low-level functions netcdf.setFill
@c -----------------------------------------
@subsection netcdf.setFill
@cindex setFill
@deftypefn {} {@var{old_mode} =} netcdf.setFill(@var{ncid},@var{fillmode})
 Change the fill mode (@var{fillmode}) of the data set @var{ncid}. The previous value of the fill mode is returned. @var{fillmode} can be either "fill" or "nofill".
@end deftypefn
@c Low-level functions netcdf.sync
@c -----------------------------------------
@subsection netcdf.sync
@cindex sync
@deftypefn {} {} netcdf.sync(@var{ncid})
 Writes all changes to the disk and leaves the file open.
@end deftypefn
@c ---------------------------------------------------
@node Import functions (Deprecated)
@section Import functions (Deprecated)
@cindex Import functions (Deprecated)
@c Import functions (Deprecated) import_netcdf
@c -----------------------------------------
@subsection import_netcdf
@cindex import_netcdf
@deftypefn {} {} import_fits
 Dummy function provided to provide compatibility with older versions of GNU Octave netcdf

 Function is deprecated.
@end deftypefn
@c ---------------------------------------------------
@node Test function
@section Test function
@cindex Test function
@c Test function test_netcdf
@c -----------------------------------------
@subsection test_netcdf
@cindex test_netcdf
@deftypefn {} {} test_netcdf
 Function to do a basic test of the netcdf interface
@end deftypefn
