Skip to content

Commit

Permalink
update interpolation of AMR grids using scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrocoast committed Nov 17, 2020
1 parent 4fef961 commit 74611df
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/scipyinterp.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#############################################
"""
eta_uniform = interpsurface(amrgrid::Vector{VisClaw.AMRGrid}, topo::VisClaw.Topo)
eta_uniformgrid = interpsurface(amrgrid::Vector{VisClaw.AMRGrid}, topo::VisClaw.Topo)
eta_uniformgrid = interpsurface(amr::VisClaw.AMR, topo::VisClaw.Topo)
Convert AMR tile data into uniform grid data using the SciPy scattered interpolation.\n
Interpolation of inundation height (land) is not supported. \n
Expand Down Expand Up @@ -51,3 +52,11 @@ function interpsurface(amrgrid::Vector{VisClaw.AMRGrid}, topo::VisClaw.Topo)
return v_all

end
#############################################

#############################################
function interpsurface(amrall::VisClaw.AMR, topo::VisClaw.Topo; timestep=1:amrall.nstep)
eta_uniformgrid = [interpsurface(amrall.amr[k], topo) for k=timestep]
eta_uniformgrid = cat(eta_uniformgrid...; dims=3)
return eta_uniformgrid
end

0 comments on commit 74611df

Please sign in to comment.