Skip to content
Snippets Groups Projects
Commit 544246fa authored by Brian Groenke's avatar Brian Groenke
Browse files

Fix bug in output ctor for non-grid variables

parent dc3abae8
No related branches found
No related tags found
1 merge request!89Add simple bulk snow scheme
......@@ -171,7 +171,7 @@ function InputOutput.CryoGridOutput(sol::TSol, tspan::NTuple{2,Float64}=(-Inf,In
# Helper functions for mapping variables to appropriate DimArrays by grid/shape.
withdims(var::Var{name,<:OnGrid{Cells}}, arr, grid, ts) where {name} = DimArray(arr*one(vartype(var))*varunits(var), (Z(round.(typeof(1.0u"m"), cells(grid), digits=5)),Ti(ts)))
withdims(var::Var{name,<:OnGrid{Edges}}, arr, grid, ts) where {name} = DimArray(arr*one(vartype(var))*varunits(var), (Z(round.(typeof(1.0u"m"), edges(grid), digits=5)),Ti(ts)))
withdims(var::Var{name}, arr, zs, ts) where {name} = DimArray(arr*one(vartype(var))*varunits(var), (Ti(ts),))
withdims(var::Var{name}, arr, zs, ts) where {name} = DimArray(arr*one(vartype(var))*varunits(var), (Dim{name}(1:size(arr,1)),Ti(ts)))
save_interval = ClosedInterval(tspan...)
model = sol.prob.f.f # Tile
ts = model.hist.vals.t # use save callback time points
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment