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?