init_g_config_type Derived Type

type, public, extends(abstract_config_type) :: init_g_config_type

Used to represent the input configuration of init_g


Contents

Source Code


Components

Type Visibility Attributes Name Initial
logical, public :: exist = .false.

Does the related namelist exist in the target input file?

integer, public :: index = 0

Used to hold the specific index of numbered namelists

logical, public :: skip_read = .false.

Do we want to skip the read step in init?

logical, public :: skip_broadcast = .false.

Do we want to skip the broadcast step in init?

logical, public :: skip_smart_defaults = .false.

Do we want to skip the smaart defaults in init?

real, public :: a0 = 0.0

Amplitude of equilibrium Apara: if a0 is non-zero, is rescaled to give this Apara amplitude

integer, public :: adj_spec = 0

Used by ginit_option "recon3": adjust input parameter of this species; if = 0, just warn if given conditions are not satisfied

FIXME: What input parameter, what conditions?

real, public :: apar0 = 0.0

Used by ginit_option "nl3r": set amplitude of apar if width0 is negative

complex, public, dimension(3) :: aparamp = cmplx(0.0, 0.0)

Used in initialization for the Orszag-Tang 2D vortex problem (ginit_option "ot"). Controls size of jpar term. FIXME: Reference equations?

real, public :: b0 = 0.0

Amplitude of equilibrium By: if b0 is non-zero, is rescaled to give this By amplitude by overriding a0

logical, public :: chop_side = .true.

Rarely needed. Forces asymmetry into initial condition. Warning: This does not behave as one may expect in flux tube simulations (see clean_init), this can be important as the default is to use chop_side

logical, public :: clean_init = .true.

Used with ginit_option "noise". Ensures that in flux tube simulations the connected boundary points are initialised to the same value. Also allows for chop_side to behave correctly in flux tube simulations.

logical, public :: constant_random_flag = .false.

Use the constant_random number generator, which always gives the same random numbers. Useful for testing.

real, public :: den0 = 1.0

Amplitude of zeroth density perturbation for ginit_option options:

real, public :: den1 = 0.0

Amplitude of first density perturbation for ginit_option options:

real, public :: den2 = 0.0

Amplitude of second density perturbation for ginit_option options:

real, public :: dphiinit = 1.0

Amplitude of for "nl7" (see ginit_nl7)

integer, public :: eq_mode_n = 0

Mode number in for the sinusoidal equilbrium option of ginit_option "recon3" (see ginit_recon3), applies to density and temperatures

integer, public :: eq_mode_u = 1

Mode number in for the sinusoidal equilbrium option of ginit_option "recon3" (see ginit_recon3), applies to parallel velocity

character(len=20), public :: eq_type = 'sinusoidal'

Equilbrium choice for ginit_option "recon3" (see ginit_recon3). Choices are:

  • "sinusoidal"
  • "porcelli"
  • "doubleharris"
logical, public :: even = .true.

Sometimes initial conditions have definite parity; this picks the parity in those cases. Affects the following choices of ginit_option:

character(len=20), public :: ginit_option = "default"

Method for initialising g. There are many possible options, but the typical ones are:

  • "default": Gaussian in . See phiinit, width0, chop_side
  • "default_odd": Guassian in multiplied by . See phiinit, width0, chop_side
  • "noise": Noise along field line. The recommended (but not default) selection. See phiinit, zf_init
  • "restart", "many": Restart, using g from restart files.
  • "single_parallel_mode": Initialise only with a single parallel mode specified by either ikpar_init for periodic boundary conditions or kpar_init for linked boundary conditions. Intended for linear calculations.
  • "eig_restart": Uses the restart files written by the eigensolver. Also see restart_eig_id.
  • "random_sine": This option is notable as it attempts to make sure that the initial condition satisfies the parallel boundary condition.

All the options are detailed further in the initialisation options documentation

integer, public, dimension(2) :: ikk = [1, 2]

indices of two modes to initialise for certain options

integer, public, dimension(3) :: ikkk = [1, 2, 2]

indices of three modes to initialise for certain options

integer, public :: ikpar_init = 0

Parallel mode number to initialise for ginit_option "single_parallel_mode" with periodic boundary conditions

integer, public :: ikx_init = -1

If greater than zero, initialise only the given with ginit_option "noise". This is useful for linear runs with flow shear, to track the evolution of a single Lagrangian mode.

real, public :: imfac = 0.0

Amplitude of imaginary part of for various ginit_option options

real, public :: init_spec_pow = 0.0

Initial spectrum power index. with ginit_option "noise".

logical, public :: include_explicit_source_in_restart = .true.

Do we want to include the explicit source terms and related timesteps when saving/restoring from the restart file.

logical, public :: initial_condition_is_nonadiabatic_dfn = .false.

If true then the initial condition is used to set the non-adiabatic distribution function rather than the g evolved by GS2.

logical, public :: input_check_recon = .false.

Print some debug information for ginit_option "recon3"

integer, public, dimension(2) :: itt = [1, 2]

indices of two modes to initialise for certain options

integer, public, dimension(3) :: ittt = [1, 2, 2]

indices of three modes to initialise for certain options

real, public :: k0 = 1.0

Used in ginit_option "harris" and "convect".

real, public :: kpar_init = 0.0

Parallel mode number to initialise for ginit_option "single_parallel_mode" with linked boundary conditions

logical, public :: left = .true.

If chop_side is true, chop out left side in theta if true, right side if false. Applies to: FIXME: list of initial conditions

integer, public :: max_mode = 128

The maximum mode number to initialise for ginit_option "random_sine". Actual maximum used will be lower of max_mode and ntheta/8

logical, public :: new_field_init = .true.

Change fields implicit initialisation somehow

FIXME: Add documentation

logical, public :: null_apar = .false.

"Nullify fields". Used by ginit_option "recon3"

FIXME: Add documentation

logical, public :: null_bpar = .false.

"Nullify fields". Used by ginit_option "recon3"

FIXME: Add documentation

logical, public :: null_phi = .false.

"Nullify fields". Used by ginit_option "recon3"

FIXME: Add documentation

complex, public, dimension(3) :: phiamp = cmplx(0.0, 0.0)

Used in initialization for the Orszag-Tang 2D vortex problem.

FIXME: expand

real, public :: phifrac = 0.1

If doing multiple flux tube calculations, multiply phiinit by (job * phifrac + 1). Allows for ensemble averaging of multiple flux tube calculations

real, public :: phiinit = 1.0

Average amplitude of initial perturbation of each Fourier mode. Used by most ginit_option options

real, public :: phiinit0 = 0.0

Amplitude of equilibrium. Used by ginit_option "recon3"

real, public :: phiinit_rand = 0.0

Amplitude of random perturbation. Used by ginit_option "recon3"

integer, public :: proc_to_save_fields = 0

Which processor is responsible for saving/reading potentials to/from restart files. If <0 then all procs write to restart files. If >= nproc then set to proc_to_save_fields = mod(proc_to_save_fields, nproc)

real, public :: prof_width = -0.1

Width of "porcelli", "doubleharris" profiles in ginit_option "recon3". If negative, this gives the ratio to the box size

logical, public :: read_many = .false.

Restart from many restart files. If false, use a single restart file: this requires GS2 to have been built with parallel netCDF.

real, public :: refac = 1.0

Amplitude of real part of for various ginit_option options

character(len=150), public :: restart_dir = "./"

Directory to read/write restart files to/from. Make sure this exists before running (see file_safety_check)

integer, public :: restart_eig_id = 0

Used to select with eigensolver generated restart file to load. Sets <id> in restart_file//eig_<id>//.<proc> string used to set filename. Note that this is zero indexed.

character(len=run_name_size), public :: restart_file = "restart_file_not_set.nc"

