process_euitm_dataequil

PURPOSE ^

LUKE - Function that process the ITM data to generate a LUKE compliant magnetic equilibrium structure from ITM MDS+ database

SYNOPSIS ^

function [equil] = process_euitm_dataequil(ver_mds,magnetic_euitm,coreprof_euitm,display_mode)

DESCRIPTION ^

LUKE - Function that process the ITM data to generate a LUKE compliant magnetic equilibrium structure from ITM MDS+ database

Function that build a LUKE compliant magnetic equilibrium structure from ITM MDS+ database

by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [equil] = process_euitm_dataequil(ver_mds,magnetic_euitm,coreprof_euitm,display_mode)
0002 %LUKE - Function that process the ITM data to generate a LUKE compliant magnetic equilibrium structure from ITM MDS+ database
0003 %
0004 %Function that build a LUKE compliant magnetic equilibrium structure from ITM MDS+ database
0005 %
0006 %by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)
0007 %
0008 if nargin < 3,error('Not enough input arguments in process_euitm_dataequil.m');end
0009 %
0010 if nargin == 3,
0011     display_mode = 0;%display option
0012 end
0013 %
0014 magnetic = CPO2LUKEstruct_yp(ver_mds,'equilibrium',magnetic_euitm,display_mode);% Data conversion between ITM CPO's and C3PO/LUKE format
0015 coreprof = CPO2LUKEstruct_yp(ver_mds,'coreprof',coreprof_euitm,display_mode);% Data conversion between ITM CPO's and C3PO/LUKE format
0016 %
0017 % Profiles interpolation of the temperatures and densities on the 1-D psin grid defined in magnetic_LUKE
0018 %
0019 interp_method ='linear';
0020 %
0021 pTe_interp = interp1(coreprof_euitm.psi.value,coreprof.pTe,magnetic_euitm.profiles_1d.psi,interp_method,'extrap')';    
0022 pne_interp = interp1(coreprof_euitm.psi.value,coreprof.pne,magnetic_euitm.profiles_1d.psi,interp_method,'extrap')';    
0023 pzTi_interp = interp1(coreprof_euitm.psi.value',coreprof.pzTi',magnetic_euitm.profiles_1d.psi',interp_method,'extrap')';     
0024 pzni_interp = interp1(coreprof_euitm.psi.value',coreprof.pzni',magnetic_euitm.profiles_1d.psi',interp_method,'extrap')';     
0025 %
0026 psi_euitm= magnetic_euitm.profiles_1d.psi - magnetic_euitm.profiles_1d.psi(1);%psi = 0 on the magnetic axis (arbitrary choice)
0027 psin_euitm= psi_euitm/psi_euitm(end);
0028 %
0029 psin = magnetic.psi_apRp'/magnetic.psi_apRp(end);
0030 %
0031 profiles.pTe = interp1(psin_euitm,pTe_interp,psin,interp_method,'extrap')';    
0032 profiles.pne = interp1(psin_euitm,pne_interp,psin,interp_method,'extrap')';    
0033 profiles.pzTi = interp1(psin_euitm',pzTi_interp',psin',interp_method,'extrap')';     
0034 profiles.pzni = interp1(psin_euitm',pzni_interp',psin',interp_method,'extrap')';
0035 %
0036 profiles.zZi = coreprof.zZi;
0037 profiles.zmi = coreprof.zmi;
0038 %
0039 equil = conc_struct_jd(magnetic,profiles);%LUKE compatible magnetic equilibrium structure

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.