optimisers ========== .. py:module:: optimisers Attributes ---------- .. autoapisummary:: optimisers.GLOBE_AREA Classes ------- .. autoapisummary:: optimisers.AlbersEqualArea optimisers.CRSOptimiser optimisers.Equatorial optimisers.Global optimisers.LambertAzimuthalEqualArea optimisers.Landscape optimisers.LargeEqatorial optimisers.NorthPolar optimisers.NorthPolarStereo optimisers.OptimisedCRS optimisers.PlateCarree optimisers.Portrait optimisers.SouthPolar optimisers.SouthPolarStereo optimisers.Square optimisers.TransverseMercator Module Contents --------------- .. py:class:: AlbersEqualArea Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LATITUDE :value: 'central_lat' .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:attribute:: STANDARD_PARALLELS :value: 'standard_parallels' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: CRSOptimiser(extents, small_threshold=0.2, large_threshold=0.6) Base class for optimising cartopy CRS classes based on domain extents. :param extents: The domain extents in the form [min_lon, max_lon, min_lat, max_lat]. :type extents: list :param small_threshold: The threshold for a small domain as a fraction of the globe's area. :type small_threshold: float, optional :param large_threshold: The threshold for a large domain as a fraction of the globe's area. :type large_threshold: float, optional .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: Equatorial(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A domain with a central longitude < ±25 degrees, covering < 20% of the globe. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:data:: GLOBE_AREA :value: 64800 .. py:class:: Global(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A domain which covers >60% of the globe. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: LambertAzimuthalEqualArea Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LATITUDE :value: 'central_lat' .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: Landscape(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A non-equitorial domain with an aspect ratio > 1.2. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: LargeEqatorial(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A domain with a central longitude < ±25 degrees, covering > 20% of the globe. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: NorthPolar(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A domain with a central longitude > 75 degrees. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: NorthPolarStereo Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: OptimisedCRS Base class for optimised cartopy CRS classes. .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: PlateCarree Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: Portrait(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A non-equitorial domain with an aspect ratio < 0.8. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: SouthPolar(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A domain with a central longitude < -75 degrees. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: SouthPolarStereo Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser) .. py:class:: Square(extents, small_threshold=0.2, large_threshold=0.6) Bases: :py:obj:`CRSOptimiser` A non-equitorial domain with an aspect ratio > 0.8 and < 1.2. .. py:attribute:: CRS .. py:property:: area The area of the domain in square degrees. .. py:property:: central_lat The central latitude of the domain. .. py:property:: central_lon The central longitude of the domain. .. py:property:: crs The cartopy CRS for the domain. .. py:attribute:: extents .. py:method:: is_equatorial() Equatorial domains are centered around the equator. .. py:method:: is_global() Global domains cover > 60% of the globe. .. py:method:: is_landscape() Landscape domains are at leadt 20% wider than they are tall. .. py:method:: is_large() Large domains cover < 60% of the globe but > 20%. .. py:method:: is_polar() Polar domains are centered around a pole. .. py:method:: is_portrait() Portrait domains are at least 20% taller than they are wide. .. py:method:: is_small() Small domains cover < 20% of the globe. .. py:method:: is_square() Square domains have a width and height within 20% of each other. .. py:attribute:: large_threshold :value: 38880.0 .. py:property:: max_lat The maximum latitude of the domain. .. py:property:: max_lon The maximum longitude of the domain. .. py:property:: min_lat The minimum latitude of the domain. .. py:property:: min_lon The minimum longitude of the domain. .. py:method:: mutate() Mutate the domain to a more optimal CRS. .. py:property:: ratio The aspect ratio of the domain. .. py:attribute:: small_threshold :value: 12960.0 .. py:property:: standard_parallels The standard parallels for the projection. .. py:class:: TransverseMercator Bases: :py:obj:`OptimisedCRS` Base class for optimised cartopy CRS classes. .. py:attribute:: CENTRAL_LATITUDE :value: 'central_lat' .. py:attribute:: CENTRAL_LONGITUDE :value: 'central_lon' .. py:method:: cartopy_crs() .. py:method:: get_kwargs(optimiser) .. py:method:: to_ccrs(optimiser)