cf constants


Version 3.11.0 for version 1.9 of the CF conventions.

cf.masked

The cf.masked constant allows data array values to be masked by direct assignment. This is consistent with the behaviour of numpy masked arrays.

Examples:

Masking every element of a field construct’s data could be done as follows:

>>> f[...] = cf.masked

To mask every element of a field construct’s data whose value is less than zero:

>>> g = f.where(cf.lt(0), cf.masked)