Skip to content

Commit

Permalink
Stored up changes, adding int().
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Jul 18, 2017
1 parent 8c4ac10 commit f3be425
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/rivers/make_river_clim.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
frac = 1.0/count[j,i]
k = rivers[j,i][n]
runoff[k] = frac*data[t,j,i]


if t==180:
sum180 = np.sum(runoff)
Expand Down
2 changes: 1 addition & 1 deletion pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ def flood(varz, Bgrdz, Bpos='t', irange=None, jrange=None, \
for i in range(Lm):
for j in range(Mm):
if mask[j,i] == 1:
varz[bottom[j,i]:,j,i] = varz[bottom[j,i],j,i]
varz[int(bottom[j,i]):,j,i] = varz[int(bottom[j,i]),j,i]

return varz
4 changes: 2 additions & 2 deletions pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_nc_BGrid_GFDL(grdfile, name='GFDL_CM2.1_North_Pacific', \
for j in range(M_t):
for i in range(L_t):
try:
mask_t[0:kmt[j,i], j,i] = 1
mask_t[0:int(kmt[j,i]), j,i] = 1
except:
mask_t[:, j,i] = 0

Expand All @@ -49,7 +49,7 @@ def get_nc_BGrid_GFDL(grdfile, name='GFDL_CM2.1_North_Pacific', \
for j in range(M_uv):
for i in range(L_uv):
try:
mask_uv[0:kmu[j,i], j,i] = 1
mask_uv[0:int(kmu[j,i]), j,i] = 1
except:
mask_uv[:, j,i] = 0

Expand Down

0 comments on commit f3be425

Please sign in to comment.