-
Notifications
You must be signed in to change notification settings - Fork 284
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
[FB] [PI-3585] Change default units to "unknown" for all DimensionalMetadata #3713
[FB] [PI-3585] Change default units to "unknown" for all DimensionalMetadata #3713
Conversation
Two things to consider based on the tests which were erroring:
|
Another change which will have to be considered in order to fix the tests: What should be the default unit for coord_categorisation.add_categorised_coord()? The default is currently "1", changing the default to "unknown" is probably correct, though there might need to be some discussion as to which unit is most correct. |
This line creates a coordinate in the process of collapsing, I have for the moment reverted the behaviour back to giving a unit of "1", though that may not necessarily be the most appropriate unit and this will have to be decided on: iris/lib/iris/analysis/__init__.py Line 805 in f5feb28
It looks like this line is specific to percentile aggregation and the coordinate should contain percentages. I have therefore chosen to give a unit of "percent" here. |
Points you raised:
|
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.
That is literally all I can find wrong with this -- otherwise, I agree with all the choices + it already covers everything I checked for.
lib/iris/tests/stock/__init__.py
Outdated
@@ -834,8 +834,8 @@ def jan_offset(day, year): | |||
units="days since 1970-01-01 00:00:00-00", | |||
climatological=True, | |||
) | |||
lon_dim = DimCoord(lon, standard_name="longitude") | |||
lat_dim = DimCoord(lat, standard_name="latitude") | |||
lon_dim = DimCoord(lon, standard_name="longitude", units="1") |
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.
These 2 should surely be 'degrees'.
One tiny point, and I think we can merge this. Then we can consider knockons from this into your other outstanding PRs
and the deferred issues I created above
|
Thanks @stephenworsley all checks, I'm good with this now ! |
… default_units_patch * 'default_units' of https://github.com/SciTools/iris: Unify saving behaviour of "unknown" and "no_unit" (SciTools#3711) Change default loading unit from "1" to "unknown" (correct branch) (SciTools#3709) Change default units to "unknown" for all DimensionalMetadata (SciTools#3713) Update docs CubeList.extract method (SciTools#3694) Correct and improve dev-guide section on fixing graphics-tests. (SciTools#3683) New image hashes for mpl 3x2 (SciTools#3682) Switched use of datetime.weekday() to datetime.dayofwk. (SciTools#3687) Remove TestGribMessage (SciTools#3672) Removed iris.tests.integration.test_grib_load and related CML files. (SciTools#3670) Removed grib-specific test to iris-grib. (SciTools#3671) Fixed asv project name to 'scitools-iris'. (SciTools#3660) Remove cube iter (SciTools#3656) Remove test_grib_save.py (SciTools#3669) Remove test_grib2 integration tests (SciTools#3664) Remove uri callback test which is moved to iris-grib (SciTools#3665) 2v4 mergeback picks (SciTools#3668) Remove test_grib_save_rules.py which has been moved to iris-grib (SciTools#3666) Removed ununused skipIf. (SciTools#3632) Remove grib-specific test. (SciTools#3663) Remove obsolete test. (SciTools#3662)
Squashed commit of the following: commit 912f500 Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 17:52:42 2020 +0100 Unify saving behaviour of "unknown" and "no_unit" (SciTools#3711) commit 3171b95 Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 16:28:45 2020 +0100 Change default loading unit from "1" to "unknown" (correct branch) (SciTools#3709) commit 3fdccac Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 12:27:23 2020 +0100 Change default units to "unknown" for all DimensionalMetadata (SciTools#3713)
Squashed commit of the following: commit 912f500 Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 17:52:42 2020 +0100 Unify saving behaviour of "unknown" and "no_unit" (SciTools#3711) commit 3171b95 Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 16:28:45 2020 +0100 Change default loading unit from "1" to "unknown" (correct branch) (SciTools#3709) commit 3fdccac Author: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Mon Jun 1 12:27:23 2020 +0100 Change default units to "unknown" for all DimensionalMetadata (SciTools#3713)
…its_merge * upstream/default_units: fix test (SciTools#3732) Unify saving behaviour of "unknown" and "no_unit" (SciTools#3711) Change default loading unit from "1" to "unknown" (correct branch) (SciTools#3709) Change default units to "unknown" for all DimensionalMetadata (SciTools#3713)
* Change default units to "unknown" for all DimensionalMetadata (#3713) * Change default loading unit from "1" to "unknown" (correct branch) (#3709) * Unify saving behaviour of "unknown" and "no_unit" (#3711) * fix test (#3732) Co-authored-by: stephenworsley <49274989+stephenworsley@users.noreply.github.com>
* Change default units to "unknown" for all DimensionalMetadata (#3713) * Change default loading unit from "1" to "unknown" (correct branch) (#3709) * Unify saving behaviour of "unknown" and "no_unit" (#3711) * fix test (#3732) Co-authored-by: stephenworsley <49274989+stephenworsley@users.noreply.github.com>
In line with suggestions from #3585, default units for all DimensionalMetadata are now "unknown".