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?
 
Top