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

NAME loader fixes #4411

Merged
merged 6 commits into from
Nov 12, 2021
Merged

NAME loader fixes #4411

merged 6 commits into from
Nov 12, 2021

Conversation

vsherratt
Copy link
Contributor

@vsherratt vsherratt commented Nov 11, 2021

🚀 Pull Request

Description

I recently discovered that as part of unpinning cftime in version 3.0.4 (#4222), a bug was introduced that makes it impossible to load a NAME file that contains only one time point. (Because np.float_(arr) on an array with one element returns a scalar, instead of another array with one element.)

I took the opportunity to fix some long-standing annoyances that we've so far just worked around:

  • Vertical coordinates were never given the attribute positive = up, so the "axis" was not guessed as "Z".
  • Iris tries to identify lat-lon coordinates in a column header with a regex for a float, but more recent versions of NAME may not use a decimal point.

Consult Iris pull request check list

@vsherratt vsherratt changed the title Name fixes NAME loader fixes Nov 11, 2021
@vsherratt vsherratt marked this pull request as ready for review November 12, 2021 09:54
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for your diligence @bsherratt! I'm just re-running the py38 tests.

@trexfeathers trexfeathers merged commit ab1e699 into SciTools:main Nov 12, 2021
@vsherratt vsherratt deleted the name-fixes branch November 12, 2021 13:02
tkknight added a commit to tkknight/iris that referenced this pull request Dec 7, 2021
* main: (23 commits)
  Suggest type hinting (SciTools#4390)
  area weight regrid test fixes (SciTools#4432)
  Update latest.rst (SciTools#4425)
  Added @wjbenfold to the core dev list (SciTools#4423)
  Removed addition of period from wrap_lons. (SciTools#4421)
  Add release docs sections describing the role of a Release Manager (SciTools#4413)
  Subset should always return None if no value matches are found (SciTools#4417)
  What's new for SciTools#4400 (SciTools#4422)
  `iris.analysis.AreaWeighted` regrid speedup (SciTools#4400)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4419)
  Remove newline to satisfy setuptools (SciTools#4418)
  Updated environment lockfiles (SciTools#4416)
  NAME loader fixes (SciTools#4411)
  Updated whatsnew for PR 4402 (SciTools#4410)
  Support test data in benchmark workflows (SciTools#4402)
  What's new for pr 4387 (SciTools#4405)
  Make concat mismatch warning for scalar coords more accurate (SciTools#4387)
  Added line to latest release notes for updates to pp_save_rules.py (SciTools#4404)
  Update pp_save_rules.py (SciTools#4391)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4403)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants