Skip to content

Commit

Permalink
Update dependencies (#103)
Browse files Browse the repository at this point in the history
* bump deps

* fix tests

* test clarify
  • Loading branch information
Datseris authored Aug 9, 2023
1 parent 5669b3e commit 31b4ab5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions 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.16.3"
version = "0.16.4"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand All @@ -15,8 +15,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
DimensionalData = "0.20.1, 0.21, 0.22, 0.23"
Interpolations = "0.13.2"
DimensionalData = "0.20.1, 0.21, 0.22, 0.23, 0.24"
Interpolations = "0.13.2, 0.14"
NCDatasets = "0.11, 0.12"
Requires = "1"
SignalDecomposition = "1"
Expand Down
8 changes: 2 additions & 6 deletions test/advanced_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
my_dim = Dim{:My_Dim}
E = ClimArray([1.0:1.0:10.0 2.0:1.0:11.0 3.0:2.0:21.0], (my_dim(1:10), Ti(1:3)))
pressure = ClimArray([1000.0:-100.0:100.0 1000.0:-100.0:100.0 1000.0:-100.0:100.0] *100.0, (my_dim(1:10), Ti(1:3)))
E_pre = interpolation2pressure(E, pressure, pressure_levels; vertical_coord=my_dim, extrapolation_bc=NaN )
E_pre2 = interpolation2pressure(reverse(E,dims=my_dim), reverse(pressure,dims=my_dim), pressure_levels; vertical_coord=my_dim, extrapolation_bc=NaN, descending = false )
E_pre = interpolation2pressure(E, pressure, pressure_levels; vertical_dim=my_dim, extrapolation_bc=NaN )
E_pre2 = interpolation2pressure(reverse(E,dims=my_dim), reverse(pressure,dims=my_dim), pressure_levels; vertical_dim=my_dim, extrapolation_bc=NaN, descending = false )

@test hasdim(D_pre,Pre())
@test gnv(dims(D_back,Hei)) == gnv(dims(D,Hei)) && gnv(dims(D_back,Ti)) == gnv(dims(D,Ti))
Expand All @@ -18,10 +18,6 @@
@test D[Hei(1)] < D_pre[Pre(3)] < D[Hei(11)]
end

@testset "quantile space" begin

end

@testset "value space" begin
t = 0:0.01:5π
x = cos.(t)
Expand Down
6 changes: 4 additions & 2 deletions test/io_tests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ClimateBase, Test

@testset "NetCDF IO" begin

@testset "vector2range" begin
Expand Down Expand Up @@ -57,7 +59,7 @@ end
@test all(isequal(-99.9), B.data[midx])
mmean = mean(skipmissing(M2.data))
bmean = mean(B, StatsBase.weights(W))
@test bmean == mmean
@test bmean mmean # for some reason here we lose accuracy: 0.4992455417474702 vs 0.49924554174747
# test `missing_weights` application to zonal mean
C = B[3:end, :]
z1 = zonalmean(C)
Expand All @@ -67,7 +69,7 @@ end
end

@testset "CFTime dates" begin
using NCDatasets.CFTime: DateTime360Day
using ClimateBase.NCDatasets.CFTime: DateTime360Day
cfdates = collect(DateTime360Day(1900,01,01):Day(1):DateTime360Day(1919,12,30))
x = float.(month.(cfdates))
X = ClimArray(x, (Tim(cfdates),); name = "x")
Expand Down

0 comments on commit 31b4ab5

Please sign in to comment.