Skip to content

Commit

Permalink
test WOD
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Mar 28, 2024
1 parent feb38f0 commit 0936ef8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords = ["physical-oceanography", "sea-water", "julia", "density", "fluxes",
license = "LGPL"
desc = "Utility functions for physical oceanography"
author = ["Alexander Barth", "Jean-Marie Beckers", "Charles Troupin", "Aida Alvera Azcarate"]
version = "0.6.9"
version = "0.6.10"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -24,11 +24,5 @@ Glob = "1"
Gumbo = "0.5, 0.7, 0.8"
HTTP = "0.8, 0.9, 1"
Missings = "0.4, 1"
NCDatasets = "0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14"
NCDatasets = "0.13, 0.14"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,6 @@ using Statistics

include("test_cmems.jl")
include("test_argo.jl")
include("test_wod.jl")
include("test_tides.jl")
end
26 changes: 26 additions & 0 deletions test/test_wod.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

using ZipFile
using Downloads: download
using PhysOcean: WorldOceanDatabase
using Test

tmpfname = download("https://dox.uliege.be/index.php/s/QBFPUJvOMGOlOvS/download")
woddir = tempname()
mkdir(woddir)

zarchive = ZipFile.Reader(tmpfname)
for f in zarchive.files
fullpath = joinpath(woddir,f.name)
if (endswith(f.name,"/") || endswith(f.name,"\\"))
mkdir(fullpath)
else
write(fullpath, read(f))
end
end
close(zarchive)


obsvalue,obslon,obslat,obsdepth,obstime,obsid = WorldOceanDatabase.load(
Float64,woddir,"Temperature"; prefixid = "1977-")

@test length(obsvalue) == 7298

0 comments on commit 0936ef8

Please # to comment.