Skip to content

Commit

Permalink
add the gnv and selectors to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Jan 5, 2022
1 parent 1d88bfb commit 5f3a0d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ where in this averaging process each data point is weighted by the cosine of its
You can create a `ClimArray` yourself, or you can load data from an `.nc` file with CF-conventions, see [NetCDF IO](@ref).
```@docs
ClimArray(::AbstractArray, ::Tuple)
gnv
```
It is strongly recommended to use the dimensions we export (because we dispatch on them and use their information):
```@example
Expand All @@ -72,4 +73,12 @@ DimensionalData
```

## Available selectors
**TODO**
| Selector | Description |
| :---------------------- | :------------------------------------------------------------------ |
| [`At(x)`] | get the index exactly matching the passed in value(s) |
| [`Near(x)`] | get the closest index to the passed in value(s) |
| [`Contains(x)`] | get indices where the value x falls within an interval |
| [`Where(f)`] | filter the array axis by a function of the dimension index values. |
| [`a..b`] | get all indices between two values, inclusively. |
| [`OpenInterval(a, b)`] | get all indices between `a` and `b`, exclusively. |
| [`Interval{A,B}(a, b)`] | get all indices between `a` and `b`, as `:closed` or `:open`. |
3 changes: 2 additions & 1 deletion src/core/coredefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ all basic handling of `ClimArray` is offered by `DimensionalData` (see below).
`ClimArray` is created by passing in standard array data `A` and a
tuple of dimensions `dims`. See [`ncread`](@ref) to automatically create a `ClimArray`
from a .nc file.
from a .nc file. For obtaining the raw numeric values of a `ClimArray` or any of its
dimensions, use the function [`gnv`](@ref).
## Example
```julia
Expand Down

0 comments on commit 5f3a0d2

Please sign in to comment.