Skip to content

skip the write of CHAR_DATA when it is empty#11

Open
prasad-sawantdesai wants to merge 1 commit intoiterorganization:developfrom
prasad-sawantdesai:bugfix/ids-put-error-multiple-timeslices-core-profiles-9
Open

skip the write of CHAR_DATA when it is empty#11
prasad-sawantdesai wants to merge 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

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.

1 participant