DEM - OpheliaMiralles/wind-downscaling-gan GitHub Wiki
Quickstart
Installation
Prepare the conda environment:
conda activate downscale_dev
conda install -c conda-forge rasterio
conda install -c conda-forge elevation
pip install topo-descriptors
Download SRTM 90m
We use package elevation for easy access to global terrain digital elevation models, for example SRTM 30m DEM and SRTM 90m DEM.
Here, we download SRTM 90m and clip it around Switzerland with bounding box [6.02260949059, 45.7769477403, 10.4427014502, 47.8308275417]
eio --product SRTM3 clip -o Switzerland-90m-DEM.tif --bounds 6.00 45.76 10.45 47.84
For the COMSO-1 domain, the bounding box is [-0.672729 42.1354 17.5385 50.39].
Python
In python we can use xarray and rasterio to import the DEM.
import xarray as xr
dem = xr.open_rasterio("Switzerland-90m-DEM.tif")
dem = dem.isel(band=0, drop=True)
dem.plot()
Next, we can use the MeteoSwiss package topo-descriptors to calculate topographical descriptors.