Skip to content

Commit

Permalink
Update src/io.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Orso Meneghini <[email protected]>
  • Loading branch information
eldond and orso82 authored Aug 9, 2024
1 parent 7f3d706 commit 3675e7a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -420,22 +420,14 @@ function geqdsk2imas!(
end
tc = CoordinateConventions.transform_cocos(geqdsk_cocos, dd_cocos)

if length(eq.time_slice) == 0
resize!(eq.time_slice, 1)
eq.time_slice[1].time = g.time
end
if ismissing(eq, :time)
eq.time = [g.time]
end

dd = IMASdd.top_dd(eq)
original_global_time = dd.global_time
try
dd.global_time = g.time
resize!(eq.time_slice)
geqdsk2imas!(
g, eq.time_slice[];
wall=wall, geqdsk_cocos=geqdsk_cocos, dd_cocos=dd_cocos, cocos_clockwise_phi=cocos_clockwise_phi,
add_derived=add_derived,
wall, geqdsk_cocos, dd_cocos, cocos_clockwise_phi, add_derived,
)
finally
dd.global_time = original_global_time
Expand Down

0 comments on commit 3675e7a

Please sign in to comment.