Skip to content
Snippets Groups Projects
Commit 0091adf5 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

update testcases

parent 170534c1
Branches
Tags
No related merge requests found
Showing
with 172 additions and 944 deletions
&BASIC
nrun = 100000000
dt = 0.00075
tmax = 2.0
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 186
Lx = 100
Ny = 186
Ly = 100
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.01
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.01
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 1
mu_y = 1
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 1
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 0.0
ikxZF = 2
ZFamp = 400
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =0
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'ricci'
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.00075
tmax = 0.5
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 186
Lx = 100
Ny = 186
Ly = 100
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.01
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.01
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'linear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 1
mu_y = 1
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 1
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 5.0
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =0
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'ricci'
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.001
tmax = 2.0
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 96
Lx = 100
Ny = 64
Ly = 100
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.05
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.02
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 0.0
ExB_NL_CORRECTION = .false.
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_single_mode'
init_amp = 1000
ikx_init = 3
iky_init = 3
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.001
tmax = 1.0
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 96
Lx = 120
Ny = 32
Ly = 80
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.05
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.02
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 2.0
ExB_NL_CORRECTION = .false.
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_modes'
Nmodes = 1
/
&MODE
I_ = 2
J_ = 2
amp_ = 1000
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.001
tmax = 1.0
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 32
Lx = 120
Ny = 16
Ly = 80
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.05
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.02
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 2.0
ExB_NL_CORRECTION = .true.
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_modes'
Nmodes = 1
/
&MODE
I_ = 2
J_ = 2
amp_ = 1000
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.2
tmax = 300
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 54
Lx = 1257
Ny = 32
Ly = 628
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.5
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 1
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 0.0016
ExB_NL_CORRECTION = .f.
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_modes'
Nmodes = 2
/
&MODE
I_ = -12
J_ = 3
amp_ = 1
/
&MODE
I_ = 14
J_ = 5
amp_ = 1
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 100000000
dt = 0.2
tmax = 300
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 54
Lx = 1257
Ny = 32
Ly = 628
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.5
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 1
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 0.0016
ExB_NL_CORRECTION = .t.
ADIAB_E = .true.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_modes'
Nmodes = 2
/
&MODE
I_ = -12
J_ = 3
amp_ = 1
/
&MODE
I_ = 14
J_ = 5
amp_ = 1
/
&TIME_INTEGRATION
numerical_scheme = 'RK4'
/
&BASIC
nrun = 1!00000000
dt = 100
tmax = 300
maxruntime = 356400
job2load = -1
/
&GRID
pmax = 0
jmax = 0
Nx = 128
Lx = 120!1257
Ny = 64
Ly = 70!628
Nz = 1
SG = .false.
Nexc = 1
/
&GEOMETRY
geom = 'zpinch'!'miller'
q0 = 1.0
shear = 0.0
eps = 0.0
kappa = 1
s_kappa = 0
delta = 0
s_delta = 0
zeta = 0
s_zeta = 0
parallel_bc = 'dirichlet'
shift_y = 0
Npol = 1
PB_PHASE= .false.
/
&DIAGNOSTICS
dtsave_0d = 0.5
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 0.5
dtsave_5d = 100
write_doubleprecision = .true.
write_gamma = .true.
write_hf = .true.
write_phi = .true.
write_Na00 = .true.
write_Napj = .true.
write_dens = .true.
write_temp = .true.
/
&MODEL
LINEARITY = 'nonlinear'
RM_LD_T_EQ= .false.
Na = 1
mu_x = 0
mu_y = 0
N_HD = 4
mu_z = 0
HYP_V = 'hypcoll'
mu_p = 0
mu_j = 0
nu = 0
k_gB = 0
k_cB = 0
lambdaD = 0
beta = 0.0
ExBrate = 0.00
ExB_NL_CORRECTION = .f.
ADIAB_E = .t.
ADIAB_I = .false.
tau_i = 1
MHD_PD = .false.
/
&CLOSURE
hierarchy_closure='truncation'
dmax =-1
nonlinear_closure='truncation'
nmax =-1
/
&SPECIES
name_ = 'ions'
tau_ = 1
sigma_ = 1
q_ = 1
K_N_ = 0
K_T_ = 0
/
&SPECIES
name_ = 'electrons'
tau_ = 1
sigma_ = 0.0233
q_ = -1
K_N_ = 0
K_T_ = 0
/
&COLLISION
collision_model = 'DG'
GK_CO = .false.
INTERSPECIES = .true.
mat_file = '/home/ahoffman/gyacomo/iCa/null'
collision_kcut = 1
/
&INITIAL
INIT_OPT = 'mom00_modes'
Nmodes = 1
/
&MODE
I_ = -4
J_ = 4
amp_ = 100
/
&TIME_INTEGRATION
numerical_scheme = 'EE'
/
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
ADIAB_E = .f. ADIAB_E = .f.
tau_i = 1.0 tau_i = 1.0
ExBrate = 0.5 ExBrate = 0.5
ikxZF = 1
/ /
&CLOSURE &CLOSURE
hierarchy_closure='truncation' hierarchy_closure='truncation'
......
&BASIC &BASIC
nrun = 1!99999999 nrun = 1e6
dt = 0.01 dt = 0.05
tmax = 2 tmax = 200
maxruntime = 72000 maxruntime = 72000
job2load = 0 job2load = 0
/ /
&GRID &GRID
pmax = 2 pmax = 2
jmax = 1 jmax = 1
Nx = 64 Nx = 128
Lx = 120 Lx = 200
Ny = 48 Ny = 48
Ly = 120 Ly = 60
Nz = 16 Nz = 1
SG = .f. SG = .f.
Nexc = 0 Nexc = 1
/ /
&GEOMETRY &GEOMETRY
geom = 's-alpha' geom = 'z-pinch'
!geom = 'miller'
q0 = 1.4
shear = 0.8
eps = 0.18
kappa = 1.0
s_kappa= 0.0
delta = 0.0
s_delta= 0.0
zeta = 0.0
s_zeta = 0.0
parallel_bc = 'dirichlet'
shift_y= 0.0
/ /
&DIAGNOSTICS &DIAGNOSTICS
dtsave_0d = 1 dtsave_0d = 1
dtsave_1d = -1 dtsave_1d = -1
dtsave_2d = -1 dtsave_2d = 0.5
dtsave_3d = 1 dtsave_3d = 0.5
dtsave_5d = 20 dtsave_5d = 100
write_doubleprecision = .f. write_doubleprecision = .f.
write_gamma = .t. write_gamma = .t.
write_hf = .t. write_hf = .t.
...@@ -49,23 +37,26 @@ ...@@ -49,23 +37,26 @@
/ /
&MODEL &MODEL
LINEARITY = 'nonlinear' LINEARITY = 'nonlinear'
Na = 1 ! number of species Na = 2 ! number of species
mu_x = 0.0 mu_x = 1.0
mu_y = 0.0 mu_y = 1.0
N_HD = 4 N_HD = 4
mu_z = 1.0 mu_z = 0.0
HYP_V = 'hypcoll' HYP_V = 'hypcoll'
mu_p = 0.0 mu_p = 0.0
mu_j = 0.0 mu_j = 0.0
nu = 0.05 nu = 0.1
beta = 0.0 beta = 0.0
ADIAB_E = .t. ADIAB_E = .f.
tau_i = 1.0
ExBrate = 0
/ /
&CLOSURE &CLOSURE
hierarchy_closure='truncation' hierarchy_closure='truncation'
dmax = -1 !hierarchy_closure='max_degree'
nonlinear_closure='truncation' dmax = 2
nmax = 0 nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
nmax = -1
/ /
&SPECIES &SPECIES
! ions ! ions
...@@ -73,24 +64,28 @@ ...@@ -73,24 +64,28 @@
tau_ = 1.0 tau_ = 1.0
sigma_= 1.0 sigma_= 1.0
q_ = 1.0 q_ = 1.0
k_N_ = 2.22 k_N_ = 2.0
k_T_ = 6.96 k_T_ = 0.4
/
&SPECIES
! electrons
name_ = 'electrons'
tau_ = 1.0
sigma_= 0.023338
q_ =-1.0
k_N_ = 2.0
k_T_ = 0.4
/ /
&COLLISION &COLLISION
collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau) collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
GK_CO = .f. GK_CO = .t.
INTERSPECIES = .true.
mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5'
/ /
&INITIAL &INITIAL
INIT_OPT = 'blob' INIT_OPT = 'phi' !(phi,blob)
ACT_ON_MODES = 'donothing'
init_background = 0.0 init_background = 0.0
init_noiselvl = 0.005 init_noiselvl = 0.005
iseed = 42 iseed = 42
/ /
&TIME_INTEGRATION &TIME_INTEGRATION
!numerical_scheme = 'RK4' numerical_scheme = 'RK4'
numerical_scheme = 'SSP_RK3'
/ /
&BASIC
nrun = 99999999
dt = 0.01
tmax = 1
maxruntime = 72000
job2load = -1
/
&GRID
pmax = 2
jmax = 1
Nx = 64
Lx = 120
Ny = 48
Ly = 120
Nz = 16
SG = .f.
Nexc = 0
/
&GEOMETRY
geom = 's-alpha'
!geom = 'miller'
q0 = 1.4
shear = 0.8
eps = 0.18
kappa = 1.0
s_kappa= 0.0
delta = 0.0
s_delta= 0.0
zeta = 0.0
s_zeta = 0.0
parallel_bc = 'dirichlet'
shift_y= 0.0
/
&DIAGNOSTICS
dtsave_0d = 1
dtsave_1d = -1
dtsave_2d = -1
dtsave_3d = 1
dtsave_5d = 20
write_doubleprecision = .f.
write_gamma = .t.
write_hf = .t.
write_phi = .t.
write_Na00 = .t.
write_Napj = .t.
write_dens = .t.
write_fvel = .t.
write_temp = .t.
/
&MODEL
LINEARITY = 'nonlinear'
Na = 1 ! number of species
mu_x = 0.0
mu_y = 0.0
N_HD = 4
mu_z = 1.0
HYP_V = 'hypcoll'
mu_p = 0.0
mu_j = 0.0
nu = 0.05
beta = 0.0
ADIAB_E = .t.
/
&CLOSURE
hierarchy_closure='truncation'
dmax = -1
nonlinear_closure='truncation'
nmax = 0
/
&SPECIES
! ions
name_ = 'ions'
tau_ = 1.0
sigma_= 1.0
q_ = 1.0
k_N_ = 2.22
k_T_ = 6.96
/
&COLLISION
collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
GK_CO = .f.
INTERSPECIES = .true.
mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5'
/
&INITIAL
INIT_OPT = 'blob'
ACT_ON_MODES = 'donothing'
init_background = 0.0
init_noiselvl = 0.005
iseed = 42
/
&TIME_INTEGRATION
!numerical_scheme = 'RK4'
numerical_scheme = 'SSP_RK3'
/
&BASIC &BASIC
nrun = 99999999 nrun = 99999999
dt = 0.01 dt = 0.01
tmax = 50 tmax = 5
maxruntime = 72000 maxruntime = 72000
job2load = -1 job2load = -1
/ /
&GRID &GRID
pmax = 2 pmax = 4
jmax = 1 jmax = 1
Nx = 64 Nx = 64
Lx = 120 Lx = 120
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
shift_y= 0.0 shift_y= 0.0
/ /
&DIAGNOSTICS &DIAGNOSTICS
dtsave_0d = 1 dtsave_0d = 0.1
dtsave_1d = -1 dtsave_1d = -1
dtsave_2d = -1 dtsave_2d = -1
dtsave_3d = 1 dtsave_3d = 1
...@@ -91,6 +91,6 @@ ...@@ -91,6 +91,6 @@
iseed = 42 iseed = 42
/ /
&TIME_INTEGRATION &TIME_INTEGRATION
!numerical_scheme = 'RK4' numerical_scheme = 'RK4'
numerical_scheme = 'SSP_RK3' !numerical_scheme = 'SSP_RK3'
/ /
import sys
import h5py
import numpy as np
import matplotlib.pyplot as plt
def load_transport_data(file_path):
with h5py.File(file_path, 'r') as file:
# Check if the group exists
group_path = "/data/var0d"
if group_path not in file:
print(f"Group '{group_path}' not found in the HDF5 file.")
return None
group = file[group_path]
array_data = {key: np.array(group[key]) for key in group.keys()}
return array_data
def plot_time_traces(time, data, key):
plt.plot(time, data, label=key)
plt.xlabel('Time')
plt.ylabel('Value')
plt.legend()
plt.show()
def read_namelist_from_h5(file_path, namelist_path):
with h5py.File(file_path, 'r') as h5_file:
# Check if the namelist path exists
if namelist_path not in h5_file:
print(f"Namelist path '{namelist_path}' not found in the HDF5 file.")
return None
namelist_group = h5_file[namelist_path]
# Create a dictionary to store the namelist parameters
namelist_params = {}
# Iterate through items in the group
for key, value in namelist_group.items():
# Check if the item is a dataset (parameter)
if isinstance(value, h5py.Dataset):
namelist_params[key] = value[()] # Add the parameter to the dictionary
return namelist_params
# Check for the correct number of command-line arguments
if len(sys.argv) != 2:
print("Usage: python script.py <file_path>")
sys.exit(1)
# Get file path from command-line arguments
file_path = sys.argv[1]
namelist_params = read_namelist_from_h5(file_path, "/files/STDIN.00")
# Print the namelist parameters
if namelist_params is not None:
print("Namelist Parameters:")
for key, value in namelist_params.items():
print(f"{key}: {value}")
# Load all data in the group /data/var0d
loaded_data = load_transport_data(file_path)
time = loaded_data['time']
del loaded_data['time']
del loaded_data['cstep']
# Plot it
if loaded_data is not None:
# Print all arrays in the loaded group
print(f"Arrays loaded from '{file_path}' in group '/data/var0d':")
for key, value in loaded_data.items():
half_length = len(value) // 2
trace = value[:half_length]
plot_time_traces(time,trace,key)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment