The fix for hur of AIRS-2-0 expects the valid_range attribute:
|
class Hur(Fix): |
|
"""Fixes for hur.""" |
|
|
|
def fix_metadata(self, cubes): |
|
"""Fix metadata. |
|
|
|
Convert units from `1` to `%` and remove `valid_range` attribute. |
|
|
|
Parameters |
|
---------- |
|
cubes: iris.cube.CubeList |
|
Input cubes. |
|
|
|
Returns |
|
------- |
|
iris.cube.CubeList |
|
Fixed cubes. |
|
|
|
""" |
|
for cube in cubes: |
|
# Put information from valid_range into mask and remove the |
|
# attribute (otherwise this will cause problems after reloading the |
|
# data with different units) |
|
valid_range = cube.attributes["valid_range"] |
|
cube.data = da.ma.masked_outside(cube.core_data(), *valid_range) |
|
cube.attributes.pop("valid_range", None) |
|
|
|
cube.convert_units("%") |
|
return cubes |
This has been removed in #3072.
This bug has not been published in any release.
The fix for hur of AIRS-2-0 expects the
valid_rangeattribute:ESMValCore/esmvalcore/cmor/_fixes/obs4mips/airs_2_0.py
Lines 8 to 36 in 0bb7e86
This has been removed in #3072.
This bug has not been published in any release.