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

correct extra_arg_sf2sig, nete_rho, q profile near edge from cliste with large values

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@9250 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 01c17b01
No related branches found
No related tags found
No related merge requests found
...@@ -264,9 +264,13 @@ gdat_params = gdat_data.gdat_params; ...@@ -264,9 +264,13 @@ gdat_params = gdat_data.gdat_params;
% 1st treat the simplest method: "signal" % 1st treat the simplest method: "signal"
if strcmp(mapping_for_aug.method,'signal') if strcmp(mapping_for_aug.method,'signal')
exp_location = gdat_data.gdat_params.exp_name; exp_location = gdat_data.gdat_params.exp_name;
if ~isempty(mapping_for_aug.expression) && iscell(mapping_for_aug.expression) && length(mapping_for_aug.expression)>=3 if ~iscell(mapping_for_aug.expression)
error_status = 1010;
disp(['expects a cell array with at least 2 cells in expression, mapping_for_aug.expression = ' mapping_for_aug.expression]);
return
elseif length(mapping_for_aug.expression)>=3
exp_location = mapping_for_aug.expression{3}; exp_location = mapping_for_aug.expression{3};
elseif ~isempty(mapping_for_aug.expression) && length(mapping_for_aug.expression)>=2 elseif length(mapping_for_aug.expression)>=2
mapping_for_aug.expression{3} = exp_location; mapping_for_aug.expression{3} = exp_location;
else else
error_status = 101; error_status = 101;
...@@ -448,9 +452,13 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -448,9 +452,13 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
return return
end end
diag_name = gdat_data.gdat_params.source; diag_name = gdat_data.gdat_params.source;
extra_arg_sf2sig_eff_string = '';
if ~strcmp(gdat_data.gdat_params.extra_arg_sf2sig,'[]')
extra_arg_sf2sig_eff_string = [',' gdat_data.gdat_params.extra_arg_sf2sig];
end
% R, Z positions of measurements % R, Z positions of measurements
try try
eval(['[r_time]=sf2ab(diag_name,shot,r_node,''-exp'',exp_name_eff,' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['[r_time]=sf2ab(diag_name,shot,r_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
catch ME_R_time catch ME_R_time
% assume no shotfile % assume no shotfile
getReport(ME_R_time,'basic'); getReport(ME_R_time,'basic');
...@@ -459,11 +467,11 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -459,11 +467,11 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.r = r_time.value{1}; gdat_data.r = r_time.value{1};
inotok=find(gdat_data.r<=0); inotok=find(gdat_data.r<=0);
gdat_data.r(inotok) = NaN; gdat_data.r(inotok) = NaN;
eval(['[z_time]=sf2ab(diag_name,shot,z_node,''-exp'',exp_name_eff,' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['[z_time]=sf2ab(diag_name,shot,z_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
gdat_data.z = z_time.value{1}; gdat_data.z = z_time.value{1};
inotok=find(gdat_data.z<=0); inotok=find(gdat_data.z<=0);
gdat_data.z(inotok) = NaN; gdat_data.z(inotok) = NaN;
eval(['[time]=sf2tb(diag_name,shot,''time'',''-exp'',exp_name_eff,' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['[time]=sf2tb(diag_name,shot,''time'',''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
gdat_data.t = time.value; gdat_data.t = time.value;
gdat_data.dim{1} = {gdat_data.r , gdat_data.z}; gdat_data.dim{1} = {gdat_data.r , gdat_data.z};
gdat_data.dimunits{1} = 'R, Z [m]'; gdat_data.dimunits{1} = 'R, Z [m]';
...@@ -1034,7 +1042,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1034,7 +1042,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
% ne or Te from Thomson data on raw z mesh vs (z,t) % ne or Te from Thomson data on raw z mesh vs (z,t)
nodenameeff = [upper(data_request_eff(1)) 'e_c']; nodenameeff = [upper(data_request_eff(1)) 'e_c'];
node_child_nameeff = [upper(data_request_eff(1)) 'e_core']; node_child_nameeff = [upper(data_request_eff(1)) 'e_core'];
[a,error_status]=rdaAUG_eff(shot,'VTA',nodenameeff,exp_name_eff),[],gdat_data.gdat_params.extra_arg_sf2sig; [a,error_status]=rdaAUG_eff(shot,'VTA',nodenameeff,exp_name_eff,[],gdat_data.gdat_params.extra_arg_sf2sig);
if isempty(a.data) || isempty(a.t) || error_status>0 if isempty(a.data) || isempty(a.t) || error_status>0
if gdat_params.nverbose>=3; if gdat_params.nverbose>=3;
a a
...@@ -1333,6 +1341,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1333,6 +1341,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'pgyro'} case {'pgyro'}
extra_arg_sf2sig_eff_string = '';
if ~strcmp(gdat_data.gdat_params.extra_arg_sf2sig,'[]')
extra_arg_sf2sig_eff_string = [',' gdat_data.gdat_params.extra_arg_sf2sig];
end
% LOAD MULTI CHANNEL DATA ECS % LOAD MULTI CHANNEL DATA ECS
% powers, frequencies, etc % powers, frequencies, etc
params_eff = gdat_data.gdat_params; params_eff = gdat_data.gdat_params;
...@@ -1366,7 +1378,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1366,7 +1378,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
end end
end end
try try
eval(['a = sf2par(''ECS'',shot,''gyr_freq'',''P_sy1_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''gyr_freq'',''P_sy1_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
% gyr_freq not present (old shots for example) % gyr_freq not present (old shots for example)
a=[]; a=[];
...@@ -1377,7 +1389,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1377,7 +1389,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.freq_ec(i) = a.value; gdat_data.freq_ec(i) = a.value;
end end
try try
eval(['a = sf2par(''ECS'',shot,''GPolPos'',''P_sy1_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''GPolPos'',''P_sy1_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
% GPolPos not present % GPolPos not present
a=[]; a=[];
...@@ -1388,7 +1400,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1388,7 +1400,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.polpos_ec(i) = a.value; gdat_data.polpos_ec(i) = a.value;
end end
try try
eval(['a = sf2par(''ECS'',shot,''GTorPos'',''P_sy1_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''GTorPos'',''P_sy1_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
a=[]; a=[];
end end
...@@ -1410,7 +1422,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1410,7 +1422,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
end end
end end
try try
eval(['a = sf2par(''ECS'',shot,''gyr_freq'',''P_sy2_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''gyr_freq'',''P_sy2_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
a=[]; a=[];
end end
...@@ -1420,7 +1432,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1420,7 +1432,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.freq_ec(i+4) = a.value; gdat_data.freq_ec(i+4) = a.value;
end end
try try
eval(['a = sf2par(''ECS'',shot,''GPolPos'',''P_sy2_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''GPolPos'',''P_sy2_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
a=[]; a=[];
end end
...@@ -1430,7 +1442,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -1430,7 +1442,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.polpos_ec(i+4) = a.value; gdat_data.polpos_ec(i+4) = a.value;
end end
try try
eval(['a = sf2par(''ECS'',shot,''GTorPos'',''P_sy2_g' num2str(i) ''',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['a = sf2par(''ECS'',shot,''GTorPos'',''P_sy2_g' num2str(i) '''' extra_arg_sf2sig_eff_string ');']);
catch catch
a=[]; a=[];
end end
...@@ -2000,6 +2012,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -2000,6 +2012,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'transp'} case {'transp'}
extra_arg_sf2sig_eff_string = '';
if ~strcmp(gdat_data.gdat_params.extra_arg_sf2sig,'[]')
extra_arg_sf2sig_eff_string = [',' gdat_data.gdat_params.extra_arg_sf2sig];
end
% most of the times the exp for the shotfile should be provided % most of the times the exp for the shotfile should be provided
shotfile_exp_eff = gdat_params.exp_name; shotfile_exp_eff = gdat_params.exp_name;
diagname='TRA'; diagname='TRA';
...@@ -2016,7 +2032,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -2016,7 +2032,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
elseif strcmp(lower(transp_sig{i,2}),'area-base') elseif strcmp(lower(transp_sig{i,2}),'area-base')
clear adata_area clear adata_area
try try
eval(['[adata_area]=sf2ab(diagname,shot,transp_sig{i,1},''-exp'',shotfile_exp_eff,' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['[adata_area]=sf2ab(diagname,shot,transp_sig{i,1},''-exp'',shotfile_exp_eff' extra_arg_sf2sig_eff_string ');']);
catch catch
adata_area.value = cell(0); adata_area.value = cell(0);
end end
...@@ -2024,7 +2040,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -2024,7 +2040,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
elseif strcmp(lower(transp_sig{i,2}),'time-base') elseif strcmp(lower(transp_sig{i,2}),'time-base')
clear adata_time clear adata_time
try try
eval(['[adata_time]=sf2tb(diagname,shot,transp_sig{i,1},''-exp'',shotfile_exp_eff,shotfile_exp_eff,' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['[adata_time]=sf2tb(diagname,shot,transp_sig{i,1},''-exp'',shotfile_exp_eff,shotfile_exp_eff' extra_arg_sf2sig_eff_string ');']);
catch catch
adata_time.value = cell(0); adata_time.value = cell(0);
end end
...@@ -2034,7 +2050,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') ...@@ -2034,7 +2050,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
% copy TIME to .t % copy TIME to .t
if isfield(gdat_data,'TIME') && isfield(gdat_data.TIME,'value') if isfield(gdat_data,'TIME') && isfield(gdat_data.TIME,'value')
gdat_data.t = gdat_data.TIME.value; gdat_data.t = gdat_data.TIME.value;
gdat_data.dim{1} = gdat_data.t, gdat_data.dim{1} = gdat_data.t;
gdat_data.dimunits{1} = gdat_data.TIME.unit; gdat_data.dimunits{1} = gdat_data.TIME.unit;
end end
...@@ -2065,15 +2081,19 @@ function [gdat_data,exp_name_eff,DIAG,NTIME_Lpf,NTIME,Lpf1_t,Lpf_SOL,M_Rmesh,N_Z ...@@ -2065,15 +2081,19 @@ function [gdat_data,exp_name_eff,DIAG,NTIME_Lpf,NTIME,Lpf1_t,Lpf_SOL,M_Rmesh,N_Z
% get basic params to be able to read results in EQ-like shotfiles % get basic params to be able to read results in EQ-like shotfiles
% M_Rmesh,N_Zmesh only needed for equil when 2D quantities are required % M_Rmesh,N_Zmesh only needed for equil when 2D quantities are required
% %
extra_arg_sf2sig_eff_string = '';
if ~strcmp(gdat_data.gdat_params.extra_arg_sf2sig,'[]')
extra_arg_sf2sig_eff_string = [',' gdat_data.gdat_params.extra_arg_sf2sig];
end
shot=gdat_data.shot; shot=gdat_data.shot;
exp_name_eff = gdat_data.gdat_params.exp_name; exp_name_eff = gdat_data.gdat_params.exp_name;
gdat_data.gdat_params.equil = upper(gdat_data.gdat_params.equil); gdat_data.gdat_params.equil = upper(gdat_data.gdat_params.equil);
DIAG = gdat_data.gdat_params.equil; % 'EQI' by default at this stage, should become EQH? DIAG = gdat_data.gdat_params.equil; % 'EQI' by default at this stage, should become EQH?
eval(['M_Rmesh_par = sf2par(DIAG,shot,''M'',''PARMV'',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['M_Rmesh_par = sf2par(DIAG,shot,''M'',''PARMV''' extra_arg_sf2sig_eff_string ');']);
M_Rmesh = M_Rmesh_par.value + 1; % nb of points M_Rmesh = M_Rmesh_par.value + 1; % nb of points
eval(['N_Zmesh_par = sf2par(DIAG,shot,''N'',''PARMV'',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['N_Zmesh_par = sf2par(DIAG,shot,''N'',''PARMV''' extra_arg_sf2sig_eff_string ');']);
N_Zmesh = N_Zmesh_par.value + 1; % nb of points N_Zmesh = N_Zmesh_par.value + 1; % nb of points
eval(['NTIME_par = sf2par(DIAG,shot,''NTIME'',''PARMV'',' gdat_data.gdat_params.extra_arg_sf2sig ');']); eval(['NTIME_par = sf2par(DIAG,shot,''NTIME'',''PARMV''' extra_arg_sf2sig_eff_string ');']);
NTIME = NTIME_par.value; % nb of points NTIME = NTIME_par.value; % nb of points
Lpf_par = rdaAUG_eff(shot,DIAG,'Lpf',exp_name_eff,[],gdat_data.gdat_params.extra_arg_sf2sig); Lpf_par = rdaAUG_eff(shot,DIAG,'Lpf',exp_name_eff,[],gdat_data.gdat_params.extra_arg_sf2sig);
% since June, nb of time points in EQ results is not consistent with NTIME and time % since June, nb of time points in EQ results is not consistent with NTIME and time
......
...@@ -91,7 +91,11 @@ nrho = size(equil.pressure,1); ...@@ -91,7 +91,11 @@ nrho = size(equil.pressure,1);
eqdsk.p = interpos(equil.rhopolnorm(:,it),equil.pressure(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.pressure(end,it)]); eqdsk.p = interpos(equil.rhopolnorm(:,it),equil.pressure(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.pressure(end,it)]);
eqdsk.pprime = interpos(equil.rhopolnorm(:,it),equil.dpressuredpsi(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.dpressuredpsi(end,it)]); eqdsk.pprime = interpos(equil.rhopolnorm(:,it),equil.dpressuredpsi(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.dpressuredpsi(end,it)]);
eqdsk.FFprime = interpos(equil.rhopolnorm(:,it),equil.ffprime(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.ffprime(end,it)]); eqdsk.FFprime = interpos(equil.rhopolnorm(:,it),equil.ffprime(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.ffprime(end,it)]);
eqdsk.q = interpos(equil.rhopolnorm(:,it),equil.qvalue(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.qvalue(end,it)]); if abs(equil.qvalue(end,it)) > 25
eqdsk.q = interpos(21,equil.rhopolnorm(:,it),equil.qvalue(:,it),eqdsk.rhopsi);
else
eqdsk.q = interpos(equil.rhopolnorm(:,it),equil.qvalue(:,it),eqdsk.rhopsi,-0.03,[1 2],[0 equil.qvalue(end,it)]);
end
eqdsk.ip = equil.Ip(it); eqdsk.ip = equil.Ip(it);
eqdsk.stitle=['#' num2str(shot) ' t=' num2str(time_eff) ' from ' equil.gdat_params.exp_name '/' equil.gdat_params.equil]; eqdsk.stitle=['#' num2str(shot) ' t=' num2str(time_eff) ' from ' equil.gdat_params.exp_name '/' equil.gdat_params.equil];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment