private subroutine AssignGridReal(mat, mask)
assign value of mask real to mat real
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(grid_real),
|
intent(inout) |
|
|
:: |
mat |
|
type(grid_real),
|
intent(in) |
|
|
:: |
mask |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
integer,
|
public |
|
:: |
i |
|
|
|
integer,
|
public |
|
:: |
j |
|
|
|
Source Code
SUBROUTINE AssignGridReal &
!
(mat, mask)
IMPLICIT NONE
!Arguments with intent(in):
TYPE(grid_real),INTENT(IN) :: mask
!Arguments with intent (inout)
TYPE(grid_real),INTENT(INOUT):: mat
!Local declarations:
INTEGER :: i,j
!---------------------------end of declarations--------------------------------
!check spatial reference
!IF ( .NOT. CRSisEqual (mask, mat, .TRUE.) ) THEN
IF ( .NOT. CRSisEqual (mask, mat) ) THEN
CALL Catch ('error', 'GridOperations', &
'while assigning grid content from another grid: ', &
argument = 'spatial reference not equal' )
END IF
DO i = 1, mat % idim
DO j = 1, mat % jdim
IF (mat % mat (i,j) /= mat % nodata) THEN
mat % mat(i,j) = mask % mat(i,j)
END IF
END DO
END DO
END SUBROUTINE AssignGridReal