Skip to content

Commit

Permalink
pass write(regpoles) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ggebbie committed Mar 20, 2024
1 parent 091f7f1 commit 934c0d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 deletions src/ECCOtour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 934c0d8

Please sign in to comment.