Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

[WPS] SRTM topography not properly recognized in geo_em after geogrid – help with .index or workflow?

aba0327

New member
Hello,

I'm currently trying to use custom SRTM-based topography data in WPS (v4.x), but encountering issues where terrain height (HGT_M) in the generated geo_em.d0*.nc files appears flat or incorrect.

Process:​

  1. I downloaded SRTM data using QGIS and exported it as GeoTIFF (.tif).
  2. I used GDAL to convert the .tif to ENVI BIL (.bil) format, applying vertical flipping and converting to Int16:
    • Bash:
      gdal_translate -of ENVI -a_ullr 124.9998611 32.9998611 128.0001389 35.0001389 -a_srs EPSG:4326 -ot Int16 -a_nodata 0 srtm.tif srtm.bil
      gdalinfo srtm.bil
  3. I got the following .hdr file (shortened):
    • Makefile:
      ENVI
      description = {
      srtm.bil}
      samples = 10801
      lines   = 7201
      bands   = 1
      header offset = 0
      file type = ENVI Standard
      data type = 2
      interleave = bsq
      byte order = 0
      map info = {Geographic Lat/Lon, 1, 1, 124.9998611, 32.9998611, 0.0002777777798352, 0.00027777778086377,WGS-84, rotation=180}
      coordinate system string = {GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]}
      band names = {
      Band 1}
      data ignore value = 0
      default bands = {1}
  4. I wrote the following .index file for WPS:
    • INI:
      type = continuous
      signed = yes
      projection = regular_ll
      dx = 0.0002777777
      dy = 0.0002777777
      known_x = 1.0
      known_y = 1.0
      known_lat = 33.
      known_lon = 125.
      wordsize = 2
      tile_x = 10801
      tile_y = 7201
      tile_z = 1
      tile_bdr = 1
      units="meters MSL"
      description = "SRTM 3-sec Topography height"
      endian = little
  5. I added this to GEOGRID.TBL:
    • INI:
      interp_option = SRTM:four_pt
      rel_path = SRTM:SRTM
  6. I successfully ran geogrid.exe, but when I open geo_em.d01.nc, the HGT_M field does not reflect the SRTM terrain correctly — it's either flat, zero, or unchanged from default. Below are two screenshots comparing the terrain field (HGT_M) from the resulting geo_em.d01.nc:
    • Figure 1: geo_em using default topography (working correctly)
      • 1742979960998.png
    • Figure 2: geo_em using my SRTM-based topography (not working properly)
      • 1742979957271.png

Questions:​

  • Is there anything wrong with the .index file above?
  • Is any additional processing required for WPS to correctly use SRTM .bil data?
  • Do I need to include border pixels (tile_bdr), or preprocess with smoothing or reprojection?

Thank you in advance for any suggestions or clarification. I would really appreciate help verifying whether my .index file is valid, or if I’ve missed any critical steps.

Best regards,
aba0327
 
Apologies for the delay in response and thank you for your patience. It looks like you had some other posts similar to this and those issues were resolved. Are you still struggling with this issue?
 
I'm trying to use a custom SRTM topographic dataset with WPS (geogrid.exe). I successfully created the .hdr and index files, and in GEOGRID.TBL I added my custom source as my_res, but when I created the .bil file, I set the missing values to -9999.

my index file:

type = continuous
signed = yes
projection = regular_ll
dx = 0.000269494585235856
dy = 0.000269494585235856
known_x = 1.0
known_y = 1.0
known_lat = -5.312546758754440
known_lon = -82.14868694452
wordsize = 2
tile_x = 39150
tile_y = 37730
tile_z = 1
tile_bdr = 1
units="meters MSL"
missing_value = -9999
description = "SRTM Custom Topography height"
endian = little

my hdr file:
ENVI
description = {
00001-39150.00001-37730}
samples = 39150
lines = 37730
bands = 1
header offset = 0
file type = ENVI Standard
data type = 2
interleave = bsq
byte order = 0
map info = {Geographic Lat/Lon, 1, 1, -82.14868694452, -5.31254675875444, 0.000269494585235856, 0.000269494585235856,WGS-84}
coordinate system string = {GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]}
band names = {
elevation}
data ignore value = -9999
default bands = {1}


and the names of my files are:
00001-39150.00001-37730
00001-39150.00001-37730.hdr
index

Please, your support, I don't know if the problem was that I gave the nodata -9999 from the beginning or because, when I graph the file generated with the geogrid .exe, all the values come out as 0
 
Please, your support, I don't know if the problem was that I gave the nodata -9999 from the beginning or because, when I graph the file generated with the geogrid .exe, all the values come out as 0
Hi,
I'm not clear exactly what the issue is. Can you let me know what happens when you run geogrid.exe? Can you also attach your namelist.wps file, GEOGRID.TBL, and geogrid.log? Thanks.
 
I can't remember the exact cause of the problem because it was solved too long ago.
If you want to convert from GeoTiff file format such as SRTM DEM to Binary format, I recommend using 'convert_geotiff' module.
This module also generated index files, so you didn't have to manually adjust them.
I hope it helped you.
 
Top