Skip to content

Commit

Permalink
Fix docs index typo
Browse files Browse the repository at this point in the history
using ts throughout instead of a mix of ts and ta.
fix a typo to evaluate OutputVars on arbitrary points.
  • Loading branch information
AlexisRenchon committed Oct 25, 2024
1 parent 45754cf commit 8d1dbbf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ Variables:
```
Now, you can access any given variable
``` julia
ta_max = get(simdir; short_name = "ta", reduction = "max", period = "3.0h")
ts_max = get(simdir; short_name = "ts", reduction = "max", period = "3.0h")
```

`ta_max` is a ` OutputVar`, a type that contains the variable as well as some
`ts_max` is a ` OutputVar`, a type that contains the variable as well as some
metadata. When there is only one combination `short_name/reduction/period`, the
function `get` can be used with `get(simdir, short_name)` (e.g., `get(simdir,
"orog")` in the previous example).
Expand Down Expand Up @@ -156,7 +156,7 @@ times(ts_max_lat_averaged_sliced) =
`OutputVar`s can be evaluated on arbitrary points. For instance
``` julia-repl
julia> ts_max(12000., 23., 45., 1200.)
julia> ts_max([12000., 23., 45., 1200.])
```
will return the value of the maximum temperature at time 12000, longitude 23,
latitude 45, and altitude 1200. This can be used to interpolate `OutputVar`s
Expand All @@ -179,7 +179,7 @@ If [`Makie`](https://docs.makie.org/stable/) is available, `ClimaAnalysis` can
be used for plotting. Importing `Makie` and `ClimaAnalysis` in the same session
automatically loads the necessary `ClimaAnalysis` plotting modules.
If we want to make a heatmap for `ta_max` at time of 100 s at altitude `z` of 30000 meters:
If we want to make a heatmap for `ts_max` at time of 100 s at altitude `z` of 30000 meters:
``` julia
import CairoMakie
Expand All @@ -189,12 +189,12 @@ fig = CairoMakie.Figure(size = (400, 600))

viz.plot!(
fig,
ta_max,
ts_max,
time = 100.0,
z = 30_000.0
)

CairoMakie.save("ta_max.png", fig)
CairoMakie.save("ts_max.png", fig)
```
If we want to have a line plot, we can simply add another argument (e.g., `lat =
Expand All @@ -210,7 +210,7 @@ do the following:
``` julia
viz.plot!(
fig,
ta_max,
ts_max,
time = 100.0,
z = 30_000.0,
more_kwargs = Dict(
Expand All @@ -228,7 +228,7 @@ that, the above example becomes
import ClimaAnalysis.Utils : kwargs as ca_kwargs
viz.plot!(
fig,
ta_max,
ts_max,
time = 100.0,
z = 30_000.0,
more_kwargs = Dict(
Expand All @@ -251,7 +251,7 @@ layout = fig[1, 2] = GridLayout()

viz.plot!(
layout,
ta_max,
ts_max,
time = 100.0,
z = 30_000.0,
more_kwargs = Dict(
Expand Down

0 comments on commit 8d1dbbf

Please sign in to comment.