Skip to content
Snippets Groups Projects
Commit d13d7d92 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add profiles_1d

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11355 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 2c10acae
No related branches found
No related tags found
No related merge requests found
...@@ -268,4 +268,29 @@ profiles_1d.rho_volume_norm = gdat(params_equilibrium.shot,'rhovol'); ...@@ -268,4 +268,29 @@ profiles_1d.rho_volume_norm = gdat(params_equilibrium.shot,'rhovol');
% triangularity_upper = gdat(params_equilibrium.shot,'triangularity_upper'); % triangularity_upper = gdat(params_equilibrium.shot,'triangularity_upper');
profiles_1d.volume = gdat(params_equilibrium.shot,'volume_rho'); profiles_1d.volume = gdat(params_equilibrium.shot,'volume_rho');
keyboard profiles_1d_fieldnames = fieldnames(profiles_1d);
special_fields = {'geometric_axis', 'rho_tor_norm', 'psi'}; % fields needing non-automatic treatments
for it=1:length(ids_equilibrium.time)
for i=1:length(profiles_1d_fieldnames)
if ~any(strcmp(profiles_1d_fieldnames{i},special_fields))
if ~isstruct(ids_equilibrium.time_slice{it}.profiles_1d.(profiles_1d_fieldnames{i}))
ids_equilibrium.time_slice{it}.profiles_1d.(profiles_1d_fieldnames{i}) = ...
profiles_1d.(profiles_1d_fieldnames{i}).data(:,it);
else
special_fields{end+1} = profiles_1d_fieldnames{i};
end
end
end
end
% special cases
nrho = length(profiles_1d.rho_tor.x);
ntime = length(temp.psi_axis.data);
for it=1:length(ids_equilibrium.time)
ids_equilibrium.time_slice{it}.profiles_1d.rho_tor_norm = ids_equilibrium.time_slice{it}.profiles_1d.rho_tor./ ...
ids_equilibrium.time_slice{it}.profiles_1d.rho_tor(end);
ids_equilibrium.time_slice{it}.profiles_1d.psi = ...
reshape(1-profiles_1d.rho_tor.x.^2,nrho,1)*reshape(temp.psi_axis.data,1,ntime) + ...
ones(nrho,1)*reshape(global_quantities.psi_boundary.data,1,ntime);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment