stella_io Module


Variables

Type Visibility Attributes Name Initial
real, private, parameter :: zero = epsilon(0.0)

Subroutines

public subroutine init_stella_io(restart, git_commit, git_date)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: restart

Is this run a restart?

character(len=40), intent(in) :: git_commit
character(len=10), intent(in) :: git_date

private subroutine write_grids(file_id)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

NetCDF ID of the file

public subroutine finish_stella_io()

Arguments

None

private subroutine save_input(file_id)

Save the input file in the NetCDF file

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

NetCDF ID of the file to write to

private subroutine define_vars(git_commit, git_date)

Arguments

Type IntentOptional Attributes Name
character(len=40), intent(in) :: git_commit
character(len=10), intent(in) :: git_date

public subroutine write_time_nc(nout, time)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and current simulation time

real, intent(in) :: time

public subroutine write_phi2_nc(nout, phi2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and amplitude of electrostatic potential

real, intent(in) :: phi2

public subroutine write_apar2_nc(nout, apar2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and amplitude of parallel vector potential

real, intent(in) :: apar2

public subroutine write_bpar2_nc(nout, bpar2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and amplitude of parallel vector potential

real, intent(in) :: bpar2

public subroutine write_kspectra_nc(nout, phi2_vs_kxky, keyname, longname)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep

real, intent(in), dimension(:, :) :: phi2_vs_kxky
character(len=*), intent(in) :: keyname
character(len=*), intent(in) :: longname

public subroutine write_phi_nc(nout, phi)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
complex, intent(in), dimension(:, :, -nzgrid:, :) :: phi

public subroutine write_apar_nc(nout, apar)

Write time trace of electromagnetic field A|| to netCDF

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep

complex, intent(in), dimension(:, :, -nzgrid:, :) :: apar

public subroutine write_bpar_nc(nout, bpar)

Write time trace of electromagnetic field B|| to netCDF

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep

complex, intent(in), dimension(:, :, -nzgrid:, :) :: bpar

public subroutine write_omega_nc(nout, omega)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
complex, intent(in), dimension(:, :) :: omega

public subroutine write_fluxes_vs_time_nc(nout, pflux_vs_s, vflux_vs_s, qflux_vs_s)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep

real, intent(in), dimension(:) :: pflux_vs_s
real, intent(in), dimension(:) :: vflux_vs_s
real, intent(in), dimension(:) :: qflux_vs_s

public subroutine write_fluxes_kxkys_nc(nout, pflux_kxkys, vflux_kxkys, qflux_kxkys)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: pflux_kxkys
real, intent(in), dimension(:, :, :) :: vflux_kxkys
real, intent(in), dimension(:, :, :) :: qflux_kxkys

public subroutine write_fluxes_kxkyzs_nc(nout, pflux_kxkyzts, vflux_kxkyzts, qflux_kxkyzts)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: pflux_kxkyzts
real, intent(in), dimension(:, :, :, :, :) :: vflux_kxkyzts
real, intent(in), dimension(:, :, :, :, :) :: qflux_kxkyzts

public subroutine write_radial_fluxes_nc(nout, pflux, vflux, qflux)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and particle, velocity, heat flux

real, intent(in), dimension(:, :) :: pflux
real, intent(in), dimension(:, :) :: vflux
real, intent(in), dimension(:, :) :: qflux

public subroutine write_radial_moments_nc(nout, dens_x, upar_x, temp_x)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout

Current timestep and radial moments for density, parallel velocity, temperature

real, intent(in), dimension(:, :) :: dens_x
real, intent(in), dimension(:, :) :: upar_x
real, intent(in), dimension(:, :) :: temp_x

public subroutine write_moments_nc(nout, density, upar, temperature, spitzer2)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
complex, intent(in), dimension(:, :, :, :, :) :: density
complex, intent(in), dimension(:, :, :, :, :) :: upar
complex, intent(in), dimension(:, :, :, :, :) :: temperature
complex, intent(in), dimension(:, :, :, :, :) :: spitzer2

public subroutine write_g2_vs_vpamus_nc(nout, g2_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: g2_vs_vpamus

public subroutine write_g2_vs_zvpas_nc(nout, g2_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: g2_vs_zvpas

public subroutine write_g2_vs_zmus_nc(nout, g2_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: g2_vs_zmus

public subroutine write_g2_vs_zkykxs_nc(nout, g2_vs_zkykxs)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: g2_vs_zkykxs

public subroutine write_g2_vs_zvpamus_nc(nout, g2_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: g2_vs_zvpamus

public subroutine write_g2nozonal_vs_vpamus_nc(nout, g2nozonal_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: g2nozonal_vs_vpamus

public subroutine write_g2nozonal_vs_zvpas_nc(nout, g2nozonal_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: g2nozonal_vs_zvpas

public subroutine write_g2nozonal_vs_zmus_nc(nout, g2nozonal_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: g2nozonal_vs_zmus

public subroutine write_g2nozonal_vs_zvpamus_nc(nout, g2nozonal_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: g2nozonal_vs_zvpamus

public subroutine write_h2_vs_vpamus_nc(nout, h2_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: h2_vs_vpamus

public subroutine write_h2_vs_zvpas_nc(nout, h2_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: h2_vs_zvpas

public subroutine write_h2_vs_zmus_nc(nout, h2_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: h2_vs_zmus

public subroutine write_h2_vs_zkykxs_nc(nout, h2_vs_zkykxs)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: h2_vs_zkykxs

public subroutine write_h2_vs_zvpamus_nc(nout, h2_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: h2_vs_zvpamus

public subroutine write_h2nozonal_vs_vpamus_nc(nout, h2nozonal_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: h2nozonal_vs_vpamus

public subroutine write_h2nozonal_vs_zvpas_nc(nout, h2nozonal_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: h2nozonal_vs_zvpas

public subroutine write_h2nozonal_vs_zmus_nc(nout, h2nozonal_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: h2nozonal_vs_zmus

public subroutine write_h2nozonal_vs_zvpamus_nc(nout, h2nozonal_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: h2nozonal_vs_zvpamus

public subroutine write_f2_vs_vpamus_nc(nout, f2_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: f2_vs_vpamus

public subroutine write_f2_vs_zvpas_nc(nout, f2_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: f2_vs_zvpas

public subroutine write_f2_vs_zmus_nc(nout, f2_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: f2_vs_zmus

public subroutine write_f2_vs_zkykxs_nc(nout, f2_vs_zkykxs)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: f2_vs_zkykxs

public subroutine write_f2_vs_zvpamus_nc(nout, f2_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: f2_vs_zvpamus

public subroutine write_f2nozonal_vs_vpamus_nc(nout, f2nozonal_vs_vpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :) :: f2nozonal_vs_vpamus

public subroutine write_f2nozonal_vs_zvpas_nc(nout, f2nozonal_vs_zvpas)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: f2nozonal_vs_zvpas

public subroutine write_f2nozonal_vs_zmus_nc(nout, f2nozonal_vs_zmus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :) :: f2nozonal_vs_zmus

public subroutine write_f2nozonal_vs_zvpamus_nc(nout, f2nozonal_vs_zvpamus)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nout
real, intent(in), dimension(:, :, :, :, :) :: f2nozonal_vs_zvpamus

private subroutine nc_species(file_id)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

NetCDF ID of the file to write to

private subroutine nc_geo(file_id)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

public subroutine get_nout(tstart, nout)

Get the index of the time dimension in the netCDF file that corresponds to a time no larger than tstart

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: tstart

Simulation time to find

integer, intent(out) :: nout

Index of time dimension

public subroutine sync_nc()

Flush netCDF file to disk

Arguments

None

private subroutine write_complex_rank2(parent_id, name, values, dim_names, units, long_name, start)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: parent_id

NetCDF ID of the parent group/file

character(len=*), intent(in) :: name

Name of the variable

complex, intent(in), dimension(:, :) :: values

Array to be written

character(len=*), intent(in), dimension(:) :: dim_names

Array of dimension names

character(len=*), intent(in), optional :: units

Units of coordinate

character(len=*), intent(in), optional :: long_name

Long descriptive name

integer, intent(in), optional, dimension(:) :: start

private subroutine write_complex_rank4(parent_id, name, values, dim_names, units, long_name, start)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: parent_id

NetCDF ID of the parent group/file

character(len=*), intent(in) :: name

Name of the variable

complex, intent(in), dimension(:, :, :, :) :: values

Array to be written

character(len=*), intent(in), dimension(:) :: dim_names

Array of dimension names

character(len=*), intent(in), optional :: units

Units of coordinate

character(len=*), intent(in), optional :: long_name

Long descriptive name

integer, intent(in), optional, dimension(:) :: start

private subroutine write_complex_rank5(parent_id, name, values, dim_names, units, long_name, start)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: parent_id

NetCDF ID of the parent group/file

character(len=*), intent(in) :: name

Name of the variable

complex, intent(in), dimension(:, :, :, :, :) :: values

Array to be written

character(len=*), intent(in), dimension(:) :: dim_names

Array of dimension names

character(len=*), intent(in), optional :: units

Units of coordinate

character(len=*), intent(in), optional :: long_name

Long descriptive name

integer, intent(in), optional, dimension(:) :: start