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

String stash code silently ignored on pp-save #6239

Open
rcomer opened this issue Nov 27, 2024 · 0 comments
Open

String stash code silently ignored on pp-save #6239

rcomer opened this issue Nov 27, 2024 · 0 comments

Comments

@rcomer
Copy link
Member

rcomer commented Nov 27, 2024

🐛 Bug Report

Before saving to pp-file, a user may have reason to modify or add a stash code. If the code is added in the string form, it is silently ignored.

How To Reproduce

Steps to reproduce the behaviour:

  1. Run code
import iris

fname = iris.sample_data_path('air_temp.pp')
cube = iris.load_cube(fname)

cube.attributes['STASH'] = 'm01s34i001'

iris.save(cube, 'test.pp')
  1. Inspect the file test.pp.

  2. The stash code in the file is zero.

Expected behaviour

Either the stash code in the file is 34001 or I get a type error because I should have used a STASH object instead of a string.

Screenshots

Environment

  • OS & Version: RHEL9 🎉
  • Iris Version: 3.11

Additional context

Click to expand this section...
Please add additional verbose information in this section e.g., code, output, tracebacks, screenshots etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant