Open ahmedshaaban1 opened 8 months ago
Would be happy to accept a PR that includes a specific mention of the use of finite differencing in the docs for laplacian
and geospatial_laplacian
.
As far as which one is more appropriate, unfortunately that's beyond my area of expertise.
All, As Laplacian could be computed using finite difference techniques (e.g., second derivative or first derivative of the first derivative ) or spectral methods, It will be helpful to mention the technique used in calculating the Laplacian in the function's documentation section.
Another thing, I calculated the Laplacian of the ERA5 500 hPa geopotential height using NCL (which uses spectral technique) and MetPy (which uses the second derivative). Laplacian based on spectral technique (figure on the left) is too noisy and, at the same time, richer in detail than that based on the finite difference (figure on the right). I don't know if both figures are comparable. Given such differences, any idea on which technique should be adopted for calculating geophysical fields (e.g., vorticity from Laplacian of the geopotential). Below is the ERA5 500 hPa vorticity downloaded from the Copernicus data center; vorticity shares some patterns with the Laplacian based on the spectral technique, except it is not too noisy. Please remember that vorticity is associated with the Laplacian of the geostrophic height.
Here is the Python code used to calculate the Laplacian.
here is the NCL code used to calculate the Laplacian
Here is the link for the netcdf files lap_ght_calculated_era5.nc vor_geo_era5_2023_jan.nc Thanks