diff --git a/src/ECCOtour.jl b/src/ECCOtour.jl index 20e94d7..378e704 100644 --- a/src/ECCOtour.jl +++ b/src/ECCOtour.jl @@ -7,8 +7,10 @@ using Statistics, Distributions, FFTW, #using PyPlot import Statistics.mean, Statistics.std, - Base.maximum, Base.minimum, Base.replace!, - IsopycnalSurfaces.vars2sigma1, IsopycnalSurfaces.sigma1grid + Base.maximum, Base.minimum, Base.replace!, + Base.write, + IsopycnalSurfaces.vars2sigma1, + IsopycnalSurfaces.sigma1grid export hanncoeffs, hannsum, hannsum!, hannfilter export get_filtermatrix, matrixfilter, matrixspray, columnscale! @@ -1438,9 +1440,16 @@ function landmask(γ;level=1) end """ -function writeregularpoles(vars,γ,pathout,filesuffix,filelog,λC,lonatts,ϕC,latatts,z,depthatts) +`function write(vars::Dict{String,Array{Float32,3}}, + params::RegularpolesParameters, + γ::MeshArrays.gcmgrid, + pathout, + filesuffix, + filelog, + gridatts)` + + """ -#function writeregularpoles(vars::Dict{String,Array{Float32,3}},γ,pathout,filesuffix,filelog,λC,lonatts,ϕC,latatts,z,depthatts) function write(vars::Dict{String,Array{Float32,3}}, params::RegularpolesParameters, γ::MeshArrays.gcmgrid, diff --git a/test/runtests.jl b/test/runtests.jl index 8d04342..d45a333 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -133,14 +133,14 @@ using Downloads filelog = srcdir("available_diagnostics.log") gridatts = grid_attributes() - @time writeregularpoles(varsregpoles, + @time write(varsregpoles, + rp_params, γ, pathout, filesuffix, filelog, - rp_params, gridatts) - + @test maximum(filter(!isnan,varsregpoles["SALT"])) < 50. @test minimum(filter(!isnan,varsregpoles["SALT"])) > 0.