From f3be4251fbc4b736cfb163de6c66a0f6c5025174 Mon Sep 17 00:00:00 2001 From: Kate Hedstrom Date: Tue, 18 Jul 2017 13:36:05 -0800 Subject: [PATCH] Stored up changes, adding int(). --- examples/rivers/make_river_clim.py | 2 +- pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py | 2 +- pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/rivers/make_river_clim.py b/examples/rivers/make_river_clim.py index 2386324..598053d 100644 --- a/examples/rivers/make_river_clim.py +++ b/examples/rivers/make_river_clim.py @@ -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) diff --git a/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py b/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py index 6f86fb6..4006664 100644 --- a/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py +++ b/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/flood.py @@ -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 diff --git a/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py b/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py index 99a052a..ca12364 100644 --- a/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py +++ b/pycnal_toolbox/pycnal_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py @@ -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 @@ -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