asym_plume_data_size Function

private function asym_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(asym_plume), intent(in) :: this

Return Value integer

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


Contents

Source Code


Source Code

  function asym_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
    ! [[asym_plume(type):state_vector]] and taken as an argument by
    ! [[plume(type):update]].
    !
    class(asym_plume), intent(in) :: this
    integer                       :: asym_plume_data_size
      !! The number of elements in the plume's state vector.
    asym_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('asym_plume%data_size','Plume shelf has '//     &
                      trim(str(asym_plume_data_size))//' elements '// &
                      'in its state vector.')
#endif
  end function asym_plume_data_size