Newer
Older
gyacomodir = pwd; gyacomodir = gyacomodir(1:end-2); % get code directory
addpath(genpath([gyacomodir,'matlab'])) % ... add
addpath(genpath([gyacomodir,'matlab/plot'])) % ... add
addpath(genpath([gyacomodir,'matlab/compute'])) % ... add
addpath(genpath([gyacomodir,'matlab/load'])) % ... add
default_plots_options
% Partition of the computer where the data have to be searched
% PARTITION='/Users/ahoffmann/gyacomo/results/paper_3/';
PARTITION='/misc/gyacomo23_outputs/paper_3/';
% PARTITION = '';
% resdir = 'DTT_rho85/3x2x192x48x32';
% resdir = 'DTT_rho85/3x2x192x48x32_NT';
% resdir = 'DTT_rho98/3x2x192x48x32';
% resdir = 'DTT_rho98/3x2x192x48x32_0.25grad';
% resdir = 'LM_DIIID_rho95/5x3x512x92x32';
% resdir = 'LM_DIIID_rho95/3x2x512x92x32';
% resdir = 'DIIID_LM_rho90/3x2x256x128x32';
% resdir = 'DTT_rho85_geom_scan/P8_J4_delta_nuDGGK_conv_test/delta_-0.3_nu_0.9';
resdir = 'NT_DIIID_Austin2019_rho95/3x2x256x64x32';
% resdir = '../testcases/cyclone_example';
% resdir = '../testcases/CBC_ExBshear/std';
% resdir = '../results/paper_3/HM_DTT_rho98/3x2x128x64x64';
DATADIR = [PARTITION,resdir,'/'];
data = {};
%% Plot transport and phi radial profile
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
% [data.PSI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'psi');
options.TAVG_0 = 100;
options.TAVG_1 = 1000;
options.NCUT = 5; % Number of cuts for averaging and error estimation
options.NMVA = 1; % Moving average for time traces
% options.ST_FIELD = '\Gamma_x'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x)
options.ST_FIELD = '\phi'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x)
options.INTERP = 0;
options.RESOLUTION = 256;
plot_radial_transport_and_spacetime(data,options);
%% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Options
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
[data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
options.POLARPLOT = 0;
options.CLIMAUTO = 1; % adjust the colormap auto
% options.NAME = '\omega_z';
% options.NAME = 's_{Ey}';
% options.NAME = 'n_i^{NZ}';
% options.NAME = 'Q_x';
% options.NAME = 'n_i';
% options.NAME = 'n_i-n_e';
% options.NAME = 'f_i';
% options.PLAN = 'sx';
% options.TIME = data.Ts5D(end-30:end);
data.EPS = 0.1;
data.a = data.EPS * 2000;
options.RESOLUTION = 256;
create_film(data,options,'.gif')
end
[data.Na00, data.Ts3D] = compile_results_3Da(data.folder,J0,J1,'Na00');
[data.PHI, data.Ts3D] = compile_results_3D(data.folder,J0,J1,'phi');
data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
options.CLIMAUTO = 1;
options.NAME = 'N_i^{00}';
options.RESOLUTION = 256;
fig = photomaton(data,options);
% save_figure(data,fig)
end
if 0
%% Performance profiler
profiler(data)
end
[data.Napjz, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Napjz');
% [data.Napjz, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'Nipjz');
options.FILTER = 0; %filter the 50% time-average of the spectrum from
options.TAVG_2D = 0; %Show a 2D plot of the modes, 50% time averaged
options.TAVG_2D_CTR= 0; %make it contour plot
fig = show_moments_spectrum(data,options);
end
%% Mode evolution
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
[data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
options.KX_TW = [ 0 20]; %kx Growth rate time window
options.KY_TW = [ 0 50]; %ky Growth rate time window
% options.FIELD = 'Ni00';
options.FIELD = 'phi';
fig = mode_growth_meter(data,options);
% save_figure(data,fig,'.png')
end
if 0
%% Study singular values
[data.SV_ky_pj, data.Ts2D] = compile_results_2D(DATADIR,J0,J1,'sv_ky_pj');
nSV = data.grids.Np * data.grids.Nj;
colors_ = jet(nSV);
figure
for i = 1:nSV
sv = squeeze(data.SV_ky_pj(i,:));
semilogy(data.Ts2D,sv,...
'color',colors_(i,:),'DisplayName',['SV ',num2str(i)]);hold on
end
legend('show');