How to interpolate geoid grid for reference heights #72
-
Hello Fatiando group! I really enjoy the python packages you all have setup for processing gravity data. I have been going through the documentation and using your tools to work on my own data. The trouble I'm having is referencing my measurement points to the ellipsoid. From your old tutorial I'm talking about this step: topography_geometric = topography_proj + geoid_proj My region is rather small so when I do: region_pad = vd.pad_region(rvdc_region,pad=5)
data = data[vd.inside((data.Longitude,data.Latitude),rvdc_region)]
geoid = geoid.sel(longitude=slice(*region_pad[:2]), latitude=slice(*region_pad[2:]))
topography = topography.sel(lon=slice(*region_pad[:2]), lat=slice(*region_pad[2:])) My topography has dimensions (601,541) while the geoid is (60,60) leading to (0,0) for topography_geometric. Is there a way to interpolate the geoid grid to (601,541) or interpolate my topography grid to (600,540) so I can interpolate the geoid (6010,609)? Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @geojoeyphillips thanks for posting this!
The way to do this is to interpolate the geoid array onto the same coordinates as the topography array. This could be done with Verde but for grids the easiest way is to use the xarray interpolation methods:
Be sure to plot the Hope this helps! Let me know the outcome 😀 |
Beta Was this translation helpful? Give feedback.
Hi @geojoeyphillips thanks for posting this!
topography_geometric = topography_proj + geoid_proj
only works if the two grids are co-registered/co-located. If the coordinates don't line up, xarray can't do the operation and wind up with an empty grid.The way to do this is to interpolate the geoid array onto the same coordinates as the topography array. This could be done with Verde but for grids the easiest way is to use the xarray interpolation methods:
Be sure to plot the
geoid_interp
…