ncdatasets
There functions were adapted from an old version of NCDatasets.jl
data and def modes
NetcdfIO.NCDataset — Type
mutable struct NCDataset{TDS} <: CommonDataModel.AbstractDatasetStruct for a NetCDF dataset
Fields
parentdataset::Any: Parent dataset (nothing for the root dataset)ncid::Int32: NetCDF dataset idiswritable::Bool: Whether the NetCDF is writableisdefmode::Ref{Bool}: Whether the NetCDF is in define mode (i.e. metadata can be added, but not data)
NetcdfIO.Variable — Type
struct Variable{T, N, TDS<:CommonDataModel.AbstractDataset} <: CommonDataModel.AbstractVariable{T, N}Struct to represent a NetCDF variable
Fields
ds::CommonDataModel.AbstractDataset: Parent NetCDF datasetvarid::Int32: NetCDF variable iddimids::NTuple{N, Int32} where N: NetCDF dimension ids
NetcdfIO.data_mode! — Function
Set data mode for NCDataset
NetcdfIO.def_mode! — Function
Set define mode for NCDataset
CommonDataModel.defVar — Function
defVar(ds::NCDataset,
var_name::UnionNameTypes,
var_type::DataType,
var_attrib::UnionAttrTypes,
dim_names::Vector{String};
deflatelevel::Union{Int,Nothing} = nothing)Create a new variable in the dataset, given
dsA netcdf datasetnameName of the variablevtypeType of the variable, for exampleFloat64,Int32,String, etc.attribVariable attributesdimnamesDimension names in the netcdf filedeflatelevelCompression level fro NetCDF, default isnothing