diff --git a/core/src/parameter.jl b/core/src/parameter.jl index 97bc1cab3..48a58e4a0 100644 --- a/core/src/parameter.jl +++ b/core/src/parameter.jl @@ -266,10 +266,6 @@ for discrete control itp_update::Vector{ParameterUpdate{ScalarInterpolation}} = [] end -abstract type AbstractParameterNode end - -abstract type AbstractDemandNode <: AbstractParameterNode end - """ In-memory storage of saved mean flows for writing to results. @@ -307,6 +303,10 @@ In-memory storage of saved instantaneous storages and levels for writing to resu t::Float64 end +abstract type AbstractParameterNode end + +abstract type AbstractDemandNode <: AbstractParameterNode end + """ Caches of current basin properties """ diff --git a/core/src/write.jl b/core/src/write.jl index 39a706d97..bb3ad0472 100644 --- a/core/src/write.jl +++ b/core/src/write.jl @@ -276,18 +276,9 @@ function concentration_table( ntsteps = length(data.time) - 1 nbasin = length(data.node_id) nsubstance = length(basin.substances) - nrows = ntsteps * nbasin * nsubstance substances = String.(basin.substances) - concentration = zeros(nrows) - - idx_row = 0 - for cvec in saved.flow.saveval - for concentration_ in vec(cvec.concentration) - idx_row += 1 - concentration[idx_row] = concentration_ - end - end + concentration = FlatVector(saved.flow.saveval, :concentration) time = repeat(data.time[begin:(end - 1)]; inner = nbasin * nsubstance) substance = repeat(substances; inner = nbasin, outer = ntsteps)