SciTools/iris — pull request #1281 by dkillick (2014-08-18 08:42:14+00:00)
Title: Suppress invalid units warnings

Add a context manager to suppress the occasionally very verbose warnings raised when an invalid unit is encountered by the Iris load process. For example, the following warnings messages (including the error from UDUNITS2) would all be suppressed:

```
/../site-packages/iris/fileformats/_pyke_rules/compiled_krb/fc_rules_cf_fc.py:1195: UserWarning: Ignoring netCDF variable 'surface' invalid units 'level'
warnings.warn(msg.format(msg_name, msg_units))
ut_scale(): NULL factor argument
```

The benefit of this is that more significant warnings may otherwise be lost in the noise, particularly if a dataset has many invalid units and/or cannot be otherwise modified to add valid units.