From 305b6627118a79b22731b58fcb9f4c8ee0a878d0 Mon Sep 17 00:00:00 2001 From: Datseris Date: Mon, 28 Feb 2022 12:22:18 +0100 Subject: [PATCH] bump version --- Project.toml | 2 +- docs/src/advanced.md | 2 -- test/temporal_tests.jl | 21 ++++++++++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Project.toml b/Project.toml index 6d0e008b..d1a4bb09 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimateBase" uuid = "35604d93-0fb8-4872-9436-495b01d137e2" authors = ["Datseris ", "Philippe Roy "] -version = "0.14.5" +version = "0.15.0" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/docs/src/advanced.md b/docs/src/advanced.md index 968f02cb..7af3c193 100644 --- a/docs/src/advanced.md +++ b/docs/src/advanced.md @@ -22,8 +22,6 @@ interpolate_pressure2height Functions that calculate climate-related quantities. ```@docs insolation -surface_atmosphere_contributions -total_toa_albedo ``` ## Timeseries Analysis diff --git a/test/temporal_tests.jl b/test/temporal_tests.jl index 29fe04ec..1d6b022b 100644 --- a/test/temporal_tests.jl +++ b/test/temporal_tests.jl @@ -1,5 +1,5 @@ # %% Time Tests -@testset "Temporal Tests" begin +@testset "Temporal Tests" begin @testset "Temporal weighting" begin # spatiotemporal weights: @@ -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])))