Basename of restart files

real, public :: scale = 1.0

Rescale amplitudes of fields for restart ginit_option options such as "restart". Note that if scale is negative, the fields are scaled by -scale / max(abs(phi))!

real, public :: tpar0 = 0.0

Amplitude of zeroth parallel temperature perturbation for ginit_option options:

real, public :: tpar1 = 0.0

Amplitude of first parallel temperature perturbation for ginit_option options:

real, public :: tpar2 = 0.0

Amplitude of second parallel temperature perturbation for ginit_option options:

real, public :: tperp0 = 0.0

Amplitude of zeroth perpendicular temperature perturbation for ginit_option options:

real, public :: tperp1 = 0.0

Amplitude of first perpendicular temperature perturbation for ginit_option options:

real, public :: tperp2 = 0.0

Amplitude of second perpendicular temperature perturbation for ginit_option options:

real, public :: tstart = 0.0

Force t = tstart at beginning of run

complex, public, dimension(3) :: ukxy_pt = cmplx(0., 0.)

Perturbation amplitude of parallel velocity? Used by ginit_option "recon3"

FIXME: Add documentation

real, public :: upar0 = 0.0

Amplitude of zeroth parallel velocity perturbation for ginit_option options:

real, public :: upar1 = 0.0

Amplitude of first parallel velocity perturbation for ginit_option options:

real, public :: upar2 = 0.0

Amplitude of second parallel velocity perturbation for ginit_option options:

real, public :: width0 = -3.5

Width of initial perturbation Gaussian envelope in

real, public :: zf_init = 1.0

Amplitude of initial zonal flow perturbations relative to other modes


Type-Bound Procedures

procedure, public, :: is_initialised => is_initialised_generic

procedure, public, :: init => init_generic

  • private subroutine init_generic(self, name, requires_index, index, skip_smart_defaults, skip_read, skip_broadcast)

    Fully initialise the config object

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(inout) :: self
    character(len=*), intent(in), optional :: name
    logical, intent(in), optional :: requires_index
    integer, intent(in), optional :: index
    logical, intent(in), optional :: skip_smart_defaults
    logical, intent(in), optional :: skip_read
    logical, intent(in), optional :: skip_broadcast

procedure, public, :: setup => setup_generic

  • private subroutine setup_generic(self, name, requires_index, index)

    Do some standard setup/checking

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(inout) :: self
    character(len=*), intent(in), optional :: name
    logical, intent(in), optional :: requires_index
    integer, intent(in), optional :: index

procedure, public, :: write_namelist_header

  • private subroutine write_namelist_header(self, unit)

    Write the namelist header for this instance

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self
    integer, intent(in) :: unit

procedure, public, :: get_name => get_name_generic

  • private function get_name_generic(self)

    Returns the namelist name. Not very useful at the moment but may want to do more interesting things in the future

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self

    Return Value character(len=CONFIG_MAX_NAME_LEN)

procedure, public, :: get_requires_index => get_requires_index_generic

  • private function get_requires_index_generic(self)

    Returns the requires_index value. Allows access whilst keeping the variable private

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self

    Return Value logical

procedure, public, nopass :: write_namelist_footer

  • private subroutine write_namelist_footer(unit)

    Write the namelist footer

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: unit
  • private subroutine write_key_val_string(key, val, unit)

    Writes a {key,val} pair where the value is of type character

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: key
    character(len=*), intent(in) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_real(key, val, unit)

    Writes a {key,val} pair where the value is of type real

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: key
    real, intent(in) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_complex(key, val, unit)

    Writes a {key,val} pair where the value is of type complex

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: key
    complex, intent(in) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_integer(key, val, unit)

    Writes a {key,val} pair where the value is of type integer

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: key
    integer, intent(in) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_logical(key, val, unit)

    Writes a {key,val} pair where the value is of type logical

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: key
    logical, intent(in) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_real_array(self, key, val, unit)

    Writes a {key,val} pair where the value is of type real array

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self
    character(len=*), intent(in) :: key
    real, intent(in), dimension(:) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_complex_array(self, key, val, unit)

    Writes a {key,val} pair where the value is of type complex array

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self
    character(len=*), intent(in) :: key
    complex, intent(in), dimension(:) :: val
    integer, intent(in) :: unit
  • private subroutine write_key_val_integer_array(self, key, val, unit)

    Writes a {key,val} pair where the value is of type integer array

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_config_type), intent(in) :: self
    character(len=*), intent(in) :: key
    integer, intent(in), dimension(:) :: val
    integer, intent(in) :: unit

