diagnostic_variable_m Module

Definition of diagnostic variable



Contents


Derived Types

type, public ::  diagnostic_variable_t

Datatype for diagnostic variables

Components

Type Visibility Attributes Name Initial
real(kind=GP), public, allocatable, dimension(:) :: vals

Values of diagnostic variable

Finalizations Procedures

final :: destructor

Type-Bound Procedures

procedure , public :: get_ndim Function
procedure , public :: init => init_diagnostic_variable Subroutine
procedure , public :: write_netcdf => write_netcdf_diagnostic_variable Subroutine

Functions

public pure function get_ndim(self)

Returns dimension of variable

Arguments

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

Instance of the type

Return Value integer


Subroutines

public subroutine init_diagnostic_variable(self, ndim, dimname, varname)

Writes variable to netcdf file

Arguments

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

Instance of the type

integer, intent(in) :: ndim

Dimension of diagnostic variable

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

Name of dimension of diagnostic variable

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

Name of diagnostic variable

public subroutine write_netcdf_diagnostic_variable(self, fid, n_diag)

Writes variable to netcdf file

Arguments

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

Instance of the type

integer, intent(in) :: fid

NetCDF file id

integer, intent(in) :: n_diag

Diagnostic snapshot index

public subroutine destructor(self)

Frees memory associated with variable

Arguments

Type IntentOptional Attributes Name
type(diagnostic_variable_t), intent(inout) :: self

Instance of the type