diff --git a/matlab/plot/spectrum_1D.m b/matlab/plot/spectrum_1D.m index dea4c3f23c09af33dc4f51168c6d359fefe7daad..f9ddf9090926bcc556c510d0258082d3e59a1759 100644 --- a/matlab/plot/spectrum_1D.m +++ b/matlab/plot/spectrum_1D.m @@ -28,14 +28,14 @@ end PLOT2D = 0; switch options.COMPXY case 'avg' - compx = @(x) mean(x,1); - compy = @(x) mean(x,2); + compx = @(x) mean(x,2); + compy = @(x) mean(x,1); case 'sum' - compx = @(x) sum(x,1); - compy = @(x) sum(x,2); + compx = @(x) sum(x,2); + compy = @(x) sum(x,1); case 'max' - compx = @(x) max(x,1); - compy = @(x) max(x,2); + compx = @(x) max(x,2); + compy = @(x) max(x,1); otherwise compx = @(x) x(:,:); compy = @(x) x(:,:); @@ -43,11 +43,11 @@ switch options.COMPXY end if ~PLOT2D - set(gcf, 'Position', [20 50 5000 2000]) + set(gcf, 'Position', [20 50 1200 500]) subplot(1,2,1) - k = data.kx; - xname = '$k_x$'; + k = data.ky; + xname = '$k_y$'; nmax = ceil(data.Nkx*2/3); shiftx = @(x) x;%(1:nmax); @@ -55,7 +55,7 @@ if ~PLOT2D switch options.COMPT case 'avg' it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); - Gk = compy(abs(mean(toplot.FIELD(:,:,it0:it1),3))); + Gk = compx(abs(mean(toplot.FIELD(:,:,:),3))); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); @@ -90,13 +90,13 @@ if ~PLOT2D subplot(1,2,2) - k = data.ky; - xname = '$k_y$'; + k = data.kx; + xname = '$k_x$'; nmax = floor(data.Nky/2*2/3); switch options.COMPT case 'avg' - it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); - Gk = compx(abs(mean(toplot.FIELD(:,:,it0:it1),3)))'; +% it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); + Gk = compy(abs(mean(toplot.FIELD(:,:,:),3)))'; Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); @@ -109,7 +109,7 @@ if ~PLOT2D plot(X,Y,'DisplayName','t-averaged') otherwise for it = 1:numel(toplot.FRAMES) - Gk = compx(abs(toplot.FIELD(:,:,toplot.FRAMES(it)))); + Gk = compx(abs(toplot.FIELD(:,:,it))); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); @@ -128,8 +128,8 @@ if ~PLOT2D legend('show','Location','eastoutside'); xlabel(xname); ylabel(yname) else - it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); - Gk = mean(abs(toplot.FIELD(:,:,it0:it1)),3); +% it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); + Gk = mean(abs(toplot.FIELD(:,:,:)),3); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); diff --git a/src/diagnose.F90 b/src/diagnose.F90 index 894263d077b03da8c35ad6a62feff07140f65313..c1b81f2558712578a2e368633aab61ab1726c6be 100644 --- a/src/diagnose.F90 +++ b/src/diagnose.F90 @@ -25,13 +25,13 @@ SUBROUTINE diagnose(kstep) IF (my_id .EQ. 0) CALL display_h_min_s(finish-start) END IF !! Specific diagnostic calls - ! CALL diagnose_full(kstep) - IF(nsave_5d .GT. 0) CALL diagnose_moments(kstep) - IF(nsave_3d .GT. 0) CALL diagnose_momspectrum(kstep) - IF(nsave_3d .GT. 0) CALL diagnose_fields(kstep) - IF(nsave_0d .GT. 0) CALL diagnose_profiler(kstep) - IF(nsave_0d .GT. 0) CALL diagnose_gridgeom(kstep) - IF(nsave_0d .GT. 0) CALL diagnose_timetraces(kstep) + CALL diagnose_full(kstep) + ! IF(nsave_5d .GT. 0) CALL diagnose_moments(kstep) + ! IF(nsave_3d .GT. 0) CALL diagnose_momspectrum(kstep) + ! IF(nsave_3d .GT. 0) CALL diagnose_fields(kstep) + ! IF(nsave_0d .GT. 0) CALL diagnose_profiler(kstep) + ! IF(nsave_0d .GT. 0) CALL diagnose_gridgeom(kstep) + ! IF(nsave_0d .GT. 0) CALL diagnose_timetraces(kstep) CALL cpu_time(t1_diag); tc_diag = tc_diag + (t1_diag - t0_diag) @@ -107,10 +107,10 @@ SUBROUTINE init_outfile(comm,file0,file,fid) END SUBROUTINE init_outfile !! Auxiliary routines hidden in headers -! INCLUDE 'diag_headers/diagnose_full.h' -INCLUDE 'diag_headers/diagnose_moments.h' -INCLUDE 'diag_headers/diagnose_momspectrum.h' -INCLUDE 'diag_headers/diagnose_fields.h' -INCLUDE 'diag_headers/diagnose_profiler.h' -INCLUDE 'diag_headers/diagnose_gridgeom.h' -INCLUDE 'diag_headers/diagnose_timetraces.h' +INCLUDE 'diag_headers/diagnose_full.h' +! INCLUDE 'diag_headers/diagnose_moments.h' +! INCLUDE 'diag_headers/diagnose_momspectrum.h' +! INCLUDE 'diag_headers/diagnose_fields.h' +! INCLUDE 'diag_headers/diagnose_profiler.h' +! INCLUDE 'diag_headers/diagnose_gridgeom.h' +! INCLUDE 'diag_headers/diagnose_timetraces.h' diff --git a/wk/analysis_3D.m b/wk/analysis_3D.m index 07f4a3d06a737cf8ecb857abad502c3e97de4024..0b8fef01092ebde42979981ffd21b4ccbb47111f 100644 --- a/wk/analysis_3D.m +++ b/wk/analysis_3D.m @@ -53,7 +53,7 @@ options.PLAN = 'xy'; % options.PLAN = 'sx'; options.COMP = 9; % options.TIME = dat.Ts5D; -options.TIME = 300:1:4500; +options.TIME = 900:1:990; data.EPS = 0.1; data.a = data.EPS * 2000; create_film(data,options,'.gif') @@ -62,20 +62,20 @@ end if 0 %% 2D snapshots % Options -options.INTERP = 0; +options.INTERP = 1; options.POLARPLOT = 0; options.AXISEQUAL = 1; -options.NAME = '\phi'; +% options.NAME = '\phi'; % options.NAME = 'n_i'; -% options.NAME = 'N_i^{00}'; +options.NAME = 'N_i^{00}'; % options.NAME = 'T_i'; % options.NAME = '\Gamma_x'; % options.NAME = 'k^2n_e'; -options.PLAN = 'kxky'; +options.PLAN = 'xy'; % options.NAME = 'f_i'; % options.PLAN = 'sx'; options.COMP = 'avg'; -options.TIME = [300 350 400]; +options.TIME = [900 923 927 990]; data.a = data.EPS * 2e3; fig = photomaton(data,options); save_figure(data,fig) @@ -114,11 +114,11 @@ if 0 %% Hermite-Laguerre spectrum % options.TIME = 'avg'; options.P2J = 0; -options.ST = 0; +options.ST = 1; options.PLOT_TYPE = 'space-time'; -options.NORMALIZED = 0; +options.NORMALIZED = 1; options.JOBNUM = 0; -options.TIME = [300 500]; +options.TIME = [900 950]; options.specie = 'i'; options.compz = 'avg'; fig = show_moments_spectrum(data,options); @@ -128,15 +128,15 @@ end if 0 %% Time averaged spectrum -options.TIME = 1000:5000; -options.NORM = 0; +options.TIME = 1000:1200; +options.NORM =1; options.NAME = '\phi'; -options.NAME = 'n_i'; -options.NAME ='\Gamma_x'; +% options.NAME = 'n_i'; +% options.NAME ='\Gamma_x'; options.PLAN = 'kxky'; options.COMPZ = 'avg'; options.OK = 0; -options.COMPXY = 0; +options.COMPXY = 'avg'; options.COMPT = 'avg'; options.PLOT = 'semilogy'; fig = spectrum_1D(data,options); diff --git a/wk/analysis_header.m b/wk/analysis_header.m index 012bd79ef5a127ff3c433c0e7b135b93b9211238..a97d0de751808b8611eba06dafab2de6d4f5b6c0 100644 --- a/wk/analysis_header.m +++ b/wk/analysis_header.m @@ -6,7 +6,7 @@ outfile =''; outfile =''; outfile =''; % outfile ='shearless_cyclone/128x128x16xdmax_6_L_120_CBC_1.0'; -outfile ='shearless_cyclone/128x128x16xdmax_8_L_120_CBC_1.0'; +outfile ='shearless_cyclone/128x128x16xdmax_L_120_CBC_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';