Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/examples/HowdoI/extract_axes_names.jl

This file was deleted.

39 changes: 39 additions & 0 deletions docs/examples/HowdoI/howdoi.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# The purpose of this section is to do a collection of small
# convinient pieces of code on how to do simple things.

# !!! question

# ## extract the axes names from a Cube?

using YAXArrays
c = YAXArray(rand(10,10,5))

caxes(c)

# !!! question

# ## concatenate cubes?

# It is possible to concatenate several cubes that shared the same dimensions using the [`concatenatecubes`]@ref function.

# let's create two dummy cubes

using YAXArrays

axlist = [
RangeAxis("time", range(1, 20, length=20)),
RangeAxis("lon", range(1, 10, length=10)),
RangeAxis("lat", range(1, 5, length=15))]

data1 = rand(20, 10, 15)
ds1 = YAXArray(axlist, data1)

data2 = rand(20, 10, 15)
ds2 = YAXArray(axlist, data2)

# Now we can concatenate ```ds1``` and ```ds2``` cubes:

dsfinal = concatenatecubes([ds1, ds2],
CategoricalAxis("Variables", ["var1", "var2"]))

dsfinal
3 changes: 1 addition & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,5 @@ nav:
- "Simple maps": "examples/generated/Gallery/simplemaps.md"
- "Tutorials":
- "Tutorial": "tutorials/tutorial.md"
- "How do I ...":
- "Extract axes names": "examples/generated/HowdoI/extract_axes_names.md"
- "How do I ...": "examples/generated/HowdoI/howdoi.md"
- "API" : "api.md"