Commit e2463e93 authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Correct the global indicing of the grid so that it matches the one of ORCHIDEE.

parent db7d6b66
......@@ -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
......
......@@ -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)
......
......@@ -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/sea 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)
......
......@@ -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(gni) :
for j in range(gnj) :
for j in range(gnj) :
for i in range(gni) :
if (land[j,i] > 0 ) :
gindland[j,i] = n
n += 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment