3

I've tried looking through the source code, but there doesn't seem to be support for this in MetPy. For example, I have a set of wind vectors relative to the Earth coordinate system (speed, direction) which I want to transform to (u,v) relative to a grid on a Lambert Conformal projection.

mousetail
  • 7,009
  • 4
  • 25
  • 45

1 Answers1

0

MetPy doesn't handle the coordinate system transforms, it lets CartoPy handle that. It does support converting speed and direction to components. So you would want to do:

import cartopy.crs as ccrs
import metpy.calc as mpcalc

proj = ccrs.LambertConformal()

u_earth, v_earth = mpcalc.wind_components(speed, direction)
u_grid, v_grid = proj.transform_vectors(ccrs.PlateCarree(), lon, lat, u_earth, v_earth)

Using PlateCarree as the source projection for the components tells CartoPy that the coordinates and components are lon/lat and earth relative.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20
  • Does CartoPy support the GOES-16/17 ABI projection? If not, could it be extended? We have Python code for the transformation here at SSEC. – Thomas Rink Mar 23 '20 at 16:14
  • Probably best to ask this as a separate question rather than in a comment on an unrelated question, but the short answer is yes, `Geostationary`. – DopplerShift Mar 23 '20 at 19:01