def test_orthographic(self): section = self.uk() section['Nr'] = MDI metadata = empty_metadata() with self.assertRaisesRegexp(iris.exceptions.TranslationError, 'orthographic'): grid_definition_template_90(section, metadata)
def test_zero_height(self): section = self.uk() section['Nr'] = 0 metadata = empty_metadata() with self.assertRaisesRegexp(iris.exceptions.TranslationError, 'zero'): grid_definition_template_90(section, metadata)
def test_rotated_meridian(self): section = self.uk() section['orientationOfTheGrid'] = 1 metadata = empty_metadata() with self.assertRaisesRegexp(iris.exceptions.TranslationError, 'orientation'): grid_definition_template_90(section, metadata)
def test_non_zero_latitude(self): section = self.uk() section['latitudeOfSubSatellitePoint'] = 1 metadata = empty_metadata() with self.assertRaisesRegexp(iris.exceptions.TranslationError, 'non-zero latitude'): grid_definition_template_90(section, metadata)
def test_uk_transposed(self): section = self.uk() section['scanningMode'] = 0b11100000 metadata = empty_metadata() grid_definition_template_90(section, metadata) expected = self.expected_uk(1, 0) self.compare(metadata, expected)
def test_scanning_mode_negative_y(self): section = self.uk() section['scanningMode'] = 0b10000000 metadata = empty_metadata() with self.assertRaisesRegexp(iris.exceptions.TranslationError, '-y'): grid_definition_template_90(section, metadata)
def test_uk(self): section = self.uk() metadata = empty_metadata() grid_definition_template_90(section, metadata) expected = self.expected_uk(0, 1) self.compare(metadata, expected)