Sets the 1-d current velocity field. This procedure is overloaded by the generic procedure setCurrent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(spectrum_type), | intent(inout) | :: | self | Spectrum instance |
||
real(kind=rk), | intent(in), | dimension(:) | :: | u | Current velocity in x-direction [m/s] |
|
real(kind=rk), | intent(in), | dimension(:) | :: | z | Depth levels for the velocity array [m] |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
pure subroutine setCurrent1d(self,u,z)
!! Sets the 1-d current velocity field. This procedure is overloaded by the
!! generic procedure setCurrent.
class(spectrum_type),intent(inout) :: self
!! Spectrum instance
real(kind=rk),dimension(:),intent(in) :: u
!! Current velocity in x-direction [m/s]
real(kind=rk),dimension(:),intent(in) :: z
!! Depth levels for the velocity array [m]
self % u = u
self % z = z
allocate(self % v(size(u)))
self % v = 0
endsubroutine setCurrent1d