Skip to content
Snippets Groups Projects
Commit c7d35459 authored by Antonia Frank's avatar Antonia Frank
Browse files

test adding rho_tor_norm to nbi sources

parent 58b8e522
Branches
Tags
1 merge request!165Core sources tcv2ids2database
Pipeline #205217 passed
......@@ -395,7 +395,7 @@ if strcmp(hostname,'lac8.epfl.ch')
else
unix(sprintf('ssh $(whoami)@lac8 "ls /Lac8_D/ASTRA/ | grep ''%i'' && echo File for shotnumber exists! || echo File for shotnumber does not exist! && exit"',shot));
end
rho_test = linspace(0,1,101);
if numel(active_nbi)>0
for i_nbi = active_nbi
% get tgrid (same for NBI1 & 2 if both active) from active_nbi(1)
......@@ -422,6 +422,7 @@ if numel(active_nbi)>0
p_nbi_injected_tmp = interpos(nbi_powers_tgrid,powers_gdat.(nbi_names{i_nbi}).data,nbi_tgrid_out);
for ii = 1:nt_nbi_out
ids_core_sources.source{last_index+i_nbi}.profiles_1d{ii}.time = nbi_tgrid_out(ii);
ids_core_sources.source{last_index+i_nbi}.profiles_1d{ii}.rho_tor_norm = rho_test;
% globals
ids_core_sources.source{last_index+i_nbi}.global_quantities{ii}.time = nbi_tgrid_out(ii);
ids_core_sources.source{last_index+i_nbi}.global_quantities{ii}.power = p_nbi_injected_tmp(ii);
......@@ -442,6 +443,7 @@ if ~isempty(powers_gdat.dnbi)
% find times where DNBI is on to define time grid with extra time slice just
% before/after DNBI power and at start/end of shot
itime_dnbi = find((powers_gdat.dnbi.data>0));
rho_test = linspace(0,1,101);
if ~isempty(itime_dnbi)
if dnbi_powers_tgrid(itime_dnbi(end))>=ohm_tgrid(end)
i_time_end = iround(dnbi_powers_tgrid,ohm_tgrid(end));
......@@ -461,6 +463,7 @@ if ~isempty(powers_gdat.dnbi)
p_dnbi_injected = interpos(dnbi_powers_tgrid,powers_gdat.dnbi.data,dnbi_tgrid_out);
for ii = 1:nt_dnbi_out
ids_core_sources.source{last_index+1}.profiles_1d{ii}.time = dnbi_tgrid_out(ii);
ids_core_sources.source{last_index+1}.profiles_1d{ii}.rho_tor_norm = rho_test;
% globals
ids_core_sources.source{last_index+1}.global_quantities{ii}.time = dnbi_tgrid_out(ii);
ids_core_sources.source{last_index+1}.global_quantities{ii}.power = p_dnbi_injected(ii);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment