diagnostic_variable_t Derived Type

type, public :: diagnostic_variable_t

Datatype for diagnostic variables


Contents


Components

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

Values of diagnostic variable


Finalization Procedures

final :: destructor

  • 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


Type-Bound Procedures

procedure, public :: get_ndim

  • 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

procedure, public :: init => init_diagnostic_variable

  • 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

procedure, public :: write_netcdf => write_netcdf_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