FieldSpec Derived Type

type, public, extends(StateItemSpec) :: FieldSpec


Inherits

type~~fieldspec~2~~InheritsGraph type~fieldspec~2 FieldSpec ESMF_Field ESMF_Field type~fieldspec~2->ESMF_Field payload ESMF_Geom ESMF_Geom type~fieldspec~2->ESMF_Geom geom ESMF_TypeKind_Flag ESMF_TypeKind_Flag type~fieldspec~2->ESMF_TypeKind_Flag typekind EsmfRegridderParam EsmfRegridderParam type~fieldspec~2->EsmfRegridderParam regrid_param StringVector StringVector type~fieldspec~2->StringVector attributes type~stateitemspec StateItemSpec type~fieldspec~2->type~stateitemspec type~ungriddeddims UngriddedDims type~fieldspec~2->type~ungriddeddims ungridded_dims type~verticaldimspec VerticalDimSpec type~fieldspec~2->type~verticaldimspec vertical_dim_spec type~verticalgrid VerticalGrid type~fieldspec~2->type~verticalgrid vertical_grid type~stateitemspec->StringVector raw_dependencies type~actualptvector ActualPtVector type~stateitemspec->type~actualptvector dependencies type~ungriddeddimvector UngriddedDimVector type~ungriddeddims->type~ungriddeddimvector dim_specs type~vector_wrapper~10 vector_wrapper type~actualptvector->type~vector_wrapper~10 elements type~vector_wrapper~14 vector_wrapper type~ungriddeddimvector->type~vector_wrapper~14 elements type~actualconnectionpt ActualConnectionPt type~vector_wrapper~10->type~actualconnectionpt item type~ungriddeddim UngriddedDim type~vector_wrapper~14->type~ungriddeddim item

Inherited by

type~~fieldspec~2~~InheritedByGraph type~fieldspec~2 FieldSpec type~bracketspec BracketSpec type~bracketspec->type~fieldspec~2 reference_spec, field_specs

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: long_name
character(len=:), public, allocatable :: standard_name
character(len=:), public, allocatable :: units
logical, public :: is_created = .false.
real, public, allocatable :: default_value
type(ESMF_Field), public :: payload
type(ESMF_Geom), public, allocatable :: geom
type(ESMF_TypeKind_Flag), public :: typekind = ESMF_TYPEKIND_R4
type(EsmfRegridderParam), public :: regrid_param
type(StringVector), public :: attributes
type(UngriddedDims), public :: ungridded_dims
type(VerticalDimSpec), public :: vertical_dim_spec = VERTICAL_DIM_UNKNOWN
class(VerticalGrid), public, allocatable :: vertical_grid

Constructor

public interface FieldSpec

  • public function new_FieldSpec_geom(unusable, geom, vertical_grid, vertical_dim_spec, typekind, ungridded_dims, standard_name, long_name, units, attributes, regrid_param, default_value) result(field_spec)

    Arguments

    Type IntentOptional Attributes Name
    class(KeywordEnforcer), intent(in), optional :: unusable
    type(ESMF_Geom), intent(in), optional :: geom
    class(VerticalGrid), intent(in), optional :: vertical_grid
    type(VerticalDimSpec), intent(in) :: vertical_dim_spec
    type(ESMF_TypeKind_Flag), intent(in) :: typekind
    type(UngriddedDims), intent(in) :: ungridded_dims
    character(len=*), intent(in), optional :: standard_name
    character(len=*), intent(in), optional :: long_name
    character(len=*), intent(in), optional :: units
    type(StringVector), intent(in), optional :: attributes
    type(EsmfRegridderParam), intent(in), optional :: regrid_param
    real, intent(in), optional :: default_value

    Return Value type(FieldSpec)

  • private function new_FieldSpec_varspec(variable_spec) result(field_spec)

    Arguments

    Type IntentOptional Attributes Name
    class(VariableSpec), intent(in) :: variable_spec

    Return Value type(FieldSpec)


Type-Bound Procedures

