From a275c15273135f62227aca2a8a1afdb1f5071daf Mon Sep 17 00:00:00 2001 From: Orso Meneghini Date: Mon, 27 Jan 2025 17:08:33 -0800 Subject: [PATCH] better trimming of data ini init() --- src/ddinit/init.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ddinit/init.jl b/src/ddinit/init.jl index d2d367f12..58e1e1549 100644 --- a/src/ddinit/init.jl +++ b/src/ddinit/init.jl @@ -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