Closed pankin closed 3 years ago
I looked at this with @pankin and didn't see any obvious mistakes.
@pankin the issue is that equilibrium.time_slice.0.profiles_1d.centroid
is not a proper location in the IMAS data dictionary. At this point IMAS does not have a placeholder for the centroid of the equilibrium flux surfaces. This is something that we have added temporarily to propagate that information through ODSs, while we either (1) open a JIRA issue, and ask for that information to be added to the IMAS data dictionary (2) find another way to propagate that information (for example, store the flux surfaces information, and then re-calculate the centroid where needed). The addition to the IMAS dictionary is done here: https://github.com/gafusion/OMFIT-source/blob/unstable/omfit/omfit_classes/fluxSurface.py#L3133-L3178
Fixing this in a more proper way is something that we have already discussed with @TimSlendebroek
The consistency_check
argument/attribute handles how to treat these cases.
to replicate your issue in OMFIT
ods=OMFIT['tmp'].to_omas()
ods.save('tmp.h5')
ods1=ODS(consistency_check='strict') # `strict` says to discard all `extra_structures` additions
ods1.load('tmp.h5')
To avoid adding extra structures to your ODS:
ods=OMFIT['tmp'].to_omas()
ods.consistency_check='strict_drop_warn' # this will drop the `extra_structures` and warn about doing so
ods.save('tmp.h5')
ods1=ODS(consistency_check='strict') # `strict` says to discard all `extra_structures` additions
ods1.load('tmp.h5')
To avoid loading extra structures to your ODS:
ods=OMFIT['tmp'].to_omas()
ods.save('tmp.h5')
ods1=ODS(consistency_check='strict_drop_warn') # this will drop the `extra_structures` and warn about doing so
ods1.load('tmp.h5')
I have saved an ods in hdf5 and ascii formats from omfit using the following commands:
I tried to open these two files from a python session outside OMFIT. However, there was a problem