1

I need to calculate the divergence of u(M,N) and v(M,N) from a limit-area-model with a rotated grid. Here u and v are the x- and y-component of the wind. The latitude and longitude of the grid are given in 2D arrays: lats(M,N) lons(M,N).

Should I rotate (u, v) to the zonal (East-West) and meridional (North-South) components before using the following metpy function?

metpy.calc.divergence(u, v, *, dx=None, dy=None, x_dim=- 1, y_dim=- 2)

I calculate dx and dy with the following function:

dx, dy = metpy.calc.lat_lon_grid_deltas(lons, lats)

Is it correct for a rotated grid?

Ruping Mo
  • 11
  • 1

1 Answers1

0

If you're using those dx and dy values calculated from longitude and latitude, that presumes that the wind components are in that same frame of reference.

There's also an open issue on MetPy to make all of the derivatives of vector quantities (i.e. wind velocity) operate with better accuracy in projected coordinates, accounting for the effects of map projections.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20