Skip to content

Commit

Permalink
contextualize write_nse
Browse files Browse the repository at this point in the history
  • Loading branch information
cfe316 committed Dec 8, 2023
1 parent 7444922 commit 981799c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/write_outputs/write_nse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ function write_nse(path::AbstractString, inputs::Dict, setup::Dict, EP::Model)
dfNse = DataFrame(Segment = repeat(1:SEG, outer = Z), Zone = repeat(1:Z, inner = SEG), AnnualSum = zeros(SEG * Z))
nse = zeros(SEG * Z, T)
scale_factor = setup["ParameterScale"] == 1 ? ModelScalingFactor : 1
energy_scale = scale_factor
for z in 1:Z
nse[((z-1)*SEG+1):z*SEG, :] = value.(EP[:vNSE])[:, :, z] * scale_factor
nse[((z-1)*SEG+1):z*SEG, :] = value.(EP[:vNSE])[:, :, z] * energy_scale
end
dfNse.AnnualSum .= nse * inputs["omega"]
dfNse = hcat(dfNse, DataFrame(nse, :auto))
Expand Down

0 comments on commit 981799c

Please sign in to comment.