procedure, public :: read => read_init_g_config

  • private subroutine read_init_g_config(self)

    Reads in the init_g_knobs namelist and populates the member variables

    Arguments

    Type IntentOptional Attributes Name
    class(init_g_config_type), intent(inout) :: self

procedure, public :: write => write_init_g_config

  • private subroutine write_init_g_config(self, unit)

    Writes out a namelist representing the current state of the config object

    Arguments

    Type IntentOptional Attributes Name
    class(init_g_config_type), intent(in) :: self
    integer, intent(in), optional :: unit

procedure, public :: reset => reset_init_g_config

  • private subroutine reset_init_g_config(self)

    Resets the config object to the initial empty state

    Arguments

    Type IntentOptional Attributes Name
    class(init_g_config_type), intent(inout) :: self

procedure, public :: broadcast => broadcast_init_g_config

  • private subroutine broadcast_init_g_config(self)

    Broadcasts all config parameters so object is populated identically on all processors

    Arguments

    Type IntentOptional Attributes Name
    class(init_g_config_type), intent(inout) :: self

procedure, public, nopass :: get_default_name => get_default_name_init_g_config

  • private function get_default_name_init_g_config()

    Gets the default name for this namelist

    Arguments

    None

    Return Value character(len=CONFIG_MAX_NAME_LEN)

procedure, public, nopass :: get_default_requires_index => get_default_requires_index_init_g_config

procedure, public, :: set_smart_defaults => set_smart_defaults_local

