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.

4

1 回答 1

0

MetPy 不处理坐标系变换,它让 CartoPy 处理。它确实支持将速度和方向转换为组件。所以你想做:

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)

使用PlateCarree组件的源投影告诉 CartoPy 坐标和组件是 lon/lat 和地球相关的。

于 2020-03-20T05:53:31.693 回答