Skip to content

skip the write of CHAR_DATA when it is empty#11

Merged
olivhoenen merged 1 commit intoiterorganization:developfrom
prasad-sawantdesai:bugfix/ids-put-error-multiple-timeslices-core-profiles-9
Apr 3, 2026
Merged

skip the write of CHAR_DATA when it is empty#11
olivhoenen merged 1 commit intoiterorganization:developfrom
prasad-sawantdesai:bugfix/ids-put-error-multiple-timeslices-core-profiles-9

Conversation

@prasad-sawantdesai
Copy link
Copy Markdown
Contributor

user = getenv('USER');
%tmp1=shot
%tmp2=run

backend="hdf5";
shot=1050
run=1
machine='test'
if backend=='mdsplus'
    idx = imas_create_env ('ids',shot,run,0,0,user, convertStringsToChars(machine),'3')   % for MDS+ backend
elseif backend=='hdf5'
    idx = imas_create_env_backend (shot,run,user,convertStringsToChars(machine),'3',13); % for HDF5 backend
else
    display('no valid backend given, return')
end

hom_time_value=1
clear core_profiles
cp = ids_init('core_profiles')
cp.ids_properties.comment = 'test';
cp.ids_properties.homogeneous_time = hom_time_value;

cp.time=1.0

%working
%nt=1;

%not working
nt=7736;

%cp.profiles_1d=ids_allocate('core_profiles','profiles_1d',nt);
cp.profiles_1d=ids_allocate('core_profiles','profiles_1d',nt);

% Fill cp.time 
cp.time = linspace(0.1, 773.6, nt);

tmp31=cp

ids_put(idx,'core_profiles',cp);

disp ('Closing database')
imas_close(idx);
image

@olivhoenen olivhoenen merged commit dddba8a into iterorganization:develop Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error in ids_put when putting more than one time slice of core_profiles

2 participants