constructor Function

private pure function constructor(coef1, coef2, fresh_sal, melt_temp, a_UabsT) result(this)

Arguments

Type IntentOptional AttributesName
real(kind=r8), intent(in) :: coef1

The unitless multiplier on the thermal forcing term, .

real(kind=r8), intent(in) :: coef2

The unitless multiplier applied to the theram forcing term to get the melt rate, .

real(kind=r8), intent(in), optional :: fresh_sal

The salinity of fresh water. Defaults to 0.

real(kind=r8), intent(in), optional :: melt_temp

The melting point of the ice. Defaults to 0.

real(kind=r8), intent(in), optional :: a_UabsT

The shape coefficient for a horizontally-integrated model. It is defined as where and are the shapes of the variables and in the transverse direction. Defaults to 1.

Return Value type(ave_one_equation_melt)

The newly created object representing the melt relationship.


Called by

proc~~constructor~18~~CalledByGraph proc~constructor~18 constructor interface~ave_one_equation_melt ave_one_equation_melt interface~ave_one_equation_melt->proc~constructor~18

Contents

Source Code


Source Code

  pure function constructor(coef1, coef2, fresh_sal, melt_temp, a_UabsT) result(this)
    real(r8), intent(in)           :: coef1
      !! The unitless multiplier on the thermal forcing term,
      !! \(\Gamma_Tx_0/D_0\).
    real(r8), intent(in)           :: coef2
      !! The unitless multiplier applied to the theram forcing term to
      !! get the melt rate, \(c_oT_0/L\).
    real(r8), intent(in), optional :: fresh_sal
      !! The salinity of fresh water. Defaults to 0.
    real(r8), intent(in), optional :: melt_temp
      !! The melting point of the ice. Defaults to 0.
    real(r8), intent(in), optional :: a_UabsT
      !! The shape coefficient for a horizontally-integrated model. It
      !! is defined as $$\alpha_{|\vec{U}|T} = \frac{1}{y_2 - y_1}
      !! \int^{y_2}_{y_1} f_{|\vec{U}|}f_T dy, $$ where
      !! \(f_{|\vec{U}|}(y)\) and \(f_T(y)\) are the shapes of the
      !! variables \(|\vec{U}|\) and \(T\) in the transverse
      !! direction. Defaults to 1.
    type(ave_one_equation_melt) :: this
      !! The newly created object representing the melt relationship.
    this%coef1 = coef1
    if (present(fresh_sal)) this%sal_forcing = -fresh_sal*coef2
    if (present(melt_temp)) this%melt_temp = melt_temp
    if (present(a_UabsT)) this%a_UabsT = a_UabsT
  end function constructor