-
Notifications
You must be signed in to change notification settings - Fork 0
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
Extract cubewrite
fill value modifications
#114
Conversation
There's a slight amount of messiness with the added To prevent e.g. a float um2nc-standalone/umpost/um2netcdf.py Lines 334 to 340 in f3fbd44
This will also complain e.g. if a um2nc-standalone/umpost/um2netcdf.py Lines 342 to 350 in f3fbd44
I don't think it's too important, but mainly wanted to check whether we're happy for the type requirements for the |
Ah oops, didn't notice the additional places the |
Tweak skipped pressure test with DummyCube for future implementation.
Merge changes for extract forecast reference time.
test/test_um2netcdf.py
Outdated
Check that correct default fill values are found based | ||
on a cube's data's type. | ||
""" | ||
fake_cube = DummyCube(12345, "fake_var", attributes={}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might possible to drop attributes={}
when this is de-conflicted with the newer code in main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed in the new PR #147
|
||
assert fill_value == expected_fill_val | ||
# Check new fill value type matches cube's data's type | ||
assert fill_value.dtype == cube_data.dtype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the type check be skipped now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will keep these ones in, as it would be good to check that the get_default_fill_value()
function correctly converts the default fill values to match the cube types.
Oh no... I broke the branch. I've set up a clean one in a new PR #147 |
This pr closes #99.
It extract's the
cubewrite
fill value modifications into a seperate function, adds acustom_fill_val
optional argument, and adds unit tests.Any suggestions or ideas are welcome!