Skip to content
Snippets Groups Projects
Commit f6e662f4 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann
Browse files

scripts update

parent 5931c32a
No related branches found
No related tags found
No related merge requests found
function create_film(DATA,OPTIONS,format) function create_film(DATA,OPTIONS,format)
%% Plot options %% Plot options
FPS = 30; DELAY = 1/FPS; FPS = 16; DELAY = 1/FPS;
BWR = 1; NORMALIZED = 1; BWR = 1; NORMALIZED = 1;
if ~strcmp(OPTIONS.PLAN,'sx') if ~strcmp(OPTIONS.PLAN,'sx')
T = DATA.Ts3D; T = DATA.Ts3D;
......
...@@ -83,9 +83,9 @@ mvm = @(x) movmean(x,OPTIONS.NMVA); ...@@ -83,9 +83,9 @@ mvm = @(x) movmean(x,OPTIONS.NMVA);
toplot = process_field(DATA,OPTIONS); toplot = process_field(DATA,OPTIONS);
f2plot = toplot.FIELD; f2plot = toplot.FIELD;
clim = max(max(max(abs(plt(f2plot(:,:,its3D:ite3D)))))); clim = max(max(max(abs(plt(f2plot(:,:,:))))));
subplot(313) subplot(313)
[TY,TX] = meshgrid(DATA.x,DATA.Ts3D); [TY,TX] = meshgrid(DATA.x,DATA.Ts3D(toplot.FRAMES));
pclr = pcolor(TX,TY,squeeze(plt(f2plot))'); pclr = pcolor(TX,TY,squeeze(plt(f2plot))');
set(pclr, 'edgecolor','none'); set(pclr, 'edgecolor','none');
legend(['$\langle ',OPTIONS.ST_FIELD,' \rangle_{y,z}$']) %colorbar; legend(['$\langle ',OPTIONS.ST_FIELD,' \rangle_{y,z}$']) %colorbar;
...@@ -103,14 +103,14 @@ mvm = @(x) movmean(x,OPTIONS.NMVA); ...@@ -103,14 +103,14 @@ mvm = @(x) movmean(x,OPTIONS.NMVA);
%% Zonal vs NZonal energies %% Zonal vs NZonal energies
subplot(312) subplot(312)
it0 = 1; itend = Ns3D; it0 = 1; itend = Ns3D;
trange = it0:itend; trange = toplot.FRAMES;
plt1 = @(x) x;%-x(1); plt1 = @(x) x;%-x(1);
plt2 = @(x) x./max((x(its3D:ite3D))); plt2 = @(x) x./max((x(:)));
toplot = sum(squeeze(plt(f2plot)).^2,1); %ST from before toplot = sum(squeeze(plt(f2plot)).^2,1); %ST from before
% plty = @(x) x(500:end)./max(squeeze(x(500:end))); % plty = @(x) x(500:end)./max(squeeze(x(500:end)));
yyaxis left yyaxis left
% plot(plt1(DATA.Ts3D(trange)),plt2(E_Zmode_SK(trange)),'DisplayName','$k_{zf}^2|\phi_{kzf}|^2$'); % plot(plt1(DATA.Ts3D(trange)),plt2(E_Zmode_SK(trange)),'DisplayName','$k_{zf}^2|\phi_{kzf}|^2$');
plot(plt1(DATA.Ts3D(trange)),plt2(toplot(trange)),'DisplayName','Sum $A^2$'); plot(plt1(DATA.Ts3D(trange)),plt2(toplot(:)),'DisplayName','Sum $A^2$');
ylim([-0.1, 1.5]); ylabel('$E_{Z}$') ylim([-0.1, 1.5]); ylabel('$E_{Z}$')
yyaxis right yyaxis right
plot(plt1(DATA.Ts3D(trange)),plt2(E_NZmode_SK(trange)),'DisplayName','$(1+k^2)|\phi^k|^2$'); plot(plt1(DATA.Ts3D(trange)),plt2(E_NZmode_SK(trange)),'DisplayName','$(1+k^2)|\phi^k|^2$');
......
...@@ -10,7 +10,7 @@ system(['mkdir -p ',MISCDIR]); ...@@ -10,7 +10,7 @@ system(['mkdir -p ',MISCDIR]);
CMD = ['rsync ', LOCALDIR,'outputs* ',MISCDIR]; disp(CMD); CMD = ['rsync ', LOCALDIR,'outputs* ',MISCDIR]; disp(CMD);
system(CMD); system(CMD);
% Load outputs from jobnummin up to jobnummax % Load outputs from jobnummin up to jobnummax
JOBNUMMIN = 00; JOBNUMMAX = 08; JOBNUMMIN = 07; JOBNUMMAX = 20;
data = compile_results(MISCDIR,JOBNUMMIN,JOBNUMMAX); %Compile the results from first output found to JOBNUMMAX if existing data = compile_results(MISCDIR,JOBNUMMIN,JOBNUMMAX); %Compile the results from first output found to JOBNUMMAX if existing
...@@ -21,7 +21,7 @@ FMT = '.fig'; ...@@ -21,7 +21,7 @@ FMT = '.fig';
if 1 if 1
%% Space time diagramm (fig 11 Ivanov 2020) %% Space time diagramm (fig 11 Ivanov 2020)
options.TAVG_0 = 0.8*data.Ts3D(end); options.TAVG_0 = 0.98*data.Ts3D(end);
options.TAVG_1 = data.Ts3D(end); % Averaging times duration options.TAVG_1 = data.Ts3D(end); % Averaging times duration
options.NMVA = 1; % Moving average for time traces 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 = '\Gamma_x'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x)
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
if 0 if 0
%% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Options % Options
options.INTERP = 0; options.INTERP = 1;
options.POLARPLOT = 0; options.POLARPLOT = 0;
options.NAME = '\phi'; options.NAME = '\phi';
% options.NAME = 'N_i^{00}'; % options.NAME = 'N_i^{00}';
...@@ -48,12 +48,12 @@ options.NAME = '\phi'; ...@@ -48,12 +48,12 @@ options.NAME = '\phi';
% options.NAME = 'n_i^{NZ}'; % options.NAME = 'n_i^{NZ}';
% options.NAME = '\Gamma_x'; % options.NAME = '\Gamma_x';
% options.NAME = 'n_i'; % options.NAME = 'n_i';
options.PLAN = 'xy'; options.PLAN = 'xz';
% options.NAME = 'f_e'; % options.NAME = 'f_e';
% options.PLAN = 'sx'; % options.PLAN = 'sx';
options.COMP = 9; options.COMP = 9;
% options.TIME = dat.Ts5D; % options.TIME = dat.Ts5D;
options.TIME = 920:1:1100; options.TIME = 920:0.1:1170;
data.EPS = 0.1; data.EPS = 0.1;
data.a = data.EPS * 2000; data.a = data.EPS * 2000;
create_film(data,options,'.gif') create_film(data,options,'.gif')
...@@ -62,12 +62,12 @@ end ...@@ -62,12 +62,12 @@ end
if 0 if 0
%% 2D snapshots %% 2D snapshots
% Options % Options
options.INTERP = 1; options.INTERP = 0;
options.POLARPLOT = 0; options.POLARPLOT = 0;
options.AXISEQUAL = 1; options.AXISEQUAL = 1;
% options.NAME = '\phi'; options.NAME = '\phi';
% options.NAME = 'n_i'; % options.NAME = 'n_i';
options.NAME = 'N_i^{00}'; % options.NAME = 'N_i^{00}';
% options.NAME = 'T_i'; % options.NAME = 'T_i';
% options.NAME = '\Gamma_x'; % options.NAME = '\Gamma_x';
% options.NAME = 'k^2n_e'; % options.NAME = 'k^2n_e';
...@@ -75,7 +75,7 @@ options.PLAN = 'xz'; ...@@ -75,7 +75,7 @@ options.PLAN = 'xz';
% options.NAME = 'f_i'; % options.NAME = 'f_i';
% options.PLAN = 'sx'; % options.PLAN = 'sx';
options.COMP = 9; options.COMP = 9;
options.TIME = [900 1000 1100]; options.TIME = [1100 1150];
data.a = data.EPS * 2e3; data.a = data.EPS * 2e3;
fig = photomaton(data,options); fig = photomaton(data,options);
save_figure(data,fig) save_figure(data,fig)
...@@ -113,12 +113,12 @@ end ...@@ -113,12 +113,12 @@ end
if 0 if 0
%% Hermite-Laguerre spectrum %% Hermite-Laguerre spectrum
% options.TIME = 'avg'; % options.TIME = 'avg';
options.P2J = 0; options.P2J = 1;
options.ST = 1; options.ST = 1;
options.PLOT_TYPE = 'space-time'; options.PLOT_TYPE = 'space-time';
options.NORMALIZED = 1; options.NORMALIZED = 1;
options.JOBNUM = 0; options.JOBNUM = 0;
options.TIME = [900 950]; options.TIME = [1100 1150];
options.specie = 'i'; options.specie = 'i';
options.compz = 'avg'; options.compz = 'avg';
fig = show_moments_spectrum(data,options); fig = show_moments_spectrum(data,options);
......
% Directory of the code "mypathtoHeLaZ/HeLaZ/"
helazdir = '/home/ahoffman/HeLaZ/';
% Directory of the simulation (from results)
% if 1% Local results
outfile ='';
outfile ='';
outfile ='';
outfile ='shearless_cyclone/128x128x16xdmax_6_L_120_CBC_1.0';
% outfile ='shearless_cyclone/128x128x16xdmax_L_120_CBC_1.0';
% outfile ='shearless_cyclone/180x180x20x4x2_L_120_CBC_0.8_to_1.0';
% outfile ='quick_run/CLOS_1_64x64_5x3_L_120_kN_2.0_kT_0.5_nu_1e-01_SGGK';
% outfile ='pedestal/64x64x16x2x1_L_300_LnT_20_nu_0.1';
% outfile ='quick_run/32x32x16_5x3_L_300_q0_2.5_e_0.18_kN_20_kT_20_nu_1e-01_DGGK';
% outfile ='shearless_cyclone/128x128x16x8x4_L_120_CTC_1.0/';
% outfile ='shearless_cyclone/180x180x20x4x2_L_120_CBC_0.8_to_1.0/';
% outfile ='pedestal/128x128x16x4x2_L_120_LnT_40_nuDG_0.1';
run analysis_HeLaZ
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment