WSL/SLF GitLab Repository

Update Guide to process high resolution topography (30 m) from SRTM for WPS authored by engbers's avatar engbers
1. **Download data using the QGIS plugin STRM-Downloader** 1. **Download data using the QGIS plugin STRM-Downloader**
Set the coordinates of your 1km domain and activate “Load Images to QGIS”. You need to register to [NASA Earth Data](https://www.earthdata.nasa.gov/) and sign in with your username and password. Set the coordinates of your 1km domain and activate “Load Images to QGIS”. You need to register to [NASA Earth Data](https://www.earthdata.nasa.gov/) and sign in with your username and password.
2. **Merge the tiles, crop, and download as GEOTIFF** 2. **Merge the tiles, crop, and download as GEOTIFF**
- To merge the tiles go to `Raster – Miscellanious - Merge`, select the layers and run. - To merge the tiles go to `Raster – Miscellanious - Merge`, select the layers and run.
- To crop go to `Raster – Extraction – Clip Raster by Extent` and select the coordinates to crop. Let 0.1 degrees more than the simulation area. - To crop go to `Raster – Extraction – Clip Raster by Extent` and select the coordinates to crop. Let 0.1 degrees more than the simulation area.
- To save right click on the cropped layer and `Export – Save as`, select format GeoTIFF and save the file. - To save right click on the cropped layer and `Export – Save as`, select format GeoTIFF and save the file.
3. Install (if not done yet) and run `convert_geotiff` 3. Install (if not done yet) and run `convert_geotiff`
- Install first the geotiff development libreries: - Install first the geotiff development libreries:
sudo apt-get install libgeotiff-dev sudo apt-get install libgeotiff-dev
- Download convert_geotiff from here: https://github.com/jbeezley/convert_geotiff/releases and install: - Download convert_geotiff from here: https://github.com/jbeezley/convert_geotiff/releases and install:
``` ```
./configure && make ./configure && make
``` ```
- Run convert_geotiff: - Run convert_geotiff:
``` ```
./convert_geotiff -w 4 -t 1200 -u “meters MSL” -d “Topography height” [cropped geotiff FILE] ./convert_geotiff -w 4 -t 1200 -u “meters MSL” -d “Topography height” [cropped geotiff FILE]
``` ```
4. **Within the directory you have the default WRF terrestrial dataset, create a new folder and name it STRM_topo_1s (or whatever you desire).** 4. **Within the directory you have the default WRF terrestrial dataset, create a new folder and name it STRM_topo_1s (or whatever you desire).**
5. **Move the data tiles __convert_geotiff__ generated in the directory you previously created** 5. **Move the data tiles __convert_geotiff__ generated in the directory you previously created**
6. **Modify GEOGRID.TBL** 6. **Modify GEOGRID.TBL**
- Look for variable HGT_M and add the following lines at the appropriate places: - Look for variable HGT_M and add the following lines at the appropriate places:
``` ```
interp_option= topo_1s: average_gcell(4.0)+four_pt+average_4pt interp_option= topo_1s: average_gcell(4.0)+four_pt+average_4pt
rel_path= topo_1s: STRM_topo_1s (or whatever the name of your directory (4) is) rel_path= topo_1s: STRM_topo_1s (or whatever the name of your directory (4) is)
``` ```
7. **Modify namelist.wps** 7. **Modify namelist.wps**
- Add to the desired domains: `geog_data_res = 'topo_1s+modis_15s_lake'` - Add to the desired domains: `geog_data_res = 'topo_1s+modis_15s_lake'`
NOTES: Based on https://wrfexplorer.wordpress.com/2015/03/24/high-resolution-topography/ NOTES: Based on https://wrfexplorer.wordpress.com/2015/03/24/high-resolution-topography/
"""ADDITIONAL COMMENTS """
The convert_geotiff funtion produces a slight shift in the topography. An alternative is to use the gdal_translate function