From ece2a942ad223e658cbc6bdb85e6a2ebc71400d6 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 20 Sep 2024 10:17:40 +0100 Subject: [PATCH] Fix source indexing when loading advection velocity for post-processing --- moment_kinetics/src/load_data.jl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/moment_kinetics/src/load_data.jl b/moment_kinetics/src/load_data.jl index 1c8aaaca0..66fbe2d7d 100644 --- a/moment_kinetics/src/load_data.jl +++ b/moment_kinetics/src/load_data.jl @@ -4406,10 +4406,10 @@ function get_variable(run_info, variable_name; normalize_advection_speed_shape=t dvth_dz=dvth_dz[:,:,:,it], dqpar_dz=dqpar_dz[:,:,:,it], vth=vth[:,:,:,it], - external_source_amplitude=external_source_amplitude[:,:,n_sources,it], - external_source_density_amplitude=external_source_density_amplitude[:,:,n_sources,it], - external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,n_sources,it], - external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,n_sources,it]), + external_source_amplitude=external_source_amplitude[:,:,:,it], + external_source_density_amplitude=external_source_density_amplitude[:,:,:,it], + external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,:,it], + external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,:,it]), evolve_density=run_info.evolve_density, evolve_upar=run_info.evolve_upar, evolve_ppar=run_info.evolve_ppar) @@ -4527,10 +4527,10 @@ function get_variable(run_info, variable_name; normalize_advection_speed_shape=t dppar_dz=dppar_dz[:,:,it], dqpar_dz=dqpar_dz[:,:,it], dvth_dz=dvth_dz[:,:,it], - external_source_amplitude=external_source_amplitude[:,:,n_sources,it], - external_source_density_amplitude=external_source_density_amplitude[:,:,n_sources,it], - external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,n_sources,it], - external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,n_sources,it]),) + external_source_amplitude=external_source_amplitude[:,:,:,it], + external_source_density_amplitude=external_source_density_amplitude[:,:,:,it], + external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,:,it], + external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,:,it]),) @views update_electron_speed_vpa!(advect, density[:,:,it], upar[:,:,it], ppar[:,:,it], moments, run_info.vpa.grid, run_info.external_source_settings.electron) @@ -4665,10 +4665,10 @@ function get_variable(run_info, variable_name; normalize_advection_speed_shape=t dvth_dz=dvth_dz[:,:,:,it], dqz_dz=dqz_dz[:,:,:,it], vth=vth[:,:,:,it], - external_source_amplitude=external_source_amplitude[:,:,n_sources,it], - external_source_density_amplitude=external_source_density_amplitude[:,:,n_sources,it], - external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,n_sources,it], - external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,n_sources,it]), + external_source_amplitude=external_source_amplitude[:,:,:,it], + external_source_density_amplitude=external_source_density_amplitude[:,:,:,it], + external_source_momentum_amplitude=external_source_momentum_amplitude[:,:,:,it], + external_source_pressure_amplitude=external_source_pressure_amplitude[:,:,:,it]), evolve_density=run_info.evolve_density, evolve_upar=run_info.evolve_upar, evolve_ppar=run_info.evolve_ppar)