Main Content

File NetCDF

Modulo dati comune di rete

Modulo dati comune di rete (netCDF) è un insieme di librerie software e formati di dati indipendenti dalla macchina che supportano la creazione, l'accesso e la condivisione di dati scientifici orientati agli array. È possibile interagire con i file netCDF in diversi modi:

  • L'app Import Tool (in MATLAB® Online™) and the Import Data task di Live Editor forniscono interfacce grafiche intuitive per l'esplorazione e la lettura dei dati dai file netCDF.

  • Le funzioni netCDF di alto livello di MATLAB forniscono un'interfaccia programmatica semplificata per la lettura dei dati dai file netCDF e la scrittura dei dati dal workspace di MATLAB ai file netCDF.

  • Le funzioni netCDF di basso livello di MATLAB forniscono un controllo più preciso sul processo di lettura e scrittura dei file netCDF, dando accesso a più di 50 funzioni della libreria C di netCDF.

    Per utilizzare le funzioni netCDF di basso livello di MATLAB, è necessario conoscere i concetti di programmazione dell'API C di netCDF, descritti in https://www.unidata.ucar.edu/software/netcdf/.

MATLAB utilizza la versione della libreria C di netCDF 4.9.2.

Attività di Live Editor

Importazione dei datiImport data from a file in the Live Editor (Da R2023a)

App

Import ToolImport data from file

Funzioni

espandi tutto

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

Funzioni della libreria

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

Operazioni sui file

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

Dimensioni

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

Gruppi

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

Variabili

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

Attributi

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

Tipi definiti dall’utente

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

Utilità

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

Argomenti

Risoluzione dei problemi

Resolve Errors Reading OPeNDAP Data

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

Informazioni complementari