Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
a675b01c
Commit
a675b01c
authored
9 months ago
by
Antoine Cyril David Hoffmann
🌱
Browse files
Options
Downloads
Patches
Plain Diff
scripts save
parent
9d6a3847
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/load/load_3Da_data.m
+9
-6
9 additions, 6 deletions
matlab/load/load_3Da_data.m
wk/fast_analysis.m
+19
-17
19 additions, 17 deletions
wk/fast_analysis.m
wk/p3_geom_scan_analysis.m
+10
-2
10 additions, 2 deletions
wk/p3_geom_scan_analysis.m
with
38 additions
and
25 deletions
matlab/load/load_3Da_data.m
+
9
−
6
View file @
a675b01c
...
...
@@ -21,21 +21,24 @@ function [ data, time, dt ] = load_3Da_data( filename, variablename )
cmpx
=
0
;
end
% add a dimension if nz=1 or na=1
%
if Na == 1
%
sz = [1 sz];
%
end
%
if Na == 1
%
sz = [1 sz];
%
end
if
Nz
==
1
sz
=
[
sz
1
];
end
if
Np
==
1
sz
=
[
sz
1
];
end
% add time dimension
data
=
zeros
([
sz
numel
(
time
)]);
sz_t
=
size
(
data
(:,:,:,:,
1
));
for
it
=
1
:
numel
(
time
)
tmp
=
h5read
(
filename
,[
'/data/var3d/'
,
variablename
,
'/'
,
num2str
(
cstart
+
it
,
'%06d'
)]);
if
cmpx
data
(:,:,:,:,
it
)
=
reshape
(
tmp
.
real
,
sz
)
+
1
i
*
reshape
(
tmp
.
imaginary
,
sz
);
data
(:,:,:,:,
it
)
=
reshape
(
tmp
.
real
,
sz
_t
)
+
1
i
*
reshape
(
tmp
.
imaginary
,
sz
_t
);
else
data
(:,:,:,:,
it
)
=
reshape
(
tmp
,
sz
);
data
(:,:,:,:,
it
)
=
reshape
(
tmp
,
sz
_t
);
end
end
...
...
This diff is collapsed.
Click to expand it.
wk/fast_analysis.m
+
19
−
17
View file @
a675b01c
...
...
@@ -21,11 +21,13 @@ default_plots_options
% resdir = '/Npol_study/RF_CBC_s0_beta0/Npol_11';
% Triangularity paper
%
PARTITION = '/misc/gyacomo23_outputs/triangularity_paper/';
PARTITION
=
'/misc/gyacomo23_outputs/triangularity_paper/'
;
% Nominal parameters
% resdir = 'ion_scale/3x2x256x64x32/0T';
% resdir = 'ion_scale/5x3x256x64x32/0T';
% resdir = 'ion_scale/5x3x192x48x24/0T';
resdir
=
'ion_scale/5x3x192x48x24/0T'
;
% resdir = 'ion_scale/5x3x192x48x24/no_gradN/0T';
% resdir = 'ion_scale/5x3x192x48x24/lower_grad/PT';
% resdir = 'ion_scale/9x5x256x64x32/0T';
% resdir = 'ion_scale/restart/5x3x256x64x32/0T';
% resdir = 'ion_scale/restart/9x5x192x48x24/0T';
...
...
@@ -52,12 +54,12 @@ default_plots_options
% resdir = '6x2x32_5x3_Lx_120_Ly_8.1955_q0_4.8_e_0.3_s_2.5_mil__kN_1.7_kT_5.2_nu_2.0e-02_DGGK/';
% resdir = '6x2x32_17x9_Lx_120_Ly_8.1955_q0_4.8_e_0.3_s_2.5_mil__kN_1.7_kT_5.2_nu_2.0e-02_DGGK/';
%
DATADIR = [PARTITION,resdir,'/'];
DATADIR
=
[
PARTITION
,
resdir
,
'/'
];
% DATADIR = '/home/ahoffman/gyacomo/simulations/ralf/2D_Zpinch_ITG/3x2x64x48x1_no_curvB/';
% DATADIR = '/home/ahoffman/gyacomo/simulations/ralf/3D_Zpinch_ITG/3x2x64x48x16_nocurvB/';
% DATADIR = '/home/ahoffman/gyacomo/simulations/ralf/3D_Zpinch_ITG/3x2x64x48x16_nocurvB_-14/';
DATADIR
=
'/home/ahoffman/gyacomo/simulations/ricci/'
;
%
read_flux_out_XX(DATADIR,1,1);
%
DATADIR = '/home/ahoffman/gyacomo/simulations/ricci
_UHD
/';
read_flux_out_XX
(
DATADIR
,
1
,
1
);
%%
J0
=
00
;
J1
=
10
;
...
...
@@ -77,12 +79,12 @@ end
if
1
%%
[
data
.
TEMP
,
data
.
Ts3D
]
=
compile_results_3Da
(
data
.
folder
,
J0
,
J1
,
'temp'
);
[
data
.
UPAR
,
data
.
Ts3D
]
=
compile_results_3Da
(
data
.
folder
,
J0
,
J1
,
'upar'
);
[
data
.
UPER
,
data
.
Ts3D
]
=
compile_results_3Da
(
data
.
folder
,
J0
,
J1
,
'uper'
);
%
[data.UPAR, data.Ts3D] = compile_results_3Da(data.folder,J0,J1,'upar');
%
[data.UPER, data.Ts3D] = compile_results_3Da(data.folder,J0,J1,'uper');
[
data
.
DENS
,
data
.
Ts3D
]
=
compile_results_3Da
(
data
.
folder
,
J0
,
J1
,
'dens'
);
data
.
TEMP_I
=
reshape
(
data
.
TEMP
(
1
,:,:,:,:),
data
.
grids
.
Nky
,
data
.
grids
.
Nkx
,
data
.
grids
.
Nz
,
numel
(
data
.
Ts3D
));
data
.
UPAR_I
=
reshape
(
data
.
UPAR
(
1
,:,:,:,:),
data
.
grids
.
Nky
,
data
.
grids
.
Nkx
,
data
.
grids
.
Nz
,
numel
(
data
.
Ts3D
));
data
.
UPER_I
=
reshape
(
data
.
UPER
(
1
,:,:,:,:),
data
.
grids
.
Nky
,
data
.
grids
.
Nkx
,
data
.
grids
.
Nz
,
numel
(
data
.
Ts3D
));
%
data.UPAR_I = reshape(data.UPAR(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
%
data.UPER_I = reshape(data.UPER(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
data
.
DENS_I
=
reshape
(
data
.
DENS
(
1
,:,:,:,:),
data
.
grids
.
Nky
,
data
.
grids
.
Nkx
,
data
.
grids
.
Nz
,
numel
(
data
.
Ts3D
));
data
.
Ni00
=
reshape
(
data
.
Na00
(
1
,:,:,:,:),
data
.
grids
.
Nky
,
data
.
grids
.
Nkx
,
data
.
grids
.
Nz
,
numel
(
data
.
Ts3D
));
if
data
.
inputs
.
Na
>
1
...
...
@@ -125,8 +127,8 @@ options.NORMALIZE = 0;
options
.
LOGSCALE
=
0
;
options
.
CLIMAUTO
=
1
;
options
.
TAVG
=
1
;
%
options.NAME = ['N_i^{00}'];
options
.
NAME
=
'n_i'
;
options
.
NAME
=
[
'N_i^{00}'
];
%
options.NAME = 'n_i';
% options.NAME = 'upar_i';
% options.NAME = 'T_i';
% options.NAME = 'Q_{xi}';
...
...
@@ -143,7 +145,7 @@ options.PLAN = 'xy'; options.COMP =floor(data.grids.Nz/2)+1;
% options.PLAN = 'xz'; options.COMP ='avg';
% options.COMP ='avg';
options
.
XYZ
=
[
-
11
20
-
2
];
options
.
TIME
=
[
0.
5
];
options
.
TAVG
=
0
;
options
.
TIME
=
[
0.
0
0.1
0.2
];
options
.
TAVG
=
0
;
% options.TIME = [50:500]; options.TAVG = 1;
options
.
RESOLUTION
=
256
;
fig
=
photomaton
(
data
,
options
);
...
...
@@ -213,8 +215,8 @@ end
if
0
%% Hermite-Laguerre spectrum
[
data
.
Napjz
,
data
.
Ts3D
]
=
compile_results_3Da
(
DATADIR
,
J0
,
J1
,
'Napjz'
);
data
.
Napjz
(
1
,
3
,
1
,:,:)
=
data
.
Napjz
(
1
,
3
,
1
,:,:)
*
data
.
inputs
.
tau
(
1
);
data
.
Napjz
(
1
,
1
,
2
,:,:)
=
data
.
Napjz
(
1
,
1
,
2
,:,:)
*
data
.
inputs
.
tau
(
1
);
%
data.Napjz(1,3,1,:,:) = data.Napjz(1,3,1,:,:)*data.inputs.tau(1);
%
data.Napjz(1,1,2,:,:) = data.Napjz(1,1,2,:,:)*data.inputs.tau(1);
% [data.Napjz, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'Nipjz');
options
.
ST
=
1
;
options
.
NORMALIZED
=
0
;
...
...
@@ -222,7 +224,7 @@ options.LOGSCALE = 1;
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
options
.
TWINDOW
=
[
2
0
20
];
options
.
TWINDOW
=
[
0
20
];
fig
=
show_moments_spectrum
(
data
,
options
);
end
...
...
@@ -289,9 +291,9 @@ options.CLIMAUTO = 1; % adjust the colormap auto
% options.NAME = '\phi';
% options.NAME = 'w_{Ez}';
% options.NAME = '\psi';
options
.
NAME
=
'T_i'
;
%
options.NAME = 'T_i';
% options.NAME = '\phi^{NZ}';
%
options.NAME = ['N_i^{00}'];
options
.
NAME
=
[
'N_i^{00}'
];
% options.NAME = ['N_e^{00}'];
options
.
PLAN
=
'xy'
;
options
.
COMP
=
floor
(
data
.
grids
.
Nz
/
2
)
+
1
;
% options.PLAN = 'xz'; options.COMP ='avg';
...
...
This diff is collapsed.
Click to expand it.
wk/p3_geom_scan_analysis.m
+
10
−
2
View file @
a675b01c
...
...
@@ -14,7 +14,7 @@ GETFLUXSURFACE = 0;
% partition= '../results/paper_3/';
% Get the scan directory
switch
1
switch
5
case
1
% delta K_T tau=1
casename
=
'DIIID rho95 $\tau=1$'
;
partition
=
'/misc/gyacomo23_outputs/paper_3/DIIID_tau_1_rho95_geom_scan/'
;
...
...
@@ -53,6 +53,14 @@ switch 1
nml1
=
'SPECIES'
;
pnam1
=
'$R_0/L_T\times T_i/T_e$'
;
attr1
=
'k_T_'
;
pref1
=
0
;
scale1
=
500
;
nml2
=
'SPECIES'
;
pnam2
=
'$R_0/L_N$'
;
attr2
=
'k_N_'
;
pref2
=
5
;
scale2
=
1.0
;
t1
=
100
;
t2
=
150
;
zfactor
=
1
;
case
5
% KEM
casename
=
'KEM DIII-D'
;
partition
=
'/misc/gyacomo23_outputs/triangularity_paper/ion_scale/5x3x192x48x24/no_gradN/scan_failed/'
;
% partition= '/misc/gyacomo23_outputs/triangularity_paper/ion_scale/5x3x192x48x24/no_gradN/scan/';
scandir
=
'.'
;
scanname
=
' '
;
queuu
nml1
=
'GEOMETRY'
;
pnam1
=
'$\delta$'
;
attr1
=
'delta'
;
pref1
=
0
;
scale1
=
1
;
nml2
=
'SPECIES'
;
pnam2
=
'$\kappa_T$'
;
attr2
=
'K_T_'
;
pref2
=
0
;
scale2
=
1
;
t1
=
275
;
t2
=
320
;
zfactor
=
1
;
end
scanname
=
[
casename
scanname
];
scandir
=
[
partition
,
scandir
,
'/'
];
...
...
@@ -77,7 +85,7 @@ for i = 1:length(contents)
system
([
MVIN
,
PY3
,
MVOUT
]);
end
% Get parameters
param
=
read_namelist
([
subdir
,
'/fort_0
0
.90'
]);
param
=
read_namelist
([
subdir
,
'/fort_0
7
.90'
]);
para1
=
[
para1
param
.
(
nml1
)
.
(
attr1
)];
para2
=
[
para2
param
.
(
nml2
)
.
(
attr2
)];
% Now you are in the subdirectory. You can perform operations here.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment