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
e2463e93
Commit
e2463e93
authored
Jun 05, 2020
by
POLCHER Jan
🚴🏾
Browse files
Correct the global indicing of the grid so that it matches the one of ORCHIDEE.
parent
db7d6b66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
9 deletions
+5
-9
F90subroutines/routing_reg.f90
F90subroutines/routing_reg.f90
+0
-4
Interface.py
Interface.py
+1
-1
ModelGrid.py
ModelGrid.py
+2
-2
Partition.py
Partition.py
+2
-2
No files found.
F90subroutines/routing_reg.f90
View file @
e2463e93
...
...
@@ -2090,7 +2090,6 @@ SUBROUTINE routing_reg_linkup(nbpt, neighbours, nwbas, ijdimmax, inflowmax, basi
IF
(
outflow_basin
(
sp
,
sb
)
==
bop
)
THEN
found
=
1
solved
(
sp
,
1
)
=
solved
(
sp
,
1
)
+
1
WRITE
(
numout
,
*
)
sp
,
sb
,
"flow in the same grid, basin:"
,
bop
ELSE
WRITE
(
*
,
*
)
sp
,
sb
,
"flows in the same grid but has an error !"
ENDIF
...
...
@@ -2526,9 +2525,6 @@ SUBROUTINE routing_reg_fetch(nbpt, gridarea, contfrac, nwbas, nbcore, corepts, b
!
ENDDO
!
WRITE
(
numout
,
*
)
'The smallest FETCH :'
,
MINVAL
(
fetch_basin
)
WRITE
(
numout
,
*
)
'The largest FETCH :'
,
MAXVAL
(
fetch_basin
)
!
!
nboutflow
=
0
outflow_uparea
(:)
=
zero
...
...
Interface.py
View file @
e2463e93
...
...
@@ -628,7 +628,7 @@ class HydroGraph :
var
[
np
.
isnan
(
var
)]
=
NCFillValue
elif
orig_type
==
"int"
:
var
[
np
.
isnan
(
var
)]
=
RPP
.
IntFillValue
var
[
var
>=
np
.
abs
(
RPP
.
IntFillValue
)
]
=
NCFillValue
var
[
var
==
RPP
.
IntFillValue
]
=
NCFillValue
if
part
.
rank
==
0
:
ncvar
=
outnf
.
createVariable
(
name
,
vtyp
,
coord
,
fill_value
=
NCFillValue
)
...
...
ModelGrid.py
View file @
e2463e93
...
...
@@ -53,7 +53,7 @@ def gatherland(lon, lat, land, indP, indFi, indFj) :
#
neighbours
=
[
get_neighbours
(
i
,
j
,
ni
,
nj
,
land
,
coord
,
lon
,
lat
)
for
j
,
i
in
indP_land
]
#
return
nbland
,
coord
,
neighbours
,
indP_land
,
indF_land
return
nbland
,
coord
,
neighbours
,
indP_land
,
indF_land
#
def
get_neighbours
(
i
,
j
,
ni
,
nj
,
land
,
coord
,
lon
,
lat
):
nn
=
[[
j
+
r
[
0
],
i
+
r
[
1
]]
for
r
in
rose
]
...
...
@@ -224,7 +224,7 @@ class ModelGrid :
griddesc
,
self
.
lon_full
,
self
.
lat_full
,
self
.
res_lon
,
self
.
res_lat
=
getcoordinates
(
geo
,
istart
,
ni
,
jstart
,
nj
)
self
.
nj
,
self
.
ni
=
self
.
lon_full
.
shape
#
# Extract the land/ea mask.
# Extract the land/
s
ea mask.
#
self
.
land
=
getland
(
geo
,
istart
,
ni
,
jstart
,
nj
)
ind
=
np
.
reshape
(
np
.
array
(
range
(
self
.
land
.
shape
[
0
]
*
self
.
land
.
shape
[
1
])),
self
.
land
.
shape
)
...
...
Partition.py
View file @
e2463e93
...
...
@@ -294,8 +294,8 @@ def landindexmap(istart, ni, jstart, nj, land) :
gindland
=
np
.
zeros
((
gnj
,
gni
),
dtype
=
np
.
int32
)
gindland
[:,:]
=-
1
n
=
0
for
i
in
range
(
gn
i
)
:
for
j
in
range
(
gn
j
)
:
for
j
in
range
(
gn
j
)
:
for
i
in
range
(
gn
i
)
:
if
(
land
[
j
,
i
]
>
0
)
:
gindland
[
j
,
i
]
=
n
n
+=
1
...
...
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