When reading cubes you can simply pass it the long_name instead (which it tries if the standard_name fails), which might involve a try / except block that catches the ConstraintMismatchError. Interestingly, when iris loads the file the resulting cube will not have a "standard_name = your_variable" attribute. The loaded cubes will instead have an attribute "invalid_standard_name = your_variable".
When reading/writing an iris cube, you must use a CF compliant standard name.
To get around this problem when writing cubes to file, you can add your preferred standard name to the list iris stores:
When reading cubes you can simply pass it the
long_name
instead (which it tries if thestandard_name
fails), which might involve a try / except block that catches theConstraintMismatchError
. Interestingly, when iris loads the file the resulting cube will not have a "standard_name = your_variable" attribute. The loaded cubes will instead have an attribute "invalid_standard_name = your_variable".