Main Content

NetCDF-Dateien

Network Common Data Form (NetCDF)

Network Common Data Form (netCDF) ist eine Reihe von Softwarebibliotheken und maschinenunabhängigen Datenformaten, die die Unterstützung von, den Zugriff auf und das Teilen von Array-orientierten wissenschaftlichen Daten unterstützen. Zur Interaktion mit netCDF-Dateien gibt es mehrere Methoden:

  • Die Import Tool-App (in MATLAB® Online™) und die Live-Editor-Aufgabe Datenimport bieten intuitive grafische Benutzeroberflächen zum Betrachten und Auslesen von Daten aus netCFD-Dateien.

  • Die MATLAB High-Level-Funktionen für netCDF bieten eine vereinfachte programmatische Benutzeroberfläche zum Auslesen von Daten aus netCDF-Dateien und Schreiben von Daten aus dem MATLAB Workspace in netCDF-Dateien.

  • Die MATLAB Low-Level-Funktionen für netCDF bieten mehr Kontrolle über den Lese- und Schreibvorgang bei netCDF-Dateien, da sie Zugriff auf mehr als 50 Funktionen der C-Bibliothek von netCDF gewähren.

    Um die MATLAB Low-Level-Funktionen für netCDF zu nutzen, müssen Sie mit den Programmierkonzepten für das C-API von netCDF vertraut sein, die unter https://www.unidata.ucar.edu/software/netcdf/ beschrieben werden.

MATLAB verwendet die netCDF C-Bibliothek Version 4.9.2.

Live Editor Tasks

Importieren von DatenImport data from a file in the Live Editor (Seit R2023a)

Apps

Import ToolImport data from file

Funktionen

alle erweitern

nccreateCreate variable in netCDF file
ncdispDisplay contents of netCDF data source in Command Window
ncinfo Return information about netCDF data source
ncreadRead data from variable in netCDF data source
ncreadattRead attribute from netCDF data source
ncwriteWrite data to netCDF file
ncwriteattWrite attribute to netCDF file
ncwriteschemaAdd netCDF schema definitions to netCDF file

Bibliotheksfunktionen

netcdf.getChunkCacheReturn default chunk cache settings for netCDF library
netcdf.inqLibVersReturn netCDF library version information
netcdf.setChunkCacheSet default chunk cache settings for netCDF library
netcdf.setDefaultFormatChange default netCDF file format

Dateioperationen

netcdf.abortRevert recent netCDF file definitions
netcdf.closeClose netCDF file
netcdf.createCreate new netCDF dataset
netcdf.endDefEnd netCDF file define mode
netcdf.inqReturn information about netCDF file
netcdf.inqFormatDetermine format of netCDF file
netcdf.inqGrpsReturn array of child group IDs
netcdf.inqUnlimDimsReturn IDs of all visible unlimited dimensions in group
netcdf.openOpen netCDF data source
netcdf.reDefPut open netCDF file into define mode
netcdf.setFillSet netCDF fill mode
netcdf.syncSynchronize netCDF file to disk

Dimensionen

netcdf.defDimCreate netCDF dimension
netcdf.inqDimReturn netCDF dimension name and length
netcdf.inqDimIDReturn dimension ID
netcdf.renameDimChange name of netCDF dimension

Gruppen

netcdf.defGrpCreate group in netCDF file
netcdf.inqDimIDsReturn list of dimension identifiers in group
netcdf.inqGrpNameReturn name of group
netcdf.inqGrpNameFullComplete pathname of group
netcdf.inqGrpParentReturn ID of parent group
netcdf.inqNcidReturn ID of group
netcdf.inqVarIDsReturn IDs of all variables in group

Variablen

netcdf.defVarCreate netCDF variable
netcdf.defVarChunkingDefine chunking parameters for netCDF variable
netcdf.defVarDeflateDefine compression parameters for netCDF variable
netcdf.defVarFillDefine fill parameters for netCDF variable
netcdf.defVarFletcher32Define checksum parameters for netCDF variable
netcdf.getVarRead data from netCDF variable
netcdf.inqVarInformation about netCDF variable
netcdf.inqVarChunkingReturn chunking parameters for netCDF variable
netcdf.inqVarDeflateReturn compression parameters for netCDF variable
netcdf.inqVarFillReturn fill parameters for netCDF variable
netcdf.inqVarFletcher32Return checksum parameters for netCDF variable
netcdf.inqVarIDReturn ID associated with variable name
netcdf.putVarWrite data to netCDF variable
netcdf.renameVarChange name of netCDF variable

Attribute

netcdf.copyAttCopy attribute to new location
netcdf.delAttDelete netCDF attribute
netcdf.getAttReturn netCDF attribute
netcdf.inqAttReturn information about netCDF attribute
netcdf.inqAttIDReturn ID of netCDF attribute
netcdf.inqAttNameReturn name of netCDF attribute
netcdf.putAttWrite data to netCDF attribute
netcdf.renameAttChange name of netCDF attribute

Benutzerdefinierte Typen

netcdf.defVlenDefine user-defined variable length array type (NC_VLEN) (Seit R2022a)
netcdf.inqUserTypeReturn information about user-defined type (Seit R2022a)
netcdf.inqVlenReturn information about user-defined NC_VLEN type (Seit R2022a)

Dienstprogramme

netcdf.getConstantReturn numeric value of named constant
netcdf.getConstantNamesReturn list of constants known to netCDF library

Themen

Fehlersuche

Resolve Errors Reading OPeNDAP Data

When you have trouble reading OPeNDAP data, consider these factors.

Verwandte Informationen