one_equation_heat Function

private function one_equation_heat(this) result(heat)

Arguments

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

Return Value class(scalar_field), pointer

The value of the contribution made by melting/thermal transfer to the heat equation for a plume


Contents

Source Code


Source Code

  function one_equation_heat(this) result(heat)
    class(ave_one_equation_melt), intent(in) :: this
    class(scalar_field), pointer         :: heat
      !! The value of the contribution made by melting/thermal
      !! transfer to the heat equation for a [[plume]]
    if (.not. allocated(this%forcing_values)) error stop ('Melt values not calculated')
    call this%forcing_values%allocate_scalar_field(heat)
    if (this%melt_temp /= 0._r8) then
      heat = (1 - this%coef2*this%melt_temp)*this%forcing_values
    else
      heat = this%forcing_values
    end if
    call heat%set_temp() ! Shouldn't need to call this, but for some
                         ! rason being set as non-temporary when
                         ! assignment subroutine returns.
  end function one_equation_heat