-
Notifications
You must be signed in to change notification settings - Fork 29
/
NCDatasets.jl
91 lines (78 loc) · 2.64 KB
/
NCDatasets.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
"""
NCDatasets is a module to read and write NetCDF files.
This is minimal example how to read a NetCDF file.
```julia
using NCDatasets
# open the file and show its metadata (if called in the REPL without ending semicolon)
ds = NCDataset("filename.nc","r")
# load all data of the variable temperature
v = ds["temperature"][:,:]
# load the attribute units
unit = v.attrib["units"]
# close the file
close(ds)
```
More information is available at https://github.com/Alexander-Barth/NCDatasets.jl .
"""
module NCDatasets
import Base: Array, close, collect, convert, delete!, display, filter, getindex,
parent, parentindices, setindex!, show, showerror, size, view, cat
using CFTime
using DataStructures: OrderedDict
using Dates
using NetCDF_jll
using NetworkOptions
using Printf
using CommonDataModel
using CommonDataModel: dims, attribs, groups
import CommonDataModel: AbstractDataset, AbstractVariable,
boundsParentVar, initboundsmap!,
fillvalue, fill_and_missing_values,
scale_factor, add_offset, time_origin, time_factor,
CFtransformdata!,
CFVariable, variable, cfvariable, defVar, load!,
path, name, isopen, unlimited, dataset,
groupname, groupnames, group, defGroup, Groups,
dimnames, dim, defDim, Dimensions,
attribnames, attrib, defAttrib, delAttrib, Attributes,
varbyattrib, CFStdName, @CF_str, ancillaryvariables, filter, coord, bounds,
MFDataset, MFCFVariable,
DeferDataset, metadata, Resource,
SubDataset, SubVariable, subsub,
chunking, deflate, checksum, fillmode,
iswritable, sync, CatArrays,
SubDataset,
@select, select, Near, coordinate_value, coordinate_names, split_by_and,
chunking, deflate, checksum,
maskingvalue
import DiskArrays
import DiskArrays: readblock!, writeblock!, eachchunk, haschunks, batchgetindex
function __init__()
NetCDF_jll.is_available() && init_certificate_authority()
end
const default_timeunits = "days since 1900-00-00 00:00:00"
const SymbolOrString = Union{Symbol, AbstractString}
include("types.jl")
include("errorhandling.jl")
include("netcdf_c.jl")
include("dataset.jl")
include("attributes.jl")
include("dimensions.jl")
include("groupes.jl")
include("variable.jl")
include("cfvariable.jl")
include("defer.jl")
include("multifile.jl")
include("ncgen.jl")
include("precompile.jl")
DiskArrays.@implement_diskarray NCDatasets.Variable
export CatArrays
export CFTime
export daysinmonth, daysinyear, yearmonthday, yearmonth, monthday
export dayofyear, firstdayofyear
export DateTimeStandard, DateTimeJulian, DateTimeProlepticGregorian,
DateTimeAllLeap, DateTimeNoLeap, DateTime360Day, AbstractCFDateTime
export coord
export bounds
export @CF_str
end # module