hyper Module

FIXME : Add documentation



Contents


Variables

Type Visibility Attributes Name Initial
real, public :: D_v
real, public :: D_eta
real, private :: D_hypervisc
real, private :: D_hyperres
real, private :: omega_osc
real, private :: D_hyper
real, private :: akx4_max
real, private :: aky4_max
real, private :: aky_max
real, private :: akperp4_max
integer, private :: hyper_option_switch
integer, public :: nexp
integer, private, parameter :: hyper_option_none = 1
integer, private, parameter :: hyper_option_visc = 2
integer, private, parameter :: hyper_option_res = 3
integer, private, parameter :: hyper_option_both = 4
integer, private, parameter :: hyper_option_simple3D = 5
character(len=9), private :: hyper_option
logical, private :: const_amp
logical, private :: include_kpar
logical, private :: isotropic_shear
logical, private :: damp_zonal_only
logical, private :: hyper_on = .false.
logical, private :: gridnorm
real, public, dimension (:,:), allocatable :: D_res
real, public, dimension (:,:,:), allocatable :: hypervisc_filter
real, private :: kperp2_max
real, private :: kperp2_max_zonal
real, private :: D_hyper3D
real, private :: P_hyper3D
real, private :: ky_cut
real, private :: kx_cut
logical, private :: isotropic_model
logical, private :: initialized = .false.
type(hyper_config_type), private :: hyper_config

Derived Types

type, public, extends(abstract_config_type) ::  hyper_config_type

Used to represent the input configuration of hyper

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 :: const_amp = .false.

Determines whether hyperviscosity includes time dependent amplitude factor when calculating damping rate. Recommend true for linear runs and false for nolinear runs, since amplutide of turbulence grows linearly with time in linear run.

real, public :: d_hyper = -10.0

If hyper_option = 'both' is used then this sets both the hyperresistivity and hyperviscosity damping coefficients. Can override the individual coefficients with d_hyperres and d_hypervisc.

real, public :: d_hyper3d = -10.

Used with the simple3D hyperviscosity model of the form D_hyper3D * (|kperp|/ max |kperp|)^P_hyper3D and ky_cut, kx_cut set max |kperp|

real, public :: d_hyperres = -10.0

Sets hyperresistivity parameter multiplying damping term.

real, public :: d_hypervisc = -10.0

Sets hyperviscosity parameter multiplying damping term. See E. Belli (2006) thesis for more information.

logical, public :: damp_zonal_only = .false.

If true then hyperdissipation only applied to the zonal mode.

logical, public :: gridnorm = .true.

If true (default) then set wavenumber parameters entering the models based on the maximum ky and kx included in the current simulation. If false then these values are set to 1.

character(len=9), public :: hyper_option = 'default'

Selects the type of hyper terms included. Should be one of

Read more…
logical, public :: include_kpar = .false.

Not used.

Read more…
logical, public :: isotropic_model = .true.

if true damp zonal and drift waves with same dissipation formula

logical, public :: isotropic_shear = .true.

If true then use isotropic shear model.

real, public :: kx_cut = -10.

Used with the simple3D hyperviscosity model of the form D_hyper3D * (|kperp|/ max |kperp|)^P_hyper3D and ky_cut, kx_cut set max |kperp|

real, public :: ky_cut = -10.

Used with the simple3D hyperviscosity model of the form D_hyper3D * (|kperp|/ max |kperp|)^P_hyper3D and ky_cut, kx_cut set max |kperp|

integer, public :: nexp = 2

Sets the power to which is raised in the dissipation filter.

real, public :: omega_osc = 0.4

Sets a parameter in the anisotropic shearing rate calculation.

real, public :: p_hyper3d = 4.

Used with the simple3D hyperviscosity model of the form D_hyper3D * (|kperp|/ max |kperp|)^P_hyper3D and ky_cut, kx_cut set max |kperp|

Type-Bound Procedures

procedure , public , :: is_initialised => is_initialised_generic Function
procedure , public , :: init => init_generic Subroutine
procedure , public , :: setup => setup_generic Subroutine
procedure , public , :: write_namelist_header Subroutine
procedure , public , :: get_name => get_name_generic Function
procedure , public , :: get_requires_index => get_requires_index_generic Function
procedure , public , nopass :: write_namelist_footer Subroutine
generic, public , :: write_key_val => write_key_val_string, write_key_val_real, write_key_val_complex, write_key_val_integer, write_key_val_logical, write_key_val_real_array, write_key_val_complex_array, write_key_val_integer_array
procedure , public :: read => read_hyper_config Subroutine
procedure , public :: write => write_hyper_config Subroutine
procedure , public :: reset => reset_hyper_config Subroutine
procedure , public :: broadcast => broadcast_hyper_config Subroutine
procedure , public , nopass :: get_default_name => get_default_name_hyper_config Function
procedure , public , nopass :: get_default_requires_index => get_default_requires_index_hyper_config Function

Functions

public function get_hyper_config()

Get the module level config instance

Arguments

None

Return Value type(hyper_config_type)

private function get_default_name_hyper_config()

Gets the default name for this namelist

Arguments

None

Return Value character(len=CONFIG_MAX_NAME_LEN)

Gets the default requires index for this namelist

Arguments

None

Return Value logical


Subroutines

public subroutine check_hyper(report_unit)

FIXME : Add documentation

Arguments

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

public subroutine wnml_hyper(unit)

FIXME : Add documentation

Arguments

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

public subroutine init_hyper(hyper_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(hyper_config_type), intent(in), optional :: hyper_config_in

public subroutine read_parameters(hyper_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(hyper_config_type), intent(in), optional :: hyper_config_in

private subroutine allocate_arrays()

FIXME : Add documentation

Arguments

None

public subroutine hyper_diff(g0, phi)

FIXME : Add documentation

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(inout), dimension (-ntgrid:,:,g_lo%llim_proc:) :: g0
complex, intent(in), dimension (-ntgrid:,:,:) :: phi

public subroutine finish_hyper()

FIXME : Add documentation

Arguments

None

public subroutine set_hyper_config(hyper_config_in)

Set the module level config type Will abort if the module has already been initialised to avoid inconsistencies.

Arguments

Type IntentOptional Attributes Name
type(hyper_config_type), intent(in), optional :: hyper_config_in

private subroutine read_hyper_config(self)

Reads in the hyper_knobs namelist and populates the member variables

Arguments

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

private subroutine write_hyper_config(self, unit)

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

Arguments

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

private subroutine reset_hyper_config(self)

Resets the config object to the initial empty state

Arguments

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

private subroutine broadcast_hyper_config(self)

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

Arguments

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