API

Index

Docstrings

NCTiles.BinDataType
BinData

Data structure containing a string or an array of strings (NetCDF file names) as well as metadata needed to read a file.

struct BinData
    fnames::Union{Array{String},String}
    precision::Type
    iosize::Tuple
    fldidx::Int
end
source
NCTiles.BinDataMethod
BinData(fnames::Union{Array{String},String},precision::Type,iosize::Tuple)

Construct a BinData struct for files that contain one field.

source
NCTiles.NCDataType
NCData

Data structure containing a string or an array of strings (file names) of NetCDF files as well as information needed to read a file.

struct NCData
    fname::AbstractString
    varname::AbstractString
    backend::Module
    precision::Type
end
source
NCTiles.NCTType
NCT

Data structure containing information needed to write a NetCDF file.

source
NCTiles.NCvarType
NCvar

Data structure containing information needed to write a variable to NetCDF files.

Instead of loading the data into memory, one can provide a list of input file names (see Bindata).

Attributes (atts) : 1. string attributes will be writen to netcdf files; 2. a function attribute called "readdata"NCTiles.readata will be used instead of the NCTiles.readata default.

struct NCvar
    name::String
    units::String
    dims
    values
    atts::Union{Dict,Nothing}
    backend::Module
end
source
NCTiles.TileDataType
TileData{T}

Data structure containing either a MeshArray struct or BinData struct (see vals), MeshArray structs describing the tile layout (tileinfo), and other information for reading/writing tile data.

struct TileData{T}
    vals::T
    tileinfo::Dict
    tilesize::Tuple
    precision::Type
    numtiles::Int
end
source
NCTiles.TileDataMethod
TileData(vals,tilesize::Tuple)

Construct a TileData struct. First generate the tileinfo, precision, and numtiles attributes.

source
Base.writeMethod
write(myflds::Dict,savename::String;README="",globalattribs=Dict())

Creates NetCDF file and writes myflds and all their dimensions to the file.

source
Base.writeMethod
write(myfld::NCvar,savename::String;README="",globalattribs=Dict())

Creates NetCDF file and writes myfld and all its dimensions to the file.

source
NCTiles.addDataMethod
addData(v::Union{NCDatasets.CFVariable,NetCDF.NcVar},var::NCvar)

Fill variable with data in netcdf file using either NCDatasets.jl or NetCDF.jl

source
NCTiles.addDimMethod
addDim(ds::NCDatasets.Dataset,dimvar::NCvar) # NCDatasets

Add a dimension to a NCDatasets.Dataset

source
NCTiles.addDimMethod
addDim(dimvar::NCvar)

Add a dimension to a NetCDF file using NetCDF.jl

source
NCTiles.addDimDataMethod
addDimData(v::Union{NCDatasets.CFVariable,NetCDF.NcVar,Array},var::NCvar)

Add dimension data to predefined dimensions in a NetCDF file.

source
NCTiles.addVarMethod
addVar(ds::NCDatasets.Dataset,field::NCvar)

Add a variable to a NetCDF file using NCDatasets.jl

source
NCTiles.addVarMethod
addVar(field::NCvar,dimlist::Array{NetCDF.NcDim})

Add a variable with dimensions dimlist to a NetCDF file using NetCDF.jl

source
NCTiles.addVarMethod
addVar(field::NCvar})

Add a variable and its dimensions to a NetCDF file using NetCDF.jl

source
NCTiles.createfileFunction
createfile(filename, field::Union{NCvar,Dict{String,NCvar}}, README;
            fillval=NaN, missval=NaN, itile=1, ntile=1)

Create NetCDF file and add variable + dimension definitions using either NCDatasets.jl or NetCDF.jl

source
NCTiles.readbinFunction
readbin(fname::String,prec::Type,iosize::Tuple,fldidx=1)

Read in a binary file to an Array.

source
NCTiles.readbinFunction
readbin(flddata::BinData,tidx=1)

Read in a binary file as an array as specified by BinData

source
NCTiles.readncfileFunction
readncfile(fname,backend::Module=NCDatasets)

Read in a NetCDF file and return variables/dimensions as NCvar structs, and file attributes as Dict. Large variables/dimensions are not loaded into memory. This can use either NCDatasets.jl or NetCDF.jl

source