Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPSL
LMD
InTro
RoutingPP
Commits
33e79de1
Commit
33e79de1
authored
May 26, 2020
by
POLCHER Jan
🚴🏾
Browse files
Small correction for mon-proc case
parent
8748d90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Interface.py
Interface.py
+3
-3
No files found.
Interface.py
View file @
33e79de1
...
...
@@ -206,7 +206,7 @@ def finalfetch(part, routing_area, basin_count, route_togrid, route_tobasin, fet
maxdiff_sorted
=
0.0
else
:
maxdiff_sorted
=
np
.
max
(
np
.
abs
(
sorted_outareas
[
0
:
largest_pos
]
-
old_sorted
))
old_sorted
[:]
=
sorted_outareas
[
0
:
largest_pos
]
old_sorted
[:]
=
sorted_outareas
[
0
:
largest_pos
]
iter_count
+=
1
#
...
...
@@ -402,12 +402,12 @@ class HydroSuper :
# Precision in m^2 of the upstream areas when sorting.
sorted_outareas
=
(
np
.
unique
(
np
.
rint
(
np
.
array
(
xtmp
)
/
prec
))
*
prec
)[::
-
1
]
# If mono-proc no need to iterate as fetch produces the full result.
l
=
min
(
sorted_outareas
.
shape
[
0
],
largest_pos
)
if
part
.
size
==
1
:
maxdiff_sorted
=
0.0
else
:
l
=
min
(
sorted_outareas
.
shape
[
0
],
largest_pos
)
maxdiff_sorted
=
np
.
max
(
np
.
abs
(
sorted_outareas
[
0
:
largest_pos
]
-
old_sorted
[
0
:
l
]))
old_sorted
[:
l
]
=
sorted_outareas
[
0
:
largest_pos
]
old_sorted
[:
l
]
=
sorted_outareas
[
0
:
largest_pos
]
iter_count
+=
1
self
.
fetch_basin
=
np
.
copy
(
fetch_basin
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment