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 df7cdea
Showing 1 changed file with 3 additions and 2 deletions.
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 df7cdea

Please sign in to comment.