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 | :: | append_old | = | .false. |
Append output data to a previous output file |
|
integer, | public | :: | conv_max_step | = | 80000 |
Used for Trinity nonlinear convergence check (use_nonlin_convergence). The maximum number of time steps, after which consider the run converged regardless. |
|
integer, | public | :: | conv_min_step | = | 4000 |
Used for the Trinity nonlinear convergence check (use_nonlin_convergence). The minimum number of time steps before convergence condition can trigger an exit. |
|
integer, | public | :: | conv_nstep_av | = | 4000 |
Used for the Trinity nonlinear convergence check (use_nonlin_convergence). The number of timesteps the convergence condition averages over |
|
integer, | public | :: | conv_nsteps_converged | = | 10000 |
Used for the Trinity nonlinear convergence check (use_nonlin_convergence). The number of steps where convergence is true before convergence is accepted |
|
real, | public | :: | conv_test_multiplier | = | 4e-1 |
Used for the Trinity nonlinear convergence check (use_nonlin_convergence). Multiplier for the cumulative average of the heat flux |
|
logical, | public | :: | dump_check1 | = | .false. |
Write out the field-line average of to WarningYou probably don't want this? WarningNon-functional in new diagnostics |
|
logical, | public | :: | dump_check2 | = | .false. |
Write out at WarningYou probably don't want this? WarningNon-functional in new diagnostics |
|
logical, | public | :: | dump_fields_periodically | = | .false. |
Write out to WarningYou probably don't want this? Expensive. |
|
logical, | public | :: | enable_parallel | = | .false. |
Enable parallel IO in the .out.nc file. Currently disabled by default and doesn't activate feature when set to true as we hard code that parallel IO isn't supported for the .out.nc file. WarningOnly in new diagnostics |
|
logical, | public | :: | exit_when_converged | = | .true. |
Exit when the run has reached convergence |
|
logical, | public | :: | file_safety_check | = | .true. |
Verify that the restart file(s) can be written before starting the run |
|
integer, | public | :: | igomega | = | 0 |
Index in to measure various diagnostics at. By default, this is the outboard midplane , but it may be useful to set this to a non-zero value for tearing parity modes. |
|
logical, | public | :: | make_movie | = | .false. |
Write out in real space over time, suitable for creating animations. Timestep period is controlled with nmovie WarningThis option can write a lot of data! Consider doing the Fourier transforms of the fields in post-processing instead. WarningIn new diagnostics, the timestep period is controlled with nwrite |
|
integer, | public | :: | navg | = | 10 |
Number of timesteps to average over for time-averaged diagnostics WarningDefault value differs between old (100) and new (10) diagnostics |
|
integer, | public | :: | ncheck | = | 10 |
correction by varying collisionality. But doesn't happen on timesteps when diagnostics are written. WarningOnly in new diagnostics WarningThis value "shadows" the |
|
integer, | public | :: | nc_sync_freq | = | 10 |
Sets the number of output steps between syncing the netcdf file. Higher values may reduce disk overheads but increase the risk of data loss on unclean exit. |
|
integer, | public | :: | nmovie | = | -1 |
Timestep period to write real space fields WarningNon-functional in new diagnostics. Instead use nwrite WarningDefault value differs between old (1000) and new (-1) diagnostics |
|
integer, | public | :: | nsave | = | -1 |
Timestep period for writing restart data if
save_for_restart is |
|
integer, | public | :: | nwrite | = | 10 |
Timestep period for writing outputs WarningDefault value differs between old ( |
|
integer, | public | :: | nwrite_mult | = | 10 |
Timestep period multiplier for certain "large" diagnostics, which are
written every FIXME: What datasets? WarningControls different diagnostics in new diagnostics |
|
logical, | public | :: | ob_midplane | = | .false. |
If WarningNon-functional in new diagnostics WarningDefault value differs between old (.true.) and new (.false.) diagnostics |
|
real, | public | :: | omegatinst | = | 1.0e6 |
Threshold complex frequency () for detecting a numerical
instability. If averaged over
navg timesteps is greater than WarningDefault value differs between old (1.0) and new (1.0e6) diagnostics |
|
real, | public | :: | omegatol | = | 1e-3 |
Frequency () convergence tolerance. Consider the simulation
converged and finish the run if has changed by less than
More explicitly, the convergence criterion is:
where is averaged over the last |
|
logical, | public | :: | print_flux_line | = | .false. |
Print the instantaneous fluxes to screen/stdout every nwrite timesteps |
|
logical, | public | :: | print_line | = | .false. |
Print estimated frequencies and growth rates to screen/stdout every nwrite timesteps WarningDefault value differs between old ( |
|
logical, | public | :: | save_distfn | = | .false. |
Write the distribution function to |
|
logical, | public | :: | save_for_restart | = | .false. |
Write restart files at the end of the simulation. If
nsave is positive, then also enable
checkpoints by writing restart files every |
|
logical, | public | :: | save_glo_info_and_grids | = | .false. |
Save some layout and distribution information in restart files |
|
logical, | public | :: | save_many | = | .false. |
If If If |
|
logical, | public | :: | save_velocities | = | .false. |
Save parallel and perpendicular velocities in final restart and/or distribution function files |
|
logical, | public | :: | serial_netcdf4 | = | .false. |
WarningNot used WarningOnly in new diagnostics |
|
logical, | public | :: | use_nonlin_convergence | = | .false. |
For nonlinear runs, stop the run when the averaged differential of the summed averaged heat flux drops below a threshold for a period of time, controlled by conv_test_multiplier, conv_nsteps_converged, gs2_diagnostics_knobs, conv_max_step, and conv_min_step. |
|
logical, | public | :: | write_any | = | .true. |
If WarningOnly in new diagnostics WarningThis also turns off checking the linear convergence |
|
logical, | public | :: | write_apar_over_time | = | .false. |
Write the entire field every nwrite timesteps WarningNew diagnostics requires
write_fields to also be |
|
logical, | public | :: | write_ascii | = | .true. |
Write diagnostics to text files. Generally this creates a different text file for each diagnostic. Note that this independent of whether or not netCDF files are used. FIXME: Verify old and new diagnostics write these files in same format |
|
logical, | public | :: | write_avg_moments | = | .false. |
Write flux surface averaged low-order moments of every nwrite timesteps WarningPrints a warning that this is ignored unless
|
|
logical, | public | :: | write_bpar_over_time | = | .false. |
Write the entire field every nwrite timesteps WarningNew diagnostics requires
write_fields to also be |
|
logical, | public | :: | write_cerr | = | .false. |
Write the collision error every nwrite
timesteps to text file with suffix FIXME: What does this mean? WarningIn new diagnostics, only writes to ascii WarningThis is expensive |
|
logical, | public | :: | write_collisional | = | .false. |
Write collisional heating (collisional and hyper viscous rate of loss of free energy for each mode) every nwrite timesteps WarningOnly in new diagnostics |
|
logical, | public | :: | write_correlation | = | .true. |
Write two point parallel correlation function calculated from the electric potential as a function of and parallel separation every nwrite timesteps WarningDefault value differs between old ( |
|
logical, | public | :: | write_correlation_extend | = | .false. |
Write two point parallel correlation function calculated from the electric potential as a function of and parallel separation, time averaged and calculated along the extended domain every nwrite timesteps once istep > nstep/4. WarningThis diagnostic can have large persistent memory cost. |
|
logical, | public | :: | write_cross_phase | = | .false. |
Write the cross phase between electron density and perpendicular electron temperature every nwrite timesteps. Calculated at both the outboard midplane, averaged across and ; and averaged across all space WarningIn old diagnostics, only written to text files |
|
logical, | public | :: | write_density_over_time | = | .false. |
Write the whole non-adiabatic part of the density moment every nwrite timesteps WarningRequires write_moments to also be
WarningOnly in new diagnostics |
|
logical, | public | :: | write_eigenfunc | = | .false. |
Write normalised to the value of at the outboard midplane every nwrite timesteps. If write_ascii is enabled, the text file is
NoteThe normalising factor for a given point may not be exactly at the outboard midplane if this value is zero there. If the adjacent point in is also zero, then the fields will be unnormalised at that . WarningIf this option is turned on, the same normalising factor will also be used for the text output in write_final_moments WarningIn old diagnostics, this is only done on exit, not every
WarningThe text output is normalised (see note above), but the netCDF output is not |
|
logical, | public | :: | write_fields | = | .true. |
Enable writing every nwrite timesteps WarningIn old diagnostics, this only writes them on exit and
write_phi_over_time,
write_apar_over_time and
write_bpar_over_time instead control writing
the fields over time, respectively. In new diagnostics, this will disable
writing all three fields if set to WarningDefault value differs between old ( |
|
logical, | public | :: | write_final_antot | = | .false. |
Write the right-hand sides of the field equations at the final
timestep. If write_ascii is enabled, the file
suffix is |
|
logical, | public | :: | write_final_db | = | .false. |
Write at the final timestep. If
write_ascii is enabled, the file suffix is
|
|
logical, | public | :: | write_final_epar | = | .false. |
Write at the final timestep. If
write_ascii is enabled, the file suffix is
|
|
logical, | public | :: | write_final_fields | = | .false. |
Write at the final timestep. If
write_ascii is enabled, the file suffix is
|
|
logical, | public | :: | write_final_moments | = | .false. |
Write various moments (densities, parallel and perpendicular
velocities and temperatures, and heat and momentum fluxes) at
the final timestep. If write_ascii
is enabled, the file suffix is WarningIf write_eigenfunc is enabled, then the same normalising factor is used for the final moments. Otherwise, the moments are unnormalised. WarningThe text output is normalised (see note above), but the netCDF output is not |
|
logical, | public | :: | write_flux_line | = | .false. |
Write instantaneous fluxes to output file every nwrite timesteps WarningOutput formats and quantities differ between old and new diagnostics |
|
logical, | public | :: | write_fluxes | = | .false. |
Write fluxes (heat, momentum and particle; total and per-species) every nwrite timesteps. If run is nonlinear, this defaults to true WarningIn old diagnostics, this also turns on |
|
logical, | public | :: | write_fluxes_by_mode | = | .false. |
Write fluxes (heat, momentum and particle; total and per-species) as a function of Fourier mode every nwrite timesteps. If run is nonlinear, this defaults to true WarningIn old diagnostics, this is combined with |
|
logical, | public | :: | write_full_moments_notgc | = | .false. |
Write moments (density, parallel flow, and parallel and perpendicular temperatures) in non-guiding centre coordinates every nwrite timesteps |
|
logical, | public | :: | write_g | = | .false. |
Write at WarningOnly to text files |
|
logical, | public | :: | write_gs | = | .false. |
WarningOnly outputs to text files |
|
logical, | public | :: | write_gyx | = | .false. |
Write as a function of real space every
nmovie timesteps to text file
" WarningOnly to text files |
|
logical, | public | :: | write_heating | = | .false. |
Write out various heating, free energy and energy injection
diagnostics. Text file extension is |
|
logical, | public | :: | write_jext | = | .false. |
Write time averaged external current in the antenna,
, as a function of
. File suffix is WarningOnly in new diagnostics |
|
logical, | public | :: | write_kinetic_energy_transfer | = | .false. |
Calculates and writes the electrostatic drive of zonal flows
every nwrite timesteps. The output
|
|
logical, | public | :: | write_kpar | = | .false. |
Write the parallel spectrum of at final timestep. File suffix is WarningOutput only to text files |
|
logical, | public | :: | write_line | = | .true. |
Print estimated frequencies and growth rates to text file every nwrite timesteps |
|
logical, | public | :: | write_lorentzian | = | .false. |
Write FIXME: Define WarningOld diagnostics only writes to text files WarningNew diagnostics only writes to netCDF |
|
logical, | public | :: | write_max_verr | = | .false. |
Write the estimated maximum error from velocity space integrals for various quantities WarningOld diagnostics only outputs to text file |
|
logical, | public | :: | write_moments | = | .true. |
Write various moments (total and non-adiabatic part of perturbed species density, perturbed parallel flow, perturbed parallel and perpendicular temperatures, parallel heat flux, particule flux and heat flux) every nwrite timesteps WarningOnly outputs to netCDF files WarningNew diagnostics writes various averages of the moments. To get
the same output as old diagnostics, also set
write_ntot_over_time,
write_density_over_time,
write_upar_over_time,
write_tperp_over_time to WarningDefault value differs between old ( |
|
logical, | public | :: | write_nl_flux_dist | = | .false. |
Write the poloidal distributions of the fluxes of particles, parallel momentum, perpendicular momentum, and energy every nwrite timesteps. See section 3.1 and appendix A of Ball et al. PPCF 58 (2016) 045023 as well as section 5 of "GS2 analytic geometry specification" |
|
logical, | public | :: | write_ntot_over_time | = | .false. |
Write the whole total density moment every nwrite timesteps WarningRequires write_moments to also be
WarningOnly in new diagnostics |
|
logical, | public | :: | write_omavg | = | .true. |
Write time-averaged growth rate and frequency to the output text file every nwrite timesteps. Time average is rolling window over the previous navg timesteps WarningNon-functional in new diagnostics, time-average is also written with write_omega instead |
|
logical, | public | :: | write_omega | = | .true. |
Write instantaneous growth rate and frequency every nwrite timesteps WarningOld diagnostics only writes to output text file WarningNew diagnostics only writes to netCDF file WarningNew diagnostics also writes time-average with this option. Output is the complex frequency, rather than separate growth rate and real frequency |
|
logical, | public | :: | write_parity | = | .false. |
Write parities in distribution and particle fluxes to text file with the
suffix FIXME: Clarify what this means |
|
logical, | public | :: | write_phi_over_time | = | .false. |
Write the entire field every nwrite timesteps WarningNew diagnostics requires
write_fields to also be |
|
logical, | public | :: | write_ql_metric | = | .true. |
Write a simple quasi-linear metric to netcdf. |
|
logical, | public | :: | write_symmetry | = | .false. |
Write the particle and momentum flux as a function of and velocity space. See gs2_diagnostics_knobs and gs2_diagnostics_knobs WarningOnly outputs to netCDF WarningOld diagnostics does not write the particle flux, use gs2_diagnostics_knobs instead |
|
logical, | public | :: | write_tperp_over_time | = | .false. |
Write the whole perturbed perpendicular temperature moment every nwrite timesteps WarningRequires write_moments to also be
WarningOnly in new diagnostics |
|
logical, | public | :: | write_upar_over_time | = | .false. |
Write the whole perturbed parallel velocity moment every nwrite timesteps WarningRequires write_moments to also be
WarningOnly in new diagnostics |
|
logical, | public | :: | write_verr | = | .false. |
Write estimates of error resulting from velocity space integrals in the calculation of various quantities every nwrite timesteps. WarningOutput only to text file WarningNew diagnostics also writes to netCDF every ncheck timesteps, along with some other quantities such as collisionality WarningThis is expensive |
|
logical, | public | :: | write_zonal_transfer | = | .false. |
Write the transfer of free energy, , as a function of , averaged over , every nwrite timesteps WarningOnly in new diagnostics |
Is this instance initialised?
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Fully initialise the config object
Type | Intent | Optional | 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 |
Do some standard setup/checking
Type | Intent | Optional | 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 |
Write the namelist header for this instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
integer, | intent(in) | :: | unit |
Returns the namelist name. Not very useful at the moment but may want to do more interesting things in the future
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Returns the requires_index value. Allows access whilst keeping the variable private
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Write the namelist footer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type character
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
character(len=*), | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
real, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type logical
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
logical, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
real, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Reads in the gs2_diagnostics_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(diagnostics_base_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(diagnostics_base_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(diagnostics_base_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(diagnostics_base_config_type), | intent(inout) | :: | self |
Gets the default name for this namelist
Gets the default requires index for this namelist
Set the smart defaults for the new_gs2_diagnostics_config_type instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(new_gs2_diagnostics_config_type), | intent(inout) | :: | self |
type, extends(diagnostics_base_config_type) :: new_gs2_diagnostics_config_type
contains
procedure :: set_smart_defaults => set_smart_defaults_local
end type new_gs2_diagnostics_config_type