Skip to content

Commit

Permalink
init trims data before the first equilibrium
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Jan 24, 2025
1 parent b748f08 commit 5c66a1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actors/compound/dynamic_plasma_actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ function _step(actor::ActorDynamicPlasma; n_steps::Int=0)
prog = ProgressMeter.Progress(Nt * step_calls_per_2loop; dt=0.0, showspeed=true, enabled=par.verbose)
old_logging = actor_logging(dd, false)

# remove timeslices after global_time
IMAS.trim_time!(dd, t0; trim_pulse_schedule=false)
# remove time dependent data after global_time
IMAS.trim_time!(dd, (-Inf, t0); trim_pulse_schedule=false)

try
for (kk, tt) in enumerate(range(t0, t1, 2 * Nt + 1)[2:end])
Expand Down
3 changes: 3 additions & 0 deletions src/ddinit/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ function init(
end
end

# trim any data before the first equilibrium since things are really not robust against that
IMAS.trim_time!(dd, (dd.equilibrium.time[1], Inf));

return dd
end
end
Expand Down

0 comments on commit 5c66a1f

Please sign in to comment.