Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cubed-sphere inquiry functions to work w/ DataArray objects
gcpy/cstools.py - In routine "is_cubed_sphere_rst_grid": - Check if len(data.coords["lat"]) == len(data.coords["lon"]) * 6, instead of checking data.dims. In Dataset objects, data.dims is a dict w/ dimension names and sizes, but in DataArray objects, dims is just a tuple of names. - Search for "SPC_" in data.name for DataArray objects, which do not have the data_vars dictionary - In routine "get_cubed_sphere_res": - Return len(data.coords["lon"]) instead of data.dims["lon"] and len(data.coords["Xdim"] instead of data.dims["Xdim"]. This will work if data is either a Dataset or DataArray object. Signed-off-by: Bob Yantosca <[email protected]>
- Loading branch information