Skip to content

Commit

Permalink
better trimming of data ini init()
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Jan 28, 2025
1 parent e973f29 commit a275c15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ddinit/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ function init!(
end
end

# trim any data before the first equilibrium since things are really not robust against that
# trim core_profiles data before the first equilibrium since things are really not robust against that
# also trim other IDSs not to go past equilibrium.time[end]
if dd.equilibrium.time[1] != dd.equilibrium.time[end]
IMAS.trim_time!(dd, (dd.equilibrium.time[1], dd.equilibrium.time[end]));
IMAS.trim_time!(dd, (-Inf, dd.equilibrium.time[end]));
IMAS.trim_time!(dd.core_profiles, (dd.equilibrium.time[1], dd.equilibrium.time[end]));
end

return dd
Expand Down

0 comments on commit a275c15

Please sign in to comment.