def test_orography(self): # Mock an orography field we've seen. field = mock_nimrod_field() cube = iris.cube.Cube(np.arange(100).reshape(10, 10)) field.dt_year = field.dt_month = field.dt_day = field.int_mdi field.dt_hour = field.dt_minute = field.int_mdi field.proj_biaxial_ellipsoid = 0 field.tm_meridian_scaling = 0.999601 field.field_code = 73 field.vertical_coord_type = 1 field.title = "(MOCK) 2km mean orography" field.units = "metres" field.source = "GLOBE DTM" nimrod_load_rules.name(cube, field) nimrod_load_rules.units(cube, field) nimrod_load_rules.reference_time(cube, field) nimrod_load_rules.proj_biaxial_ellipsoid(cube, field) nimrod_load_rules.tm_meridian_scaling(cube, field) nimrod_load_rules.vertical_coord(cube, field) nimrod_load_rules.attributes(cube, field) self.assertCML(cube, ("nimrod", "mockography.cml"))
def _call_tm_meridian_scaling(self, scaling_value): self.field.tm_meridian_scaling = scaling_value tm_meridian_scaling(self.cube, self.field)