I found a very easy way to use SRTM1 data as input for geogrid with qgis and convert_geotiff.
So you have to follow these steps:
1 - Install the SRTM-Downloader plugin (https://github.com/hdus/SRTM-Downloader)
2 - download the domain you need with the plugin. This step is slow, and you need a account Nasa Earth Data (https://urs.earthdata.nasa.gov/users/new)
3 - The downloaded data is in .hgt files, but you can merge all the tiles with the raster tool merge (https://docs.qgis.org/3.10/en/docs/user_manual/processing_algs/gdal/rastermiscellaneous.html?highlight=merge#merge). I use output data as 1 — Int16
4 - Now you have a geotiff image of the downloaded data, so you need to convert it to the geogrid format, for this you can use convert_geotiff (https://github.com/openwfm/convert_geotiff)
5 - Once you installed convert_geotiff you can run it like this:
./convert_geotiff -w 4 -t 2291 your_file.tif
6 - After all the files are created, you have to edit the index file.
You need to add:
units = "meters MSL"
description = "Topography height"
missing_value = 32768
Other way to convert from geotiff to geogrid format is using GIS4WRF plugin, but I couldn't run in continuous type, it only run in categorized.
7 - After you made all the data files, place them in your geog folder.
8 - Edit GEOGRID.TBL adding this lines to HGT_M:
interp_option = SRTM_1s:average_gcell(4.0)+four_pt+average_4pt
rel_path = SRTM_1s:SRTM_1s/
So you have to follow these steps:
1 - Install the SRTM-Downloader plugin (https://github.com/hdus/SRTM-Downloader)
2 - download the domain you need with the plugin. This step is slow, and you need a account Nasa Earth Data (https://urs.earthdata.nasa.gov/users/new)
3 - The downloaded data is in .hgt files, but you can merge all the tiles with the raster tool merge (https://docs.qgis.org/3.10/en/docs/user_manual/processing_algs/gdal/rastermiscellaneous.html?highlight=merge#merge). I use output data as 1 — Int16
4 - Now you have a geotiff image of the downloaded data, so you need to convert it to the geogrid format, for this you can use convert_geotiff (https://github.com/openwfm/convert_geotiff)
5 - Once you installed convert_geotiff you can run it like this:
./convert_geotiff -w 4 -t 2291 your_file.tif
6 - After all the files are created, you have to edit the index file.
You need to add:
units = "meters MSL"
description = "Topography height"
missing_value = 32768
Code:
projection = regular_ll
known_x = 1
known_y = 25201
known_lat = -28.999861
known_lon = -73.000137
dx = 0.0002777777777777778
dy = 0.0002777777777777778
type = continuous
signed = yes
units = "meters MSL"
description = "Topography height"
wordsize = 4
tile_x = 2291
tile_y = 2291
tile_z = 1
tile_bdr = 3
missing_value = 32768
scale_factor = 1.000000
row_order = bottom_top
endian = little
Other way to convert from geotiff to geogrid format is using GIS4WRF plugin, but I couldn't run in continuous type, it only run in categorized.
7 - After you made all the data files, place them in your geog folder.
8 - Edit GEOGRID.TBL adding this lines to HGT_M:
interp_option = SRTM_1s:average_gcell(4.0)+four_pt+average_4pt
rel_path = SRTM_1s:SRTM_1s/