Return the coordinate variables names found in a :attr:`xarray.DataArray.coords` mapping. Args: coords (mapping): A :attr:`xarray.DataArray.coords` mapping object. Returns: :obj:`tuple`: The latitude, longitude, and xtime variable names used in the coordinate
(coords)
| 1069 | |
| 1070 | |
| 1071 | def _find_coord_names(coords): |
| 1072 | """Return the coordinate variables names found in a |
| 1073 | :attr:`xarray.DataArray.coords` mapping. |
| 1074 | |
| 1075 | Args: |
| 1076 | |
| 1077 | coords (mapping): A :attr:`xarray.DataArray.coords` mapping object. |
| 1078 | |
| 1079 | Returns: |
| 1080 | |
| 1081 | :obj:`tuple`: The latitude, longitude, and xtime variable names used |
| 1082 | in the coordinate mapping. |
| 1083 | |
| 1084 | """ |
| 1085 | try: |
| 1086 | lat_coord = [name for name in _COORD_VARS[0::2] if name in coords][0] |
| 1087 | except IndexError: |
| 1088 | lat_coord = None |
| 1089 | |
| 1090 | try: |
| 1091 | lon_coord = [name for name in _COORD_VARS[1::2] if name in coords][0] |
| 1092 | except IndexError: |
| 1093 | lon_coord = None |
| 1094 | |
| 1095 | try: |
| 1096 | xtime_coord = [name for name in _TIME_COORD_VARS if name in coords][0] |
| 1097 | except IndexError: |
| 1098 | xtime_coord = None |
| 1099 | |
| 1100 | return lat_coord, lon_coord, xtime_coord |
| 1101 | |
| 1102 | |
| 1103 | def _find_max_time_size(wrfseq): |
no outgoing calls
no test coverage detected