gs2_diagnostics_new Module

A module for calculating and writing gs2 outputs. It can write these outputs both to a netcdf file .cdf or to ascii text files. It is controlled via the namelist diagnostics_config. This module is intended to replace the old gs2_diagnostics module with a simpler and more structured interface.



Contents


Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: parallel_io_capable = .false.

Do we have parallel IO capability in the build. This is always disabled for now whilst we actually implement this feature

type(diagnostics_type), public :: gnostics
logical, private, parameter :: debug = .false.

Subroutines

public subroutine init_gs2_diagnostics_new(header)

Read namelist diagnostics_config, initialise submodules, open output file 'run_name.cdf' and create dimensions. !!!!!!!!!!!!!!!!!!!!! Adjust other modules !!!!!!!!!!!!!!!!!!!!!

Read more…

Arguments

Type IntentOptional Attributes Name
type(standard_header_type), intent(in) :: header

Header for files with build and run information

private subroutine check_parameters()

FIXME : Add documentation

Arguments

None

private subroutine set_ascii_file_switches()

This subroutine determines which ascii output files are enabled (i.e., opened, flushed at each write, and then closed). If an ascii file is not enabled here, writing to it will cause some indeterminate unpleasant behaviour

Read more…

Arguments

None

public subroutine finish_gs2_diagnostics_new()

Close the output file and deallocate arrays

Arguments

None

private subroutine run_diagnostics_to_be_updated()

FIXME : Add documentation

Arguments

None

private subroutine write_ql_metric(gnostics)

Calculates and write the QL flux metric to netcdf

Arguments

Type IntentOptional Attributes Name
type(diagnostics_type), intent(inout) :: gnostics

public subroutine run_diagnostics(istep_in, exit, force)

Create or write all variables according to the value of istep: istep=-1 --> Create all netcdf variables istep=0 --> Write constant arrays/parameters (e.g. aky) and initial values istep>0 --> Write variables new diagnostic, calulate and write in new variable

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: istep_in
logical, intent(inout) :: exit
logical, intent(in), optional :: force

public subroutine reset_averages_and_counters()

Reset cumulative flux and heating averages that are used, e.g. for Trinity. Does not at the moment apply to average growth rates.

Arguments

None

private subroutine run_old_final_routines()

FIXME : Add documentation

Arguments

None