Skip to content

Commit f71c784

Browse files
committed
feat: promote_cdf_attributes!
1 parent ddc9290 commit f71c784

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/utils.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,16 @@ function pyconvert_time(time)
1717
t0 = convert_time(DateTime, pyt0)
1818
dt_f = PyArray((time - pyt0) / pyns; copy=false)
1919
return t0 .+ dt_f .* dt_min
20+
end
21+
22+
"""
23+
promote_cdf_attributes!(meta)
24+
25+
Promotes the nested CDF variable attributes to the top level of the metadata.
26+
"""
27+
function promote_cdf_attributes!(meta)
28+
cdf_attrs = meta["CDF"]["VATT"]
29+
for (k, v) in cdf_attrs
30+
meta[k] = v
31+
end
2032
end

0 commit comments

Comments
 (0)