Netcdf Toolkit - Functions


The following functions are available:

High-level functions

nccreateCreate the variable VARNAME in the file FILENAME.
ncdispDisplay meta-data of the NetCDF file FILENAME
ncinfoReturn information about an entire NetCDF file FILENAME (i.e. the root group...
ncreadattReturn the attribute ATTNAME of the variable VARNAME in the file FILENAME.
ncreadRead the variable VARNAME from the NetCDF file FILENAME.
ncwriteattDefines the attribute ATTNAME of the variable VARNAME in the file FILENAME wi...
ncwriteWrite array X to the the variable VARNAME in the NetCDF file FILENAME.
ncwriteschemaCreate a NetCDF called FILENAME with the dimensions, attributes, variables an...

Low-level functions

Library Functions

netcdf.setDefaultFormatSets the default format of the NetCDF library and returns the previous defaul...
netcdf.inqLibVersReturns the version of the NetCDF library.
netcdf.setChunkCacheSets the default chunk cache settings in the HDF5 library.
netcdf.getChunkCacheGets the default chunk cache settings in the HDF5 library.

File Operations

netcdf.createCreates the file named FILENAME in the mode MODE which can have the following...
netcdf.openOpens the file named FILENAME in the mode MODE.
netcdf.abortAborts all changes since the last time the dataset entered in define mode.
netcdf.syncWrites all changes to the disk and leaves the file open.
netcdf.endDefLeaves define-mode of NetCDF file NCID.
netcdf.inqReturn the number of dimension (NDIMS), the number of variables (NVARS), the ...
netcdf.inqFormatReturn the NetCDF format of the dataset NCID.
netcdf.inqUnlimDimsReturn the id of all unlimited dimensions of the NetCDF file NCID.
netcdf.inqGrpsReturn all groups ids in a NetCDF file.
netcdf.reDefEnter define-mode of NetCDF file NCID.
netcdf.setFillChange the fill mode (FILLMODE) of the data set NCID.
netcdf.closeClose the NetCDF file with the id NCID.

Dimensions

netcdf.defDimDefine the dimension with the name NAME and the length LEN in the dataset NCID.
netcdf.renameDimRenames the dimension with the id DIMID in the data set NCID.
netcdf.inqDimReturns the name and length of a NetCDF dimension.
netcdf.inqDimIDReturn the id of a NetCDF dimension.

Groups

netcdf.defGrpDefine a group in a NetCDF file.
netcdf.inqGrpNameReturn group name in a NetCDF file.
netcdf.inqGrpNameFullReturn full name of group in NetCDF file.
netcdf.inqGrpParentReturn id of the parent group
netcdf.inqGrpFullNcidReturn the group id based on the full group name.
netcdf.inqNcidReturn group id based on its name
netcdf.inqVarIDsReturn all variable ids.
netcdf.inqDimIDsReturn the dimension ids defined in a NetCDF file.

Variables

netcdf.defVarDefines a variable with the name NAME in the dataset NCID.
netcdf.renameVarRenames the variable with the id VARID in the data set NCID.
netcdf.defVarFillDefine the fill-value settings of the NetCDF variable VARID.
netcdf.inqVarFillDetermines the fill-value settings of the NetCDF variable VARID.
netcdf.defVarDeflateDefine the compression settings NetCDF variable VARID.
netcdf.inqVarDeflateDetermines the compression settings NetCDF variable VARID.
netcdf.defVarChunkingDefine the chunking settings of NetCDF variable VARID.
netcdf.inqVarChunkingDetermines the chunking settings of NetCDF variable VARID.
netcdf.defVarFletcher32Defines the checksum settings of the variable with the id VARID in the data s...
netcdf.inqVarFletcher32Determines the checksum settings of the variable with the id VARID in the dat...
netcdf.putVarPut data in a NetCDF variable.
netcdf.getVarGet the data from a NetCDF variable.
netcdf.inqVarIDReturn the id of a variable based on its name.
netcdf.inqVarInquires information about a NetCDF variable.

Attributes

netcdf.inqAttNameGet the name of a NetCDF attribute.
netcdf.inqAttIDReturn the attribute id ATTNUM of the attribute named ATTNAME of the variable...
netcdf.inqAttGet attribute type and length.
netcdf.getAttGet the value of a NetCDF attribute.
netcdf.putAttDefines a NetCDF attribute.
netcdf.copyAttCopies the attribute named OLD_NAME of the variable VARID in the data set NCI...
netcdf.renameAttRenames the attribute named OLD_NAME of the variable VARID in the data set NC...
netcdf.delAttDeletes the attribute named NAME of the variable VARID in the data set NCID.

User-Defined Types

netcdf.defVlenDefines a NC_VLEN variable length array type with the type name TYPENAME and ...
netcdf.inqUserTypeProvide information on a user defined type TYPEID in the dataset NCID.
netcdf.inqVlenProvide information on a NC_VLEN variable length array type TYPEID in the dat...

Utilities

netcdf.getConstantReturns the value of a NetCDF constant called NAME.
netcdf.getConstantNamesReturns a list of all constant names.

Test function

test_netcdfFunction to do a basic test of the netcdf interface