rundke_metis_LH

PURPOSE ^

SYNOPSIS ^

function rundke_metis_LH(basestr,shotnum,shotimes,locpath_simul,locid_simul,configs,opt,dkepath,dkeparam,dkedisplay,equil,ohm,transpfaste_in,ripple,rayparam,waveparam,C3POparam,scheduler_run_lukert)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function rundke_metis_LH(basestr,shotnum,shotimes,locpath_simul,locid_simul,configs,opt,dkepath,dkeparam,dkedisplay,equil,ohm,transpfaste_in,ripple,rayparam,waveparam,C3POparam,scheduler_run_lukert)
0002     %
0003     if nargin < 18,
0004         scheduler_run_lukert = struct;
0005     end
0006     if nargin < 17,
0007         C3POparam = struct;
0008     end
0009     if nargin < 16,
0010         waveparam = struct;
0011     end
0012     if nargin < 15,
0013         rayparam = struct;
0014     end
0015     %
0016     % Simulation locid from config
0017     %
0018     % config = configs(1);
0019     % %
0020     % % aloha
0021     % %
0022     % locid_simul = ['aloha_',num2str(config.opt_aloha)];
0023     % %
0024     % if isfield(config,'locid'),
0025     %     locid_simul = [locid_simul,'_',config.locid];
0026     % elseif real(config.opt_aloha) >= 1 && config.aloha.inter == 0,
0027     %     if isfield(config,'locid_aloha'),% one spectrum for both modules
0028     %         locid_simul_aloha = config.locid_aloha;
0029     %     elseif isfield(config,'locid_aloha_b') && isfield(config,'locid_aloha_h'),% one spectrum for each modules
0030     %         locid_simul_aloha = [config.locid_aloha_b,config.locid_aloha_h];
0031     %     else
0032     %         error('aloha module division not consistent')
0033     %     end
0034     %     %
0035     %     if isfield(config,'aloha'),
0036     %         locid_simul = [locid_simul,'_nlobes_',num2str(config.aloha.nlobes),'_dir_',num2str(config.aloha.dir),'_mode_',num2str(config.aloha.mode),...
0037     %             '_nrZ0_',num2str(config.nrZ0),locid_simul_aloha];
0038     %     else
0039     %         locid_simul = [locid_simul,'_param_',num2str(config.aloha_param),'_dir_',num2str(config.aloha_dir),...
0040     %             '_nrZ0_',num2str(config.nrZ0),locid_simul_aloha];
0041     %     end
0042     % elseif ~isnan(config.bNpar0),
0043     %     locid_simul = [locid_simul,'_bNpar0',num2str(config.bNpar0),'_bdNpar0_',num2str(config.bdNpar0),'_bPlhtot_',num2str(config.bPlhtot)];
0044     % end
0045     % %
0046     % % tail
0047     % %
0048     % if isfield(config,'tail'),
0049     %     locid_simul_tail = make_tail_simulid_jd(config.tail);
0050     %     if ~isempty(locid_simul_tail),
0051     %         locid_simul = [locid_simul,'_',locid_simul_tail];
0052     %     end
0053     % end
0054     % %
0055     % if ~isempty(locid_simul_end),
0056     %     locid_simul = [locid_simul,'_',locid_simul_end];
0057     % end
0058     %
0059     % WARNING : use this line to invert spectra
0060     % locid_simul = [locid_simul,'_inverted'];% Simulation local id (leave empty for standard id)
0061     %
0062     if ~iscell(locpath_simul),
0063         path_simul = [basestr,filesep,shotnum,filesep,locpath_simul];% Simulation path (leave empty for current path)
0064     else
0065         path_simul = [locpath_simul{1},basestr,filesep,shotnum,filesep,locpath_simul{2}];% Simulation path (leave empty for current path)
0066     end    
0067     %
0068     shotimes = select_shotimes_jd(['before_luke@',basestr,'_',shotnum,'_'],'.mat',path_simul,shotimes);
0069     nshots = length(shotimes);
0070     %
0071     dkepath = conc_struct_jd(load_structures_yp('dkepath','',''),dkepath);
0072     %
0073     % ---- RADIAL TRANSPORT ----
0074     %
0075     if transpfaste_in.Dr0 > 0,
0076         %
0077         % initialization
0078         %
0079         transpfaste.Dr0 = 0;%Core radial diffusion coefficient (m/s)
0080         transpfaste.pDr = 0;%Coefficient for the Dr radial profile
0081         transpfaste.Dr_model = 0;%Radial diffusion type: (0) no vpar dependence, (1) magnetic turbulence model (vpar/vth), (2) Energy dependence
0082         transpfaste.Vr0 = 0;%Core radial pinch coefficient (m/s)
0083         transpfaste.pVr = 0;%Coefficient for the Vr radial profile
0084         transpfaste.Vr_model = 0;%Radial pinch type: (0) no vpar dependence, (1) magnetic turbulence model (vpar/vth), (2) Energy dependence
0085         transpfaste.vparmin = 3.5;%Lower limit of the parallel velocity dependence of the radial diffusion and pinch (vth_ref or vth)
0086         transpfaste.norm_ref = 1;%Normalization procedure for the lower limit of the parallel velocity dependence of the radial diffusion and pinch: (0) from local values Te and ne, (1) from reference values Te_ref and ne_ref
0087         %
0088         transpfaste = conc_struct_jd(transpfaste,transpfaste_in);
0089         %
0090         transpfaste.id = ['TR_',num2str(transpfaste.Dr_model),'_Dr0_',num2str(transpfaste.Dr0),'_pDr_',num2str(transpfaste.pDr)];
0091     else
0092         transpfaste = struct;
0093     end
0094     %
0095     % ---- LH WAVES ----
0096     %
0097     wavestructs = {};
0098     nconf = length(configs);
0099     %
0100     for ic = 1:nconf,
0101         %
0102         config = configs(ic);
0103         %
0104         if isfield(config,'include') & config.include == 0,
0105             continue
0106         end
0107         %
0108         % vertical positions
0109         %
0110         if ~isfield(config,'rZ0'),% rZ0 not specified, calculated from model and number of vertical positions
0111             if isnan(config.nrZ0),
0112                 opt_ny = 1;% calculate m spectrum
0113                 if real(config.opt_aloha) >= 1,% aloha with two antenna blocks
0114                     config.nrZ0 = 2;% one ray per antenna block
0115                 else
0116                     config.nrZ0 = 1;% one ray per antenna
0117                 end
0118             else
0119                 opt_ny = 0;% do not calculate m spectrum - but poloidally distributed rays
0120             end
0121             %
0122             n2 = fix(config.nrZ0/2);
0123             if config.type == 1,% waveguide rows at positions [-0.155,-0.075,0.075,0.155]
0124                 rZ0min = 0.035;
0125                 rZ0max = 0.195;
0126             elseif config.type == 2,% waveguide rows at positions [-0.244,-0.162,-0.080,0.080,0.162,0.244]
0127                 rZ0min = 0.039;
0128                 rZ0max = 0.285;
0129             else
0130                 error('Antenna configuration not recognized')
0131             end
0132             %
0133             if n2 >= 1,
0134                 rZ0 = linspace(rZ0min,rZ0max,n2+1);
0135                 rZ0 = (rZ0(1:end-1) + rZ0(2:end))/2;
0136             else
0137                 rZ0 = [];
0138             end
0139             %
0140             if rem(config.nrZ0,2) == 0,%even number of positions
0141                 rZ0 = [-fliplr(rZ0),rZ0];
0142             else
0143                 rZ0 = [-fliplr(rZ0),0,rZ0];
0144             end
0145         else
0146             rZ0 = config.rZ0;
0147         end
0148         %
0149         locwavestructs = {};
0150         %
0151         for ishot = 1:nshots,
0152             %
0153             launch = struct;
0154             %
0155             if isfield(config,'tail') && ~isempty(fieldnames(config.tail)),
0156                 launch.tail = config.tail;
0157             end
0158             %
0159             if real(config.opt_aloha) == 0, 
0160                 %
0161                 if isfield(config,'bNpar0') && ~any(isnan(config.bNpar0)),
0162                     launch.bNpar0 = config.bNpar0;
0163                 end
0164                 if isfield(config,'bdNpar0') && ~any(isnan(config.bdNpar0)),
0165                     launch.bdNpar0 = config.bdNpar0;
0166                 end
0167                 if isfield(config,'bPlhtot') && ~any(isnan(config.bPlhtot)),
0168                     launch.bPlhtot = config.bPlhtot;
0169                 end
0170                 launch.rZ0 = rZ0;
0171                 %
0172                 launch.id = make_launchid_jd(config);
0173                 %
0174                 locwavestructs{1}(ishot).launch = launch;
0175                 locwavestructs{1}(ishot).id = ['C3PO_',launch.id];
0176                 %
0177             elseif real(config.opt_aloha) >= 1, 
0178                 %
0179                 if isfield(config,'locid_aloha'),% one spectrum for both modules
0180                     %
0181                     if imag(config.opt_aloha) == 0,% different spectrum for each time
0182                         aloha_str = ['ALOHA_',basestr,'_',shotnum,'_',shotimes{ishot},config.locid_aloha,'.mat'];
0183                     else% common spectrum for all times
0184                         aloha_str = ['ALOHA_',basestr,'_',shotnum,config.locid_aloha,'.mat'];
0185                     end                
0186                     %
0187                     aloha = load([path_simul,config.path_aloha,filesep,aloha_str]);
0188                     %
0189                     % process toroidal aloha spectrum for LUKE
0190                     %
0191                     if isfield(config,'aloha'),
0192                         [bNtor0,bdNtor0,bPlhtor,param_out] = proc_aloha_spec_jd(aloha.antenna.nz,NaN,real(aloha.antenna.dP_nz),1,config.aloha(1),0,config.aloha(1));
0193                     else
0194                         if isfield(config,'aloha_dir'),
0195                             Pin = 1 + config.aloha_dir*1i;
0196                         else
0197                             Pin = 1;
0198                         end
0199                         %
0200                         [bNtor0,bdNtor0,bPlhtor,param_out] = proc_aloha_spec_jd(aloha.antenna.nz,NaN,real(aloha.antenna.dP_nz),Pin,config.aloha_param(1),0,0);                
0201                     end
0202                     %
0203                     config.aloha = conc_struct_jd(config.aloha,param_out);
0204                     %
0205                     % initialize parameters
0206                     %
0207                     launch.id = make_launchid_jd(config);
0208                     %
0209                     if opt_ny == 1,% process poloidal aloha spectrum for LUKE
0210                         if isfield(config,'aloha'),
0211                             [bNpol0,bdNpol0,bPlhpol] = proc_aloha_spec_jd(aloha.antenna.ny,NaN,sum(real(aloha.antenna.dP.')),1,config.aloha(2),0,config.aloha(2));     
0212                         else
0213                             [bNpol0,bdNpol0,bPlhpol] = proc_aloha_spec_jd(aloha.antenna.ny,NaN,sum(real(aloha.antenna.dP.')),1,config.aloha_param(2),0,0);     
0214                         end
0215                     else
0216                         bNpol0 = 0;
0217                         %
0218                         bdNpol0 = 0;
0219                         %
0220                         bPlhpol = 1;                
0221                     end
0222                     %
0223                     % Since N// is not strictly speaking Ntor, we make it imaginary to notify init_RT_jd. In this case, the real part is Npol
0224                     %
0225                     launch.bNpar0 = [];
0226                     %
0227                     launch.bdNpar0 = [];
0228                     %
0229                     launch.bPlhtot = [];
0230                     %
0231                     for iy = 1:length(bNtor0),
0232                         launch.bNpar0 = [launch.bNpar0,1i*bNtor0(iy) + bNpol0];
0233                         %
0234                         % the combined spectral width effect is not yet implemented
0235                         % (TODO) see how to include it, maybe in init_RT_jd
0236                         % watch for possible conflicts with square spectrum prescriptions
0237                         %
0238         %                 launch.bdNpar0 = [launch.bdNpar0,1i*bdNtor0(iy) + bdNpol0];
0239                         %
0240                         launch.bdNpar0 = [launch.bdNpar0,bdNtor0(iy)*ones(1,length(bdNpol0))];
0241                         %
0242                         launch.bPlhtot = [launch.bPlhtot,bPlhtor(iy)*bPlhpol];
0243                     end
0244                     %
0245                     % load METIS data for sign and/or power correction
0246                     %
0247                     metisdata = load([path_simul,filesep,'before_luke@',basestr,'_',shotnum,'_',shotimes{ishot},'.mat']);
0248                     %
0249                     %launch.bNpar0 = launch.bNpar0*(-metisdata.option.signe);% case of N//
0250                     launch.bNpar0 = launch.bNpar0*(-sign(metisdata.equil.psi_apRp(end)));% case of Npol +iNtor
0251                     launch.aloha = aloha;
0252                     %
0253                     if nconf == 1 && real(config.opt_aloha) == 1,% power from metis
0254                         %
0255                         plh = metisdata.cons.plh;% power divided into two antennas (upper and lower launcher)
0256                         %
0257                         launch.bPlhtot = launch.bPlhtot*plh;%/sum(launch.bPlhtot)
0258                         %
0259                     else
0260                         %
0261                         filename = [path_simul,'GPHYB_',shotnum,'.mat'];
0262                         %
0263                         if exist(filename,'file'),%power from file
0264                             %
0265                             load(filename,'tplh','tbase')
0266                             %
0267                         else% power from database
0268                             %
0269                             [tplh,tbase] = tsbase(str2double(shotnum),'GPHYB');
0270                             %
0271                         end
0272                         %
0273                         xplh = 1e6*interp1(tbase(:,1),tplh,str2double(shotimes{ishot}));
0274                         if any(xplh < 0) || (real(config.opt_aloha) == 2 && abs(xplh(end) - metisdata.cons.plh)/metisdata.cons.plh > 0.01),
0275                             disp('warning : total power from database is different from metis cons')
0276                             keyboard
0277                         end
0278                         %
0279                         plh = xplh(ic);
0280                         %
0281                         launch.bPlhtot = launch.bPlhtot*plh;%/sum(launch.bPlhtot)
0282                         %
0283                     end
0284                     %
0285                     locwavestructs{1}(ishot).launch = launch;
0286                     %
0287                     locwavestructs{1}(ishot).id = ['C3PO_',launch.id];
0288                     %
0289                     locwavestructs{1}(ishot).launch.rZ0 = rZ0;
0290                     %
0291                 elseif isfield(config,'locid_aloha_b') && isfield(config,'locid_aloha_h'),% one spectrum for each modules
0292                     %
0293                     if imag(config.opt_aloha) == 0,% different spectrum for each time
0294                         aloha_str_b = ['ALOHA_',basestr,'_',shotnum,'_',shotimes{ishot},config.locid_aloha_b,'.mat'];
0295                         aloha_str_h = ['ALOHA_',basestr,'_',shotnum,'_',shotimes{ishot},config.locid_aloha_h,'.mat'];
0296                     else% common spectrum for all times
0297                         aloha_str_b = ['ALOHA_',basestr,'_',shotnum,config.locid_aloha_b,'.mat'];
0298                         aloha_str_h = ['ALOHA_',basestr,'_',shotnum,config.locid_aloha_h,'.mat'];
0299                     end                
0300                     %
0301                     aloha_b = load([path_simul,config.path_aloha,filesep,aloha_str_b]);
0302                     aloha_h = load([path_simul,config.path_aloha,filesep,aloha_str_h]);
0303                     %
0304                     % initialize parameters
0305                     %
0306                     launch_b = launch;
0307                     launch_h = launch;
0308                     %
0309                     % process toroidal aloha spectrum for LUKE
0310                     %
0311                     if isfield(config,'aloha'),
0312                         [bNtor0_b,bdNtor0_b,bPlhtor_b,param_out_b] = proc_aloha_spec_jd(aloha_b.antenna.nz,NaN,real(aloha_b.antenna.dP_nz),1,config.aloha(1),0,config.aloha(1));
0313                         [bNtor0_h,bdNtor0_h,bPlhtor_h,param_out_h] = proc_aloha_spec_jd(aloha_h.antenna.nz,NaN,real(aloha_h.antenna.dP_nz),1,config.aloha(1),0,config.aloha(1));
0314                     else
0315                         if isfield(config,'aloha_dir'),
0316                             Pin = 1 + config.aloha_dir*1i;
0317                         else
0318                             Pin = 1;
0319                         end
0320                         %
0321                         [bNtor0_b,bdNtor0_b,bPlhtor_b,param_out_b] = proc_aloha_spec_jd(aloha_b.antenna.nz,NaN,real(aloha_b.antenna.dP_nz),Pin,config.aloha_param(1),0,0);
0322                         [bNtor0_h,bdNtor0_h,bPlhtor_h,param_out_h] = proc_aloha_spec_jd(aloha_h.antenna.nz,NaN,real(aloha_h.antenna.dP_nz),Pin,config.aloha_param(1),0,0);                
0323                     end
0324                     %
0325                     config_b = rmfield(config,{'locid_aloha_b','locid_aloha_h'});
0326                     config_h = rmfield(config,{'locid_aloha_b','locid_aloha_h'});                 
0327                     %
0328                     config_b.locid_aloha = config.locid_aloha_b;
0329                     config_h.locid_aloha = config.locid_aloha_h;
0330                     %
0331                     config_b.aloha = conc_struct_jd(config.aloha,param_out_b);
0332                     config_h.aloha = conc_struct_jd(config.aloha,param_out_h);
0333                     %
0334                     % initialize parameters
0335                     %
0336                     launch_b.id = make_launchid_jd(config_b);
0337                     launch_h.id = make_launchid_jd(config_h);
0338                     %
0339                     if opt_ny == 1,% process poloidal aloha spectrum for LUKE
0340                         if isfield(config,'aloha'),
0341                             [bNpol0_b,bdNpol0_b,bPlhpol_b] = proc_aloha_spec_jd(aloha_b.antenna.ny,NaN,sum(real(aloha_b.antenna.dP.')),1,config.aloha(2),0,config.aloha(2));
0342                             [bNpol0_h,bdNpol0_h,bPlhpol_h] = proc_aloha_spec_jd(aloha_h.antenna.ny,NaN,sum(real(aloha_h.antenna.dP.')),1,config.aloha(2),0,config.aloha(2));     
0343                         else
0344                             [bNpol0_b,bdNpol0_b,bPlhpol_b] = proc_aloha_spec_jd(aloha_b.antenna.ny,NaN,sum(real(aloha_b.antenna.dP.')),1,config.aloha_param(2),0,0);
0345                             [bNpol0_h,bdNpol0_h,bPlhpol_h] = proc_aloha_spec_jd(aloha_h.antenna.ny,NaN,sum(real(aloha_h.antenna.dP.')),1,config.aloha_param(2),0,0);     
0346                         end
0347                     else
0348                         bNpol0_b = 0;
0349                         bNpol0_h = 0;
0350                         %
0351                         bdNpol0_b = 0;
0352                         bdNpol0_h = 0;
0353                         %
0354                         bPlhpol_b = 1;
0355                         bPlhpol_h = 1;                
0356                     end
0357                     %
0358                     % Since N// is not strictly speaking Ntor, we make it imaginary to notify init_RT_jd. In this case, the real part is Npol
0359                     %
0360                     launch_b.bNpar0 = [];
0361                     launch_h.bNpar0 = [];
0362                     %
0363                     launch_b.bdNpar0 = [];
0364                     launch_h.bdNpar0 = [];
0365                     %
0366                     launch_b.bPlhtot = [];
0367                     launch_h.bPlhtot = [];
0368                     %
0369                     for iy = 1:length(bNtor0_b),
0370                         launch_b.bNpar0 = [launch_b.bNpar0,1i*bNtor0_b(iy) + bNpol0_b];
0371                         launch_h.bNpar0 = [launch_h.bNpar0,1i*bNtor0_h(iy) + bNpol0_h];
0372                         %
0373                         % the combined spectral width effect is not yet implemented
0374                         % (TODO) see how to include it, maybe in init_RT_jd
0375                         % watch for possible conflicts with square spectrum prescriptions
0376                         %
0377         %                 launch_b.bdNpar0 = [launch_b.bdNpar0,1i*bdNtor0_b(iy) + bdNpol0_b];
0378         %                 launch_h.bdNpar0 = [launch_h.bdNpar0,1i*bdNtor0_h(iy) + bdNpol0_h];
0379                         %
0380                         launch_b.bdNpar0 = [launch_b.bdNpar0,bdNtor0_b(iy)*ones(1,length(bdNpol0_b))];
0381                         launch_h.bdNpar0 = [launch_h.bdNpar0,bdNtor0_h(iy)*ones(1,length(bdNpol0_h))];
0382                         %
0383                         launch_b.bPlhtot = [launch_b.bPlhtot,bPlhtor_b(iy)*bPlhpol_b];
0384                         launch_h.bPlhtot = [launch_h.bPlhtot,bPlhtor_h(iy)*bPlhpol_h];
0385                     end
0386                     %
0387                     % load METIS data for sign and/or power correction
0388                     %
0389                     metisdata = load([path_simul,filesep,'before_luke@',basestr,'_',shotnum,'_',shotimes{ishot},'.mat']);
0390                     %
0391                     %launch_b.bNpar0 = launch_b.bNpar0*(-metisdata.option.signe);% case of N//
0392                     launch_b.bNpar0 = launch_b.bNpar0*(-sign(metisdata.equil.psi_apRp(end)));% case of Npol +iNtor
0393                     launch_b.aloha = aloha_b;
0394                     %
0395                     %launch_h.bNpar0 = launch_h.bNpar0*(-metisdata.option.signe);% case of N//
0396                     launch_h.bNpar0 = launch_h.bNpar0*(-sign(metisdata.equil.psi_apRp(end)));% case of Npol +iNtor
0397                     launch_h.aloha = aloha_h;
0398                     %
0399                     if nconf == 1 && real(config.opt_aloha) == 1,% power from metis
0400                         %
0401                         plh = metisdata.cons.plh/2;% power divided into two antennas (upper and lower launcher)
0402                         %
0403                         launch_b.bPlhtot = launch_b.bPlhtot*plh;%/sum(launch_b.bPlhtot)
0404                         launch_h.bPlhtot = launch_h.bPlhtot*plh;%/sum(launch_h.bPlhtot)
0405                         %
0406                     else
0407                         %
0408                         filename = [path_simul,'GPHYB_',shotnum,'.mat'];
0409                         %
0410                         if exist(filename,'file'),%power from file
0411                             %
0412                             load(filename,'tplh','tbase')
0413                             %
0414                         else% power from database
0415                             %
0416                             [tplh,tbase] = tsbase(str2double(shotnum),'GPHYB');
0417                             %
0418                         end
0419                         %
0420                         xplh = 1e6*interp1(tbase(:,1),tplh,str2double(shotimes{ishot}));
0421                         if real(config.opt_aloha) == 2 && abs(xplh(end) - metisdata.cons.plh)/metisdata.cons.plh > 0.01,
0422                             disp('warning : total power from database is different from metis cons')
0423                             keyboard
0424                         end
0425                         %
0426                         plh = xplh(ic)/2;
0427                         %
0428                         launch_b.bPlhtot = launch_b.bPlhtot*plh;%/sum(launch_b.bPlhtot)
0429                         launch_h.bPlhtot = launch_h.bPlhtot*plh;%/sum(launch_h.bPlhtot)
0430                         %
0431                     end
0432                     %
0433                     locwavestructs{1}(ishot).launch = launch_b;
0434                     locwavestructs{2}(ishot).launch = launch_h;
0435                     %
0436                     locwavestructs{1}(ishot).id = ['C3PO_',launch_b.id];
0437                     locwavestructs{2}(ishot).id = ['C3PO_',launch_h.id];
0438                     %
0439                     locwavestructs{1}(ishot).launch.rZ0 = rZ0(rZ0 <= 0);
0440                     locwavestructs{2}(ishot).launch.rZ0 = rZ0(rZ0 >= 0);
0441                     %
0442                 else
0443                     %
0444                     error('aloha module division not consistent')
0445                     %
0446                 end
0447             end
0448             %
0449         end
0450         %
0451         wavestructs = [wavestructs,locwavestructs];
0452         %
0453     end
0454     %
0455     fnames = fieldnames(waveparam);
0456     nfields = length(fnames);
0457     for ifield = 1:nfields,
0458         locid_simul = [locid_simul,'_',fnames{ifield},'_',num2str(waveparam.(fnames{ifield}))];
0459     end
0460     %
0461     for iw = 1:length(wavestructs),
0462         for ishot = 1:nshots,
0463             wavestructs{iw}(ishot).rayparam = rayparam;
0464             wavestructs{iw}(ishot).waveparam = waveparam;
0465             wavestructs{iw}(ishot).C3POparam = C3POparam;
0466         end
0467     end
0468     %
0469     % WARNING : use this line to invert spectra (one wave only)
0470     %wavestructs{1} = fliplr(wavestructs{1});
0471     %
0472     % ===========================
0473     %
0474     % start rundke_metis function
0475     %
0476     rundke_metis(path_simul,locid_simul,basestr,shotnum,shotimes,opt,dkepath,wavestructs,equil,dkeparam,dkedisplay,ohm,transpfaste,ripple,0,scheduler_run_lukert)
0477     %
0478 end
0479 %
0480 function id_launch = make_launchid_jd(config)
0481     %
0482     % launch id from config
0483     %
0484     id_launch = 'LH';
0485     %
0486     if isfield(config,'id') && ~isempty(config.id),% case imposed from config
0487         id_launch = [id_launch,'_',config.id];
0488         return
0489     end
0490     %
0491     % aloha
0492     %
0493     %id_launch = [id_launch,'_aloha_',num2str(config.opt_aloha)];
0494     %
0495     if isfield(config,'locid'),
0496         id_launch = [id_launch,'_',config.locid];
0497     elseif real(config.opt_aloha) >= 1,
0498         %
0499         id_launch = [id_launch,'_nr_',num2str(config.nrZ0),'_nl_',num2str(config.aloha.nlobes),'_dir_',num2str(config.aloha.dir),'_md_',num2str(config.aloha.mode),...
0500             config.locid_aloha];
0501         %
0502     elseif ~isnan(config.bNpar0),
0503         bNpar0str = '';
0504         bdNpar0str = '';
0505         bPlhtotstr = '';
0506         for ib = 1:length(config.bNpar0),
0507             bNpar0str = [bNpar0str,'_',num2str(config.bNpar0(ib))];
0508             bdNpar0str = [bdNpar0str,'_',num2str(config.bdNpar0(ib))];
0509             bPlhtotstr = [bPlhtotstr,'_',num2str(config.bPlhtot(ib)/1e6)];
0510         end
0511         %
0512         id_launch = [id_launch,'_N0',bNpar0str,'_dN0',bdNpar0str,'_P',bPlhtotstr];
0513     end
0514     %
0515     % tail
0516     %
0517     if isfield(config,'tail'),
0518         locid_simul_tail = make_tail_simulid_jd(config.tail);
0519         if ~isempty(locid_simul_tail),
0520             id_launch = [id_launch,'_',locid_simul_tail];
0521         end
0522     end
0523     %
0524 end
0525 
0526

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