Source Code

  type, extends(abstract_config_type) :: init_g_config_type
     ! namelist : init_g_knobs
     ! indexed : false     

     !> Amplitude of equilibrium `Apara`: if `a0` is non-zero, \(u_0\) is
     !> rescaled to give this `Apara` amplitude
     real :: a0 = 0.0
     !> Used by [[init_g_knobs:ginit_option]] `"recon3"`: adjust input parameter
     !> of this species; if = 0, just warn if given conditions are not satisfied
     !>
     !> FIXME: What input parameter, what conditions?
     integer :: adj_spec = 0
     !> Used by [[init_g_knobs:ginit_option]] `"nl3r"`: set amplitude of `apar`
     !> if [[init_g_knobs:width0]] is negative
     real :: apar0 = 0.0
     !> Used in initialization for the Orszag-Tang 2D vortex problem
     !> ([[init_g_knobs:ginit_option]] `"ot"`). Controls size of `jpar` term.
     !> FIXME: Reference equations?
     complex, dimension(3) :: aparamp = cmplx(0.0,0.0)
     !> Amplitude of equilibrium `By`: if `b0` is non-zero, \(u_0\) is
     !> rescaled to give this `By` amplitude by overriding [[init_g_knobs:a0]]
     real :: b0 = 0.0
     !> Rarely needed. Forces asymmetry into initial condition. Warning: This
     !> does not behave as one may expect in flux tube simulations (see
     !> clean_init), this can be important as the default is to use chop_side
     logical :: chop_side = .true.
     !> Used with [[init_g_knobs:ginit_option]] `"noise"`. Ensures that in flux
     !> tube simulations the connected boundary points are initialised to the
     !> same value. Also allows for [[init_g_knobs:chop_side]] to behave
     !> correctly in flux tube simulations.
     logical :: clean_init = .true.
     !> Use the constant_random number generator, which always gives the same
     !> random numbers. Useful for testing.
     logical :: constant_random_flag = .false.
     !> Amplitude of zeroth density perturbation for [[init_g_knobs:ginit_option]]
     !> options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"ot"` (see [[init_g:ginit_ot]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     real :: den0 = 1.0
     !> Amplitude of first density perturbation for [[init_g_knobs:ginit_option]]
     !> options:
     !>
     !> - `"gs"` (see [[init_g:ginit_gs]])
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: den1 = 0.0
     !> Amplitude of second density perturbation for [[init_g_knobs:ginit_option]]
     !> options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: den2 = 0.0
     !> Amplitude of \(\phi\) for `"nl7"` (see [[init_g:ginit_nl7]])
     real :: dphiinit = 1.0
     !> Mode number in \(x\) for the sinusoidal equilbrium option of
     !> [[init_g_knobs:ginit_option]] `"recon3"` (see [[init_g:ginit_recon3]]),
     !> applies to density and temperatures
     integer :: eq_mode_n = 0
     !> Mode number in \(x\) for the sinusoidal equilbrium option of
     !> [[init_g_knobs:ginit_option]] `"recon3"` (see [[init_g:ginit_recon3]]),
     !> applies to parallel velocity
     integer :: eq_mode_u = 1
     !> Equilbrium choice for [[init_g_knobs:ginit_option]] `"recon3"` (see
     !> [[init_g:ginit_recon3]]). Choices are:
     !>
     !> - `"sinusoidal"`
     !> - `"porcelli"`
     !> - `"doubleharris"`
     character(len = 20) :: eq_type = 'sinusoidal'
     !> Sometimes initial conditions have definite parity; this picks the parity
     !> in those cases. Affects the following choices of
     !> [[init_g_knobs:ginit_option]]:
     !>
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     logical :: even = .true.
     !> Method for initialising `g`. There are many possible options, but the
     !> typical ones are:
     !>
     !>   - `"default"`: Gaussian in \(\theta\). See [[init_g_knobs:phiinit]],
     !>     [[init_g_knobs:width0]], [[init_g_knobs:chop_side]]
     !>   - `"default_odd"`: Guassian in \(\theta\) multiplied by \(\sin(\theta -
     !>     \theta_0)\). See [[init_g_knobs:phiinit]], [[init_g_knobs:width0]],
     !>     [[init_g_knobs:chop_side]]
     !>   - `"noise"`: Noise along field line. The recommended (but not default)
     !>     selection. See [[init_g_knobs:phiinit]], [[init_g_knobs:zf_init]]
     !>   - `"restart", "many"`: Restart, using `g` from restart files.
     !>   - `"single_parallel_mode"`: Initialise only with a single parallel mode
     !>     specified by either [[init_g_knobs:ikpar_init]] for periodic
     !>     boundary conditions or [[init_g_knobs:kpar_init]] for linked
     !>     boundary conditions. Intended for linear calculations.
     !>   - `"eig_restart"`: Uses the restart files written by the
     !>     eigensolver. Also see [[init_g_knobs:restart_eig_id]].
     !>   - `"random_sine"`: This option is notable as it attempts to make sure
     !>     that the initial condition satisfies the parallel boundary condition.
     !>
     !> All the options are detailed further in the [initialisation options
     !> documentation](../user_manual/initialisation.html)
     character(len = 20) :: ginit_option = "default"
     !> \(k_y\) indices of two modes to initialise for certain options
     integer, dimension(2) :: ikk = [1, 2]
     !> \(k_y\) indices of three modes to initialise for certain options
     integer, dimension(3) :: ikkk = [1, 2, 2]
     !> Parallel mode number to initialise for [[init_g_knobs:ginit_option]]
     !> `"single_parallel_mode"` with periodic boundary conditions
     integer :: ikpar_init = 0
     !> If greater than zero, initialise only the given \(k_x\) with
     !> [[init_g_knobs:ginit_option]] `"noise"`. This is useful for linear runs
     !> with flow shear, to track the evolution of a single Lagrangian mode.
     integer :: ikx_init = -1
     !> Amplitude of imaginary part of \(\phi\) for various
     !> [[init_g_knobs:ginit_option]] options
     real :: imfac = 0.0
     !> Initial spectrum power index. with
     !> [[init_g_knobs:ginit_option]] `"noise"`.
     real :: init_spec_pow = 0.0
     !> Do we want to include the explicit source terms and
     !> related timesteps when saving/restoring from the restart file.
     logical :: include_explicit_source_in_restart = .true.
     !> If true then the initial condition is used to set the non-adiabatic
     !> distribution function rather than the `g` evolved by GS2.
     logical :: initial_condition_is_nonadiabatic_dfn = .false.
     !> Print some debug information for [[init_g_knobs:ginit_option]] `"recon3"`
     logical :: input_check_recon = .false.
     !> \(k_x\) indices of two modes to initialise for certain options
     integer, dimension(2) :: itt = [1, 2]     
     !> \(k_x\) indices of three modes to initialise for certain options
     integer, dimension(3) :: ittt = [1, 2, 2]     
     !> Used in [[init_g_knobs:ginit_option]] "harris" and "convect".
     real :: k0 = 1.0
     !> Parallel mode number to initialise for [[init_g_knobs:ginit_option]]
     !> `"single_parallel_mode"` with linked boundary conditions
     real :: kpar_init = 0.0
     !> If [[init_g_knobs:chop_side]] is true, chop out left side in theta if
     !> true, right side if false. Applies to: FIXME: list of initial conditions
     logical :: left = .true.
     !> The maximum mode number to initialise for [[init_g_knobs:ginit_option]]
     !> `"random_sine"`. Actual maximum used will be lower of max_mode and `ntheta/8`
     integer :: max_mode = 128
     !> Change fields implicit initialisation somehow
     !>
     !> FIXME: Add documentation
     logical :: new_field_init = .true.
     !> "Nullify fields". Used by [[init_g_knobs:ginit_option]] `"recon3"`
     !>
     !> FIXME: Add documentation
     logical :: null_apar = .false.
     !> "Nullify fields". Used by [[init_g_knobs:ginit_option]] `"recon3"`
     !>
     !> FIXME: Add documentation
     logical :: null_bpar = .false.
     !> "Nullify fields". Used by [[init_g_knobs:ginit_option]] `"recon3"`
     !>
     !> FIXME: Add documentation
     logical :: null_phi = .false.
     !> Used in initialization for the Orszag-Tang 2D vortex problem.
     !>
     !> FIXME: expand
     complex, dimension(3) :: phiamp = cmplx(0.0,0.0)
     !> If doing multiple flux tube calculations, multiply
     !> [[init_g_knobs:phiinit]] by `(job * phifrac + 1)`. Allows for ensemble
     !> averaging of multiple flux tube calculations
     real :: phifrac = 0.1
     !> Average amplitude of initial perturbation of each Fourier mode. Used by
     !> most [[init_g_knobs:ginit_option]] options
     real :: phiinit = 1.0
     !> Amplitude of equilibrium. Used by [[init_g_knobs:ginit_option]] `"recon3"`
     real :: phiinit0 = 0.0
     !> Amplitude of random perturbation. Used by [[init_g_knobs:ginit_option]] `"recon3"`
     real :: phiinit_rand = 0.0
     !> Which processor is responsible for saving/reading potentials to/from restart
     !> files. If <0 then all procs write to restart files. If >= nproc then set to
     !> proc_to_save_fields = mod(proc_to_save_fields, nproc)
     integer :: proc_to_save_fields = 0
     !> Width of "porcelli", "doubleharris" profiles in
     !> [[init_g_knobs:ginit_option]] `"recon3"`. If negative, this gives the
     !> ratio to the box size
     real :: prof_width = -0.1
     !> Restart from many restart files. If false, use a single restart file:
     !> this requires GS2 to have been built with parallel netCDF.
     logical :: read_many = .false.
     !> Amplitude of real part of \(\phi\) for various
     !> [[init_g_knobs:ginit_option]] options
     real :: refac = 1.0
     !> Directory to read/write restart files to/from. Make sure this exists
     !> before running (see [[gs2_diagnostics_knobs:file_safety_check]])
     character(len = 150) :: restart_dir = "./"
     !> Used to select with eigensolver generated restart file to load. Sets
     !> `<id>` in `restart_file//eig_<id>//.<proc>` string used to set
     !> filename. Note that this is zero indexed.
     integer :: restart_eig_id = 0
     !> Basename of restart files
     !>
     !> @note gets a smart default
     character(len = run_name_size) :: restart_file = "restart_file_not_set.nc"
     !> Rescale amplitudes of fields for restart [[init_g_knobs:ginit_option]]
     !> options such as `"restart"`. Note that if `scale` is negative, the
     !> fields are scaled by `-scale / max(abs(phi))`!
     real :: scale = 1.0
     !> Amplitude of zeroth parallel temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"ot"` (see [[init_g:ginit_ot]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     real :: tpar0 = 0.0
     !> Amplitude of first parallel temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"gs"` (see [[init_g:ginit_gs]])
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: tpar1 = 0.0
     !> Amplitude of second parallel temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: tpar2 = 0.0
     !> Amplitude of zeroth perpendicular temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"ot"` (see [[init_g:ginit_ot]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     real :: tperp0 = 0.0
     !> Amplitude of first perpendicular temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"gs"` (see [[init_g:ginit_gs]])
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: tperp1 = 0.0
     !> Amplitude of second perpendicular temperature perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: tperp2 = 0.0
     !> Force `t = tstart` at beginning of run
     real :: tstart = 0.0
     !> Perturbation amplitude of parallel velocity? Used by
     !> [[init_g_knobs:ginit_option]] `"recon3"`
     !>
     !> FIXME: Add documentation
     complex, dimension(3) :: ukxy_pt = cmplx(0.,0.)
     !> Amplitude of zeroth parallel velocity perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"ot"` (see [[init_g:ginit_ot]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     real :: upar0 = 0.0
     !> Amplitude of first parallel velocity perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"gs"` (see [[init_g:ginit_gs]])
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: upar1 = 0.0
     !> Amplitude of second parallel velocity perturbation for
     !> [[init_g_knobs:ginit_option]] options:
     !>
     !> - `"kpar"` (see [[init_g:ginit_kpar]])
     !> - `"kz0"` (see [[init_g:ginit_kz0]])
     !> - `"nl3"` (see [[init_g:ginit_nl3]])
     !> - `"nl3r"` (see [[init_g:ginit_nl3r]])
     !> - `"nl7"` (see [[init_g:ginit_nl7]])
     !> - `"recon"` (see [[init_g:ginit_recon]])
     !> - `"recon3"` (see [[init_g:ginit_recon3]])
     real :: upar2 = 0.0
     !> Width of initial perturbation Gaussian envelope in \(\theta\)
     real :: width0 = -3.5
     !> Amplitude of initial zonal flow perturbations relative to other modes
     real :: zf_init = 1.0
   contains
     procedure, public :: read => read_init_g_config
     procedure, public :: write => write_init_g_config
     procedure, public :: reset => reset_init_g_config
     procedure, public :: broadcast => broadcast_init_g_config
     procedure, public, nopass :: get_default_name => get_default_name_init_g_config
     procedure, public, nopass :: get_default_requires_index => get_default_requires_index_init_g_config
     procedure :: set_smart_defaults => set_smart_defaults_local
  end type init_g_config_type