diff --git a/src/DataWrangling/ecco_metadata.jl b/src/DataWrangling/ecco_metadata.jl index ceb1d30c..484e8f18 100644 --- a/src/DataWrangling/ecco_metadata.jl +++ b/src/DataWrangling/ecco_metadata.jl @@ -164,6 +164,8 @@ function download_dataset!(metadata::ECCOMetadata; fileurl = joinpath(url, shortname, year, filename) end + # Here add a method to download the file on windows where we can specify a password and a username + cmd = `wget --http-user=$(username) --http-passwd=$(password) $(fileurl)` run(cmd) diff --git a/test/test_downloading.jl b/test/test_downloading.jl index 7bc53331..21680dd3 100644 --- a/test/test_downloading.jl +++ b/test/test_downloading.jl @@ -6,3 +6,11 @@ include("runtests_setup.jl") fts = ClimaOcean.JRA55.JRA55_field_time_series(name; time_indices=2:3) end end + +@testset "Availability of ECCO data" begin + @info "Testing that we can download ECCO data..." + for variable in (:temperature, :salinity, :u_velocity, :v_velocity, :sea_ice_thickness, :sea_ice_area_fraction) + metadata = ECCOMetadata(variable) + ECCO.download_dataset!(metadata) + end +end