Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions lib/iris/coord_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ def __init__(self, latitude_of_projection_origin, longitude_of_central_meridian,

Example::

airy1830 = GeogCS(6377563.396, 6356256.910)
osgb = TransverseMercator(49, -2, 40000, -10000, 0.9996012717, ellipsoid=airy1830)
airy1830 = GeogCS(6377563.396, 6356256.909)
osgb = TransverseMercator(49, -2, 400000, -100000, 0.9996012717, ellipsoid=airy1830)

"""
self.latitude_of_projection_origin = float(latitude_of_projection_origin)
Expand Down Expand Up @@ -305,3 +305,13 @@ def __repr__(self):
(self.latitude_of_projection_origin, self.longitude_of_central_meridian,
self.false_easting, self.false_northing,
self.scale_factor_at_central_meridian, self.ellipsoid)


class OSGB(TransverseMercator):
"""A Specific transverse mercator projection on a specific ellipsoid."""
def __init__(self):
TransverseMercator.__init__(self, 49, -2, -400000, 100000, 0.9996012717,
GeogCS(6377563.396, 6356256.909))

def _as_cartopy_projection(self):
return cartopy.crs.OSGB()
8 changes: 8 additions & 0 deletions lib/iris/fileformats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import ff
import grib
import netcdf
import nimrod


__all__ = ['FORMAT_AGENT']
Expand Down Expand Up @@ -99,3 +100,10 @@ def _pp_little_endian(filename, *args, **kwargs):
priority=4,
)
FORMAT_AGENT.add_spec(_FF_5p2_spec)

_NIMROD_spec = fp.FormatSpecification('NIMROD',
fp.MAGIC_NUMBER_32_BIT, 0x00000200,
nimrod.load_cubes,
priority=5,
)
FORMAT_AGENT.add_spec(_NIMROD_spec)
Loading