ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 36 forks source link

use windspharm on a Mercator grid? #92

Closed Xunius closed 6 years ago

Xunius commented 6 years ago

Hi Andrew,

Probably more a question than an issue. Can windspharm work with data on a Mercator grid that by definition can't cover the poles? Suppose I got some regional WRF data on Mercator grid, what's my best bet? Do I need to create a global grid and paste the relevant region, call windspharm and regrid back?

Many thanks in advance. Guangzhi

ajdawson commented 6 years ago

You can only use global grids, regional won't work. Only regular (evenly spaced) and Gaussian grids are supported.

This is not a restriction of windspharm, it is a restriction of using spherical harmonics to do the computation. You cannot extend the regional grid to global by filling missing values or similar, the computation will use all data values, and all values will contribute to the output at every point. You really must use global data.