Skip to content

Commit

Permalink
more format
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarusA committed Sep 10, 2024
1 parent 81105f6 commit 9f20bda
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/src/UserGuide/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function g(xout, lo, la, t)
end
````

::: tip
::: info

Note the `.` after `f`, this is because we will slice across time, namely, the function is broadcasted along this dimension.

Expand All @@ -131,15 +131,12 @@ Here, we do create `YAXArrays` only with the desired dimensions as

````@ansi mapCube
lon = YAXArray(Dim{:lon}(range(1, 15)))
````

````@ansi mapCube
lat = YAXArray(Dim{:lat}(range(1, 10)))
````

And a time Cube's Axis

````@ansi mapCube
````@example mapCube
tspan = Date("2022-01-01"):Day(1):Date("2022-01-30")
time = YAXArray(Dim{:time}(tspan))
````
Expand All @@ -151,12 +148,13 @@ Let's generate a new `cube` using `mapCube` and saving the output directly into
````@ansi mapCube
gen_cube = mapCube(g, (lon, lat, time);
indims = (InDims(), InDims(), InDims("time")),
outdims = OutDims("time", overwrite=true, path="my_gen_cube.zarr", backend=:zarr, outtype=Float32)
outdims = OutDims("time", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
outtype = Float32)
# max_cache=1e9
)
````

::: warning "time axis is first"
::: info "time axis goes first"

Note that currently the `time` axis in the output cube goes first.

Expand All @@ -174,7 +172,8 @@ but, we can generate a another cube with a different `output order` as follows
````@ansi mapCube
gen_cube = mapCube(g, (lon, lat, time);
indims = (InDims("lon"), InDims(), InDims()),
outdims = OutDims("lon", overwrite=true, path="my_gen_cube.zarr", backend=:zarr, outtype=Float32)
outdims = OutDims("lon", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
outtype = Float32)
# max_cache=1e9
)
````
Expand Down

0 comments on commit 9f20bda

Please sign in to comment.