You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some data from TDS doesn’t include the LatLon_Projection variable listed for grid_mapping. While this isn’t CF compliant, it’d be simple enough to handle this one-off. In the case where this particular variable can’t be found, we could synthesize something appropriate.
Just looked at the GFS data on the Thredds server used in the Q-vector example and it shows the LatLon_Projection value for grid_mapping. @kgoebber, was this the file that was giving you issues, or can you point me to a problematic one?
That was the file and the problem I was having was that I added a variable to the dataset without adding the pertinent coordinates and attribute information to make it work. With seeing the warning of 'Could not find variable corresponding to the value of grid_mapping: LatLon_Projection' I thought it was intrinsically linked to problems "reading" the projection. Instead the problem was I didn't properly name the coords. So I don't think there is an issue, but it might be good to add to the warning statement when it does move forward and is assuming lat/lon coordinates to help with reading warning/error messages.
Activity
dopplershift commentedon May 14, 2019
Another option is to treat this like the case where no grid_mapping itself.
zbruick commentedon Jun 18, 2019
Just looked at the GFS data on the Thredds server used in the Q-vector example and it shows the LatLon_Projection value for grid_mapping. @kgoebber, was this the file that was giving you issues, or can you point me to a problematic one?
kgoebber commentedon Jun 18, 2019
That was the file and the problem I was having was that I added a variable to the dataset without adding the pertinent coordinates and attribute information to make it work. With seeing the warning of 'Could not find variable corresponding to the value of grid_mapping: LatLon_Projection' I thought it was intrinsically linked to problems "reading" the projection. Instead the problem was I didn't properly name the coords. So I don't think there is an issue, but it might be good to add to the warning statement when it does move forward and is assuming lat/lon coordinates to help with reading warning/error messages.
Adding something to xarray.py around line 370:
This will let the user know that it didn't completely fail and is proceeding under the assumed settings.
zbruick commentedon Jun 18, 2019
Thanks - made perfect sense. PR is in with this simple addition