diff --git a/esmvalcore/cmor/_fixes/native6/mswep.py b/esmvalcore/cmor/_fixes/native6/mswep.py index 34563ec5dc..dd041fa56c 100644 --- a/esmvalcore/cmor/_fixes/native6/mswep.py +++ b/esmvalcore/cmor/_fixes/native6/mswep.py @@ -92,11 +92,11 @@ def _fix_units(self, cube): cube.units = Unit(self.vardef.units) if frequency in ('day', '3hr'): - # divide by number of seconds in a month - cube.data = cube.core_data() / 60 * 60 * 24 * 30 - elif frequency == 'mon': # divide by number of seconds in a day - cube.data = cube.core_data() / 60 * 60 * 24 + cube.data = cube.core_data() / (60 * 60 * 24) + elif frequency == 'mon': + # divide by number of seconds in a month + cube.data = cube.core_data() / (60 * 60 * 24 * 30) else: raise ValueError(f'Cannot fix units for frequency: {frequency!r}')