Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* The name of cubes loaded from abf/abl files has been corrected.
6 changes: 3 additions & 3 deletions lib/iris/fileformats/abf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2012 - 2015, Met Office
# (C) British Crown Copyright 2012 - 2019, Met Office
#
# This file is part of Iris.
#
Expand Down Expand Up @@ -118,9 +118,9 @@ def to_cube(self):

# Name.
if self.format.lower() == "abf":
cube.rename("leaf_area_index")
elif self.format.lower() == "abl":
cube.rename("FAPAR")
elif self.format.lower() == "abl":
cube.rename("leaf_area_index")
else:
msg = "Unknown ABF/ABL format: {}".format(self.format)
raise iris.exceptions.TranslationError(msg)
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/results/abf/load.cml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<cubes xmlns="urn:x-iris:cubeml-0.2">
<cube dtype="uint8" standard_name="leaf_area_index" units="%">
<cube dtype="uint8" long_name="FAPAR" units="%">
<attributes>
<attribute name="source" value="Boston University"/>
</attributes>
Expand Down