equil_LUKE2ITM

PURPOSE ^

LUKE - Script for writing all magnetic equilibrium used by LUKE into the ITM MDS+ database

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

LUKE - Script for writing all magnetic equilibrium used by LUKE into the ITM MDS+ database

Script for writing all magnetic equilibrium used by LUKE into the ITM MDS+ database. LUKE scenarios
 are numbered from the magnetic equilibrium list given in the MatLab function LUKEITM.m

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 %LUKE - Script for writing all magnetic equilibrium used by LUKE into the ITM MDS+ database
0002 %
0003 %Script for writing all magnetic equilibrium used by LUKE into the ITM MDS+ database. LUKE scenarios
0004 % are numbered from the magnetic equilibrium list given in the MatLab function LUKEITM.m
0005 %
0006 %by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)
0007 %
0008 clear all
0009 close all
0010 %
0011 equil_LUKE = {};
0012 equil_name = {};
0013 path_equil = {};
0014 %
0015 [dkepath] = load_structures_yp('dkepath','','');
0016 %
0017 % Magnetic equilibria from ~/LUKE/Project_DKE/Database/EQUIL_files/
0018 %
0019 for numshot = 1:LUKE2ITM(dkepath,'equil'),
0020     [equil_name{numshot},path_equil{numshot}] = ITM2LUKE(dkepath,'equil',numshot);
0021     try,
0022         if numshot > 6,dirini = pwd;execute_Mscript_dke_yp(['make_equil_',equil_name{numshot}],path_equil{numshot});cd(dirini);end
0023         equil_LUKE{numshot} = load_structures_yp('equil',equil_name{numshot},path_equil{numshot});        
0024     catch,
0025         equil_LUKE{numshot} = '';
0026         disp(['Fail to load ',equil_name{numshot},' LUKE magnetic equilibrium !']);
0027     end
0028 end
0029 %
0030 [machine,user,ver] = which_MDSdatabase(dkepath);%Check access to database (Environment variable must be set-up before launching MatLab)
0031 %
0032 if isempty(machine) | isempty(user) | isempty(ver),
0033     disp(['WARNING: Unsuccessful connexion to ITM MDS+ database, user: ',user,', database version: ',ver,', machine: ',machine]);
0034 else
0035     disp(['Successful connexion to ITM MDS+ database, user: ',user,', database version: ',ver,', machine: ',machine]);
0036     numrun = 1;
0037     for numshot = 1:length(equil_LUKE),
0038         if ~isempty(equil_LUKE{numshot}),
0039             [status,result] = write_equil_ITM(equil_LUKE{numshot},numshot,numrun);
0040             if ~status,
0041                 disp(['LUKE magnetic equilibrium ''',equil_name{numshot},''' successfully written in the ITM-MDS+ database for scenario ',int2str(numshot),'.']);
0042             else
0043                 disp(result);
0044             end
0045         end
0046     end
0047 end
0048 %
0049

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