subroutine exwid ( pmsa , fl , ipoint , increm , noseg , &
& noflux , iexpnt , iknmrk , noq1 , noq2 , &
& noq3 , noq4 )
!DEC$ ATTRIBUTES DLLEXPORT, ALIAS: 'EXWID' :: EXWID
!>\file
!> Process: XWidth - Compute widths at exchanges
!----- GPL ---------------------------------------------------------------------
!
! Copyright (C) Stichting Deltares, 2011-2021.
!
! This program is free software: you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation version 3.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program. If not, see .
!
! contact: delft3d.support@deltares.nl
! Stichting Deltares
! P.O. Box 177
! 2600 MH Delft, The Netherlands
!
! All indications and logos of, and references to, "Delft3D" and "Deltares"
! are registered trademarks of Stichting Deltares, and remain the property of
! Stichting Deltares. All rights reserved.
!
!------------------------------------------------------------------------------
IMPLICIT NONE
!
! Type Name I/O Description
!
real(4), dimension(*) :: pmsa !0 .and. ito>0) then
fromDepth = pmsa( ipoint(2) + increm(2)*(ifrom-1) )
toDepth = pmsa( ipoint(2) + increm(2)*(ito-1) )
charDepth = (fromDepth + toDepth)/2.0
XWidth = XArea / charDepth
elseif (ito>0) then
toDepth = pmsa( ipoint(2) + increm(2)*(ito-1) )
XWidth = XArea / toDepth
elseif (ifrom>0) then
fromDepth = pmsa( ipoint(2) + increm(2)*(ifrom-1) )
XWidth = XArea / fromDepth
else
XWidth = 0.0
endif
!
! ***** End of your code *****
!
! Put output and flux values into arrays
!
fl ( iflux + 1 ) = 0.0
pmsa( ipnt( 3) ) = XWidth
!
! Increment pointers
!
iflux = iflux + noflux
ipnt = ipnt + increm
!
enddo
!
end subroutine exwid