Hi,
I use MOHID to model the plume of the Adour river in France
In one test , the model stopped with message :
ExtraPol3dNearestCell - ModuleFunctions - ERR10
Do you have some suggestions ?
Thanks in advance
Philippe
ExtraPol3dNearestCell - ModuleFunctions -ERR10
-
- MOHID Beginner
- Posts: 19
- Joined: Thu Jan 01, 1970 00:00
- Location: LASAGEC² - Université de Pau et des Pays de l'Adour - ANGLET - FRANCE
- Contact:
-
- MOHID User
- Posts: 22
- Joined: Thu Jan 01, 1970 00:00
looking at the code...
Hello,
Here is the code. My guess is that the calling function passes an associated ComputePoint3D matrix (NoMapping is False). However, somehow, the variable Count always remains zero, possibly due to zero values in the OutValues3D matrix. There is only one calling function passing ComputePoint3D, in module WaterProperties, at line 9062, and one region of calling functions, in module Hydrodynamics, at line 18027.
I don't know if it helps much. I suggest debugging with VS2008 to see the state and the origin of the OutValues3D matrix.
Here is the code. My guess is that the calling function passes an associated ComputePoint3D matrix (NoMapping is False). However, somehow, the variable Count always remains zero, possibly due to zero values in the OutValues3D matrix. There is only one calling function passing ComputePoint3D, in module WaterProperties, at line 9062, and one region of calling functions, in module Hydrodynamics, at line 18027.
Code: Select all
subroutine ExtraPol3DNearestCell (ILB, IUB, JLB, JUB, KLB, KUB, ComputePoints3D, OutValues3D)
!Arguments-------------------------------------------------------------
integer :: JLB, JUB, ILB, IUB, KLB, KUB
real, dimension(:,:,:), pointer :: OutValues3D
integer, dimension(:,:,:), pointer :: ComputePoints3D
!Local-----------------------------------------------------------------
integer :: dij, dk, Count, i, j, k, NumberOfCells
integer :: jj, ii, kk, dijmax, dimax, djmax
real :: SumValues
logical :: NoMapping, OkMap
!Begin-----------------------------------------------------------------
d1: do k = KLB, KUB
if (associated(ComputePoints3D)) then
NumberOfCells = Sum(ComputePoints3D(ILB:IUB, JLB:JUB, k))
NoMapping = .false.
else
NoMapping = .true.
NumberOfCells = 1
endif
if (NumberOfCells > 0) then
do j = JLB, JUB
do i = ILB, IUB
if (NoMapping) then
OkMap = .true.
else
if (ComputePoints3D(i, j, k) == 1) then
OkMap = .true.
else
OkMap = .false.
endif
endif
if (OutValues3D(i, j, k) < FillValueReal/4. .and. OkMap) then
dimax = IUB-ILB + 1
djmax = JUB-JLB + 1
dijmax = max(dimax, djmax)
SumValues = 0
Count = 0
do dij=1,dijmax
do jj=j-dij,j+dij
do ii=i-dij,i+dij
if (jj < JLB) cycle
if (jj > JUB) cycle
if (ii < ILB) cycle
if (ii > IUB) cycle
if (OutValues3D(ii, jj, k) > FillValueReal/4.) then
SumValues = SumValues + OutValues3D(ii, jj, k)
Count = Count + 1
endif
enddo
enddo
if (Count > 0) exit
enddo
if (Count > 0) then
OutValues3D(i, j, k) = SumValues / real(Count)
else
do dk = 1, KUB - KLB + 1
do kk = k - dk, k + dk
if (kk < KLB) cycle
if (kk > KUB) cycle
if (OutValues3D(i, j, kk) > FillValueReal/4.) then
SumValues = SumValues + OutValues3D(i, j, kk)
Count = Count + 1
endif
enddo
if (Count >0) exit
enddo
if (Count > 0) then
OutValues3D(i, j, k) = SumValues / real(Count)
else
if (NoMapping) then
OutValues3D(i, j, k) = FillValueReal
else
stop 'ExtraPol3DNearestCell - ModuleFunctions - ERR10'
endif
endif
endif
endif
enddo
enddo
endif
enddo d1
end subroutine ExtraPol3DNearestCell
I don't know if it helps much. I suggest debugging with VS2008 to see the state and the origin of the OutValues3D matrix.
-
- MOHID User
- Posts: 22
- Joined: Thu Jan 01, 1970 00:00
looking at the code...
Hello,
Here is the code. My guess is that the calling function passes an associated ComputePoint3D matrix (NoMapping is False). However, somehow, the variable Count always remains zero, possibly due to zero values in the OutValues3D matrix. There is only one calling function passing ComputePoint3D, in module WaterProperties, at line 9062, and one region of calling functions, in module Hydrodynamics, at line 18027.
http://snippets.dzone.com/posts/show/12173
I don't know if it helps much. I suggest debugging with VS2008 to see the state and the origin of the OutValues3D matrix.[/url]
Here is the code. My guess is that the calling function passes an associated ComputePoint3D matrix (NoMapping is False). However, somehow, the variable Count always remains zero, possibly due to zero values in the OutValues3D matrix. There is only one calling function passing ComputePoint3D, in module WaterProperties, at line 9062, and one region of calling functions, in module Hydrodynamics, at line 18027.
http://snippets.dzone.com/posts/show/12173
I don't know if it helps much. I suggest debugging with VS2008 to see the state and the origin of the OutValues3D matrix.[/url]
-
- MOHID Beginner
- Posts: 3
- Joined: Tue Mar 01, 2016 11:33
Re: ExtraPol3dNearestCell - ModuleFunctions -ERR10
Hi everyone!
I am having the same problem, did you find a solution??
Thanks in advance!
Ángela
I am having the same problem, did you find a solution??
Thanks in advance!
Ángela
Who is online
Users browsing this forum: No registered users and 2 guests