hetland / octant

Ocean C-grid model setup and analysis tools, for the numerical mariner.
Other
33 stars 25 forks source link

Issues in example notebook #10

Open moffat opened 7 years ago

moffat commented 7 years ago

Hi Rob,

I've been exploring octant (nice job!) and it looks like you're working on a new version, so the comments below might be bad timing, but I found a few issues trying to run the example notebook:

z = octant.roms.nc_depths(nc, 'rho')[tidx]

failed because in roms.py you have:

self.s = depths.get_srho(self.N)

and it looks like it should be

self.s = get_srho(self.N)

here and in the rest of this function.

I got past this, but tripped up in

s50 = octant.tools.isoslice(salt,z,-50);

it looks you're moving those functions from tools to slice, so I tried

s50 = octant.slice.isoslice(salt,z,-50);

but that failed with:

isoslice(var, prop, isoval, axis, masking) 27 prop = prop.swapaxes(0, axis) 28 prop=prop-isoval ---> 29 sz = shape(var) 30 var = var.reshape(sz[0],-1) 31 prop = prop.reshape(sz[0],-1)

NameError: global name 'shape' is not defined`

again, if you're in the middle of refactoring this, never mind, but I'd appreciate any pointers.

Thanks.