Skip to content

Commit

Permalink
Update runtests.jl: lon instead of Dim{:lon}
Browse files Browse the repository at this point in the history
  • Loading branch information
danlooo authored Jan 16, 2025
1 parent 3df38a4 commit 81d4a8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ raster_bool = DimArray(data_bool, (lon_range, lat_range))
# reformat lon axes from [0,360] to [-180,180]
# skip mask
geo_ds = open_dataset("sresa1b_ncar_ccsm3-example.nc")
geo_ds.axes[:lon] = vcat(range(0, 180; length=128), range(-180, 0; length=128)) |> Dim{:lon}
geo_ds.axes[:lon] = vcat(range(0, 180; length=128), range(-180, 0; length=128)) |> lon
arrs = Dict()
for (k, arr) in geo_ds.cubes
axs = Tuple(ax isa Dim{:lon} ? geo_ds.axes[:lon] : ax for ax in arr.axes) # propagate fixed axis
axs = Tuple(ax isa lon ? geo_ds.axes[:lon] : ax for ax in arr.axes) # propagate fixed axis
arrs[k] = YAXArray(axs, arr.data, arr.properties)
end
geo_ds = Dataset(; properties=geo_ds.properties, arrs...)
Expand Down Expand Up @@ -231,4 +231,4 @@ a[Q2DI(3, 10, 10), Ti=1] = 5
Threads.nthreads() > 1 || @warn "Test script must be started with multiple threads to test thread-safety"
ar = open_dataset("disks.dggs.nc").disks
a = DGGSArray(ar)
p = to_dggs_pyramid(a)
p = to_dggs_pyramid(a)

0 comments on commit 81d4a8e

Please sign in to comment.