procedure, public :: add_to_bundle

  • private subroutine add_to_bundle(this, bundle, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this
    type(ESMF_FieldBundle), intent(inout) :: bundle
    integer, intent(out), optional :: rc

procedure, public :: add_to_state

  • private subroutine add_to_state(this, multi_state, actual_pt, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this
    type(MultiState), intent(inout) :: multi_state
    type(ActualConnectionPt), intent(in) :: actual_pt
    integer, intent(out), optional :: rc

procedure, public :: allocate

  • private subroutine allocate(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: can_connect_to

  • private function can_connect_to(this, src_spec, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this
    class(StateItemSpec), intent(in) :: src_spec
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: connect_to

  • private subroutine connect_to(this, src_spec, actual_pt, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(inout) :: this
    class(StateItemSpec), intent(inout) :: src_spec
    type(ActualConnectionPt), intent(in) :: actual_pt
    integer, intent(out), optional :: rc

procedure, public :: create

  • private subroutine create(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: destroy

  • private subroutine destroy(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: get_dependencies

  • private function get_dependencies(this) result(dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value type(ActualPtVector)

procedure, public :: get_payload

  • private function get_payload(this) result(payload)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this

    Return Value type(ESMF_Field)

procedure, public :: get_raw_dependencies

  • private function get_raw_dependencies(this) result(raw_dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value type(StringVector)

procedure, public, non_overridable :: is_active

  • private pure function is_active(this)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value logical

procedure, public, non_overridable :: is_allocated

  • private pure function is_allocated(this)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value logical

procedure, public :: make_adapters

  • private recursive function make_adapters(this, goal_spec, rc) result(adapters)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this
    class(StateItemSpec), intent(in) :: goal_spec
    integer, intent(out), optional :: rc

    Return Value type(StateItemAdapterWrapper), allocatable, (:)

procedure, public, non_overridable :: set_active

  • private pure subroutine set_active(this, active)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    logical, intent(in), optional :: active

procedure, public, non_overridable :: set_allocated

  • private pure subroutine set_allocated(this, allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    logical, intent(in), optional :: allocated

procedure, public :: set_dependencies

  • private subroutine set_dependencies(this, dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    type(ActualPtVector), intent(in) :: dependencies

procedure, public :: set_geometry

  • private subroutine set_geometry(this, geom, vertical_grid, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(inout) :: this
    type(ESMF_Geom), intent(in), optional :: geom
    class(VerticalGrid), intent(in), optional :: vertical_grid
    integer, intent(out), optional :: rc

procedure, public :: set_raw_dependencies

  • private subroutine set_raw_dependencies(this, raw_dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    type(StringVector), intent(in) :: raw_dependencies

generic, public :: write(formatted) => write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(BracketSpec), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, public :: write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(FieldSpec), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

Source Code

   type, extends(StateItemSpec) :: FieldSpec

      type(ESMF_Geom), allocatable :: geom
      class(VerticalGrid), allocatable :: vertical_grid
      type(VerticalDimSpec) :: vertical_dim_spec = VERTICAL_DIM_UNKNOWN
      type(ESMF_Typekind_flag) :: typekind = ESMF_TYPEKIND_R4
      type(UngriddedDims) :: ungridded_dims
      type(StringVector) :: attributes
      type(EsmfRegridderParam) :: regrid_param

      ! Metadata
      character(:), allocatable :: standard_name
      character(:), allocatable :: long_name
      character(:), allocatable :: units
      ! TBD
!#      type(FrequencySpec) :: freq_spec
!#      class(AbstractFrequencySpec), allocatable :: freq_spec
!#      integer :: halo_width = 0

      type(ESMF_Field) :: payload
      real, allocatable :: default_value
!#      type(VariableSpec) :: variable_spec

      logical :: is_created = .false.

   contains

      procedure :: create
      procedure :: destroy
      procedure :: allocate
      procedure :: get_payload

      procedure :: connect_to
      procedure :: can_connect_to
      procedure :: add_to_state
      procedure :: add_to_bundle

      procedure :: make_adapters

      procedure :: set_geometry

      procedure :: write_formatted
   end type FieldSpec