static_plume_data_size Function

private function static_plume_data_size(this)

Returns the number of elements in the plume's state vector. This is the size of the vector returned by state_vector and taken as an argument by update.

Arguments

Type IntentOptional AttributesName
class(static_plume), intent(in) :: this

Return Value integer

The number of elements in the plume's state vector.


Contents


Source Code

  function static_plume_data_size(this)
    !* Author: Christopher MacMackin
    !  Date: August 2016
    !
    ! Returns the number of elements in the plume's state vector.
    ! This is the size of the vector returned by
    ! [[static_plume(type):state_vector]] and taken as an argument by
    ! [[static_plume(type):update]].
    !
    class(static_plume), intent(in) :: this
    integer                  :: static_plume_data_size
      !! The number of elements in the plume's state vector.
    static_plume_data_size = this%thickness%raw_size() + this%velocity%raw_size() +      &
                      this%velocity_dx%raw_size() + this%temperature%raw_size() + &
                      this%temperature_dx%raw_size() + this%salinity%raw_size() + &
                      this%salinity_dx%raw_size()
#ifdef DEBUG
    call logger%debug('static_plume%data_size','static_plume shelf has '//     &
                      trim(str(static_plume_data_size))//' elements '// &
                      'in its state vector.')
#endif
  end function static_plume_data_size