Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when reading single level (e.g. surface) UM files #642

Merged
merged 6 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cf/read_write/um/umread.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ def create_data(self):
# ----------------------------------------------------
# 1-d partition matrix
# ----------------------------------------------------
z_axis = _axis[self.z_axis]
z_axis = _axis.get(self.z_axis)
if nz > 1:
pmaxes = [z_axis]
data_shape = (nz, LBROW, LBNPT)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ environments for which these features are not required.

.. rubric:: Convolution filters, derivatives and relative vorticity

* `scipy <https://pypi.org/project/scipy>`_, version 1.1.0 or newer.
* `scipy <https://pypi.org/project/scipy>`_, version 1.10.0 or newer.
davidhassell marked this conversation as resolved.
Show resolved Hide resolved

.. rubric:: Subspacing based on N-dimensional construct cells (N > 1)
containing a given value
Expand Down
5 changes: 2 additions & 3 deletions docs/source/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,8 @@
import netCDF4
nc = netCDF4.Dataset('file.nc', 'r')
v = nc.variables['ta']
netcdf_array = cf.NetCDFArray(filename='file.nc', ncvar='ta',
dtype=v.dtype, ndim=v.ndim,
shape=v.shape, size=v.size)
netcdf_array = cf.NetCDFArray(filename='file.nc', address='ta',
dtype=v.dtype, shape=v.shape)
data_disk = cf.Data(netcdf_array)
numpy_array = v[...]
data_memory = cf.Data(numpy_array)
Expand Down
5 changes: 2 additions & 3 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4539,9 +4539,8 @@ used to initialise a `cf.Data` instance.
>>> import netCDF4
>>> nc = netCDF4.Dataset('file.nc', 'r')
>>> v = nc.variables['ta']
>>> netcdf_array = cf.NetCDFArray(filename='file.nc', ncvar='ta',
... dtype=v.dtype, ndim=v.ndim,
... shape=v.shape, size=v.size)
>>> netcdf_array = cf.NetCDFArray(filename='file.nc', address='ta',
... dtype=v.dtype, shape=v.shape)
>>> data_disk = cf.Data(netcdf_array)


Expand Down