Return the lower left latitude and longitude point(s). This functions extracts the lower left corner points and returns the result as either a single :class:`CoordPair` object, or a list of :class:`CoordPair` objects. This is primarily used for testing or constructing the corner po
(lat, lon)
| 3855 | |
| 3856 | |
| 3857 | def ll_points(lat, lon): |
| 3858 | """Return the lower left latitude and longitude point(s). |
| 3859 | |
| 3860 | This functions extracts the lower left corner points and returns the result |
| 3861 | as either a single :class:`CoordPair` object, or a list of |
| 3862 | :class:`CoordPair` objects. |
| 3863 | |
| 3864 | This is primarily used for testing or constructing the corner point objects |
| 3865 | from the XLAT and XLONG variables. |
| 3866 | |
| 3867 | Args: |
| 3868 | |
| 3869 | lat (:class:`xarray.DataArray` or :class:`numpy.ndarray`): The latitude |
| 3870 | array. Must be at least two dimensions. |
| 3871 | |
| 3872 | lon (:class:`xarray.DataArray` or :class:`numpy.ndarray`): The |
| 3873 | longitude array. Must be at least two dimensions. |
| 3874 | |
| 3875 | Returns: |
| 3876 | |
| 3877 | :class:`wrf.CoordPair` or :obj:`list`: A single :class:`wrf.CoordPair` |
| 3878 | object or a list of :class:`wrf.CoordPair` objects. |
| 3879 | |
| 3880 | """ |
| 3881 | latvals = np.ravel(to_np(lat)[..., 0, 0]) |
| 3882 | lonvals = np.ravel(to_np(lon)[..., 0, 0]) |
| 3883 | |
| 3884 | if latvals.shape[0] == 1: |
| 3885 | return CoordPair(lat=float(latvals), lon=float(lonvals)) |
| 3886 | else: |
| 3887 | return [CoordPair(lat=latvals[i], lon=lonvals[i]) |
| 3888 | for i in py3range(latvals.shape[0])] |
| 3889 | |
| 3890 | |
| 3891 | def pairs_to_latlon(pairs): |