Skip to content

Commit

Permalink
qiuick fix of hemispheric means
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Nov 20, 2020
1 parent 0186374 commit a31ccc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimateBase"
uuid = "35604d93-0fb8-4872-9436-495b01d137e2"
authors = ["Datseris <[email protected]>", "Philippe Roy <[email protected]>"]
version = "0.9.1"
version = "0.9.2"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
4 changes: 2 additions & 2 deletions src/physical_dimensions/spatial_equalarea.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ function hemispheric_functions(::EqArea, A)
end

function hemispheric_means(::EqArea, A::AbDimArray)
shi, nhi = hemisphere_indices(c)
shi, nhi = hemisphere_indices(A)
nh = dropagg(mean, A[Coord(nhi)], Coord)
sh = dropagg(mean, A[Coord(shi)], Coord)
return nh, sh
end

function hemisphere_indices(c)
idxs, lats = uniquelats(c)
i = findfirst(l l > 0, lats)
i = findfirst(x -> x > 0, lats)
shi = idxs[1][1]:idxs[i][end]
nhi = idxs[i+1][1]:idxs[end][end]
return nhi, shi
Expand Down

0 comments on commit a31ccc3

Please sign in to comment.