Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Feb 28, 2022
1 parent da1f34a commit 305b662
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 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.14.5"
version = "0.15.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 0 additions & 2 deletions docs/src/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ interpolate_pressure2height
Functions that calculate climate-related quantities.
```@docs
insolation
surface_atmosphere_contributions
total_toa_albedo
```

## Timeseries Analysis
Expand Down
21 changes: 14 additions & 7 deletions test/temporal_tests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# %% Time Tests
@testset "Temporal Tests" begin
@testset "Temporal Tests" begin

@testset "Temporal weighting" begin
# spatiotemporal weights:
Expand Down Expand Up @@ -54,13 +54,20 @@ end
tm2 = Date(2001, 1, 1):Month(1):Date(2011, 1, 1)
A1 = ClimArray(rand(length(tm1)), (Time(tm1),))
A2 = ClimArray(rand(length(tm2)), (Time(tm2),))
B1, B2 = sametimespan(A1, A2)
@test size(B1) == size(B2)
@test dims(B1, Time)[1] == Date(2001, 1, 15)
@test dims(B1, Time)[end] == Date(2010, 3, 15)
@test dims(B2, Time)[end] == Date(2010, 3, 1)
Bv = sametimespan(A1, A2)
# dict version
d = Dict(:A1 => A1, :A2 => A2)
d2 = sametimespan(d)
Bd = (d[:A1], d[:A2])
for B in (Bv, Bd)
B1, B2 = B
@test size(B1) == size(B2)
@test dims(B1, Time)[1] == Date(2001, 1, 15)
@test dims(B1, Time)[end] == Date(2010, 3, 15)
@test dims(B2, Time)[end] == Date(2010, 3, 1)
end
end

@testset "monthlyagg and co." begin
# test yearly temporal weights (i.e., no weighting)
X = ClimArray(rand(3,3), (Lon(1:3), Time(tyearly[1:3])))
Expand Down

0 comments on commit 305b662

Please sign in to comment.