Skip to content

Commit

Permalink
Use accessor for ClimaAnalysis units
Browse files Browse the repository at this point in the history
CliMA/ClimaAnalysis.jl#70 is _slightly_ breaking if
units are accessed directly
  • Loading branch information
Sbozzolo committed Aug 29, 2024
1 parent 505d0d4 commit e7ad7c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
[compat]
BlockArrays = "0.16"
CairoMakie = "0.10, 0.11"
ClimaAnalysis = "0.5.1"
ClimaAnalysis = "0.5.7"
ClimaCoreMakie = "0.3, 0.4"
ClimaCorePlots = "0.2"
ClimaCoreSpectra = "0.1"
Expand Down
5 changes: 3 additions & 2 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,11 @@ them on the same axis.
"""
function plot_edmf_vert_profile!(grid_loc, var_group)
z = var_group[1].dims["z"]
units = var_group[1].attributes["units"]
units = ClimaAnalysis.units(var_group[1])
z_units = ClimaAnalysis.dim_units(var_group[1], "z")
ax = CairoMakie.Axis(
grid_loc[1, 1],
ylabel = "z [$(var_group[1].dim_attributes["z"]["units"])]",
ylabel = "z [$z_units]",
xlabel = "$(short_name(var_group[1])) [$units]",
title = parse_var_attributes(var_group[1]),
)
Expand Down

0 comments on commit e7ad7c0

Please sign in to comment.