euroargodev / euroargodev/terrain-following-example
Retrieve bathymetry with argopy
- Dominant language
- Jupyter Notebook
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
There is no need for users to retrieve the multi-Gb GEBCO topography files, argopy has a utility function to retrieve it:
```python
from argopy.utilities import TopoFetcher
```
The topo fetcher require a box with [lon_min, lon_max, lat_min, lat_max]. One could use the Pandas dataframe with the float trajectory coordinates to retrieve topo over a slightly larger than needed area:
```python
box = [df.where(df['lons']<999)['lons'].min(),
df.where(df['lons']<999)['lons'].max(),
df.where(df['lats']<999)['lats'].min(),
df.where(df['lats']<999)['lats'].max()]
box = np.array(box) + np.array([-5, 5, -5, 5]) # Enlarge the box
print(box)
```
We can then retrieve topography:
```python
# Retrieve full resolution topo (1/240 deg):
topo = TopoFetcher(box, ds='gebco', cache=True).to_xarray()
# Or retrieve lower resolution (1/60 deg):
topo = TopoFetcher(box, ds='gebco', stride=[4, 4], cache=True).to_xarray()
```
The ``topo`` xarray dataset could then be used in the example notebook to get topographic estimates at specific lat/lon points
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.