Sets the 2-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(:) | :: | v | Current velocity in y-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 setCurrent2d(self,u,v,z)
!! Sets the 2-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) :: v
!! Current velocity in y-direction [m/s]
real(kind=rk),dimension(:),intent(in) :: z
!! Depth levels for the velocity array [m]
self % u = u
self % v = v
self % z = z
endsubroutine setCurrent2d