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

add pressure=pressure_rho, both

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11380 d63d8f72-b253-0410-a779-e742ad2e26cf
parent fdd43070
Branches
Tags
No related merge requests found
...@@ -1927,6 +1927,29 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1927,6 +1927,29 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.units = tracetdi.units; gdat_data.units = tracetdi.units;
gdat_data.request_description = 'pprime=dp/dpsi'; gdat_data.request_description = 'pprime=dp/dpsi';
case {'pressure', 'pressure_rho'}
if liuqe_matlab==0
nodenameeff = ['tcv_eq("' liuqefortran2liuqematlab('p_rho',1,0) '",''' psitbx_str ''')'];
tracetdi=tdi(nodenameeff);
if ~isempty(tracetdi.dim) && length(tracetdi.dim)>=1
tracetdi.dim{1} = sqrt(tracetdi.dim{1}); % correct x-axis psi_norm to rhopol
end
tracetdi.data = tracetdi.data ./2 ./pi; % correct node assumption (same for liuqe_fortran and fbte)
else
nodenameeff = ['tcv_eq(''p_rho'',''' psitbx_str ''')'];
tracetdi=tdi(nodenameeff);
end
gdat_data.data = tracetdi.data;
gdat_data.dim = tracetdi.dim;
if ~isempty(gdat_data.dim) && length(gdat_data.dim)>=2
gdat_data.t = gdat_data.dim{mapping_for_tcv.gdat_timedim};
gdat_data.x = gdat_data.dim{setdiff([1 2],mapping_for_tcv.gdat_timedim)};
end
gdat_data.data_fullpath=nodenameeff;
gdat_data.dimunits = tracetdi.dimunits;
gdat_data.units = tracetdi.units;
gdat_data.request_description = 'pressure';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'psi_edge'} case {'psi_edge'}
% psi at edge, 0 by construction in Liuqe, thus not given % psi at edge, 0 by construction in Liuqe, thus not given
......
...@@ -245,6 +245,10 @@ switch lower(data_request) ...@@ -245,6 +245,10 @@ switch lower(data_request)
mapping.timedim = 2; mapping.timedim = 2;
mapping.label = 'pprime'; mapping.label = 'pprime';
mapping.method = 'switchcase'; mapping.method = 'switchcase';
case {'pressure', 'p_rho'} % note: not pressure from liuqe fortran which is 2D
mapping.timedim = 2;
mapping.label = 'pressure';
mapping.method = 'switchcase';
case {'psi_axis', 'psi_mag'} case {'psi_axis', 'psi_mag'}
mapping.timedim = 1; mapping.timedim = 1;
mapping.method = 'tdiliuqe'; mapping.method = 'tdiliuqe';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment