Skip to content

Commit c653280

Browse files
explicitly set coords in nimrod load with units "1" (#3736)
1 parent a07800c commit c653280

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/iris/fileformats/nimrod_load_rules.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ def experiment(cube, field):
301301
"""Add an 'experiment number' to the cube, if present in the field."""
302302
if not is_missing(field, field.experiment_num):
303303
cube.add_aux_coord(
304-
DimCoord(field.experiment_num, long_name="experiment_number")
304+
DimCoord(
305+
field.experiment_num, long_name="experiment_number", units="1"
306+
)
305307
)
306308

307309

@@ -592,7 +594,9 @@ def ensemble_member(cube, field):
592594
if not is_missing(field, ensemble_member_value):
593595
cube.add_aux_coord(
594596
DimCoord(
595-
np.array(ensemble_member_value, dtype=np.int32), "realization"
597+
np.array(ensemble_member_value, dtype=np.int32),
598+
"realization",
599+
units="1",
596600
)
597601
)
598602

0 commit comments

Comments
 (0)