From c7d354598b1bc45c5d4390c5d1b06c263e8d12b6 Mon Sep 17 00:00:00 2001 From: Antonia Frank <antonia.frank@epfl.ch> Date: Thu, 22 Aug 2024 11:50:11 +0200 Subject: [PATCH] test adding rho_tor_norm to nbi sources --- matlab/TCV_IMAS/tcv_get_ids_core_sources.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m index d8ab9cea..1ecd2167 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m +++ b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m @@ -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); -- GitLab