Skip to content

Commit

Permalink
Merge pull request Unidata#1065 from zbruick/latlon_warning
Browse files Browse the repository at this point in the history
Xarray: Add warning if lat/lon is assumed for projection
  • Loading branch information
dopplershift committed Jun 19, 2019
2 parents 8c04efc + 68ee4f2 commit 39c6f45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metpy/xarray.py
Expand Up @@ -370,6 +370,8 @@ def parse_cf(self, varname=None, coordinates=None):
# If we found them, create a lat/lon projection as the crs coord
if has_lat and has_lon:
var.coords['crs'] = CFProjection({'grid_mapping_name': 'latitude_longitude'})
log.warning('Found lat/lon values, assuming latitude_longitude '
'for projection grid_mapping variable')

# Assign coordinates if the coordinates argument is given
if coordinates is not None:
Expand Down

0 comments on commit 39c6f45

Please sign in to comment.