Skip to content
Helen Burns edited this page May 1, 2019 · 1 revision

DEM FILES

  • w100n40.dem – (If using 1km resolution data) The DEM data file for Central America from the GTOPO30 dataset (downloaded via http://www.src.com/calpuff/data/terrain.html). Make sure to rename this file to the name given here if necessary.

  • n11w086.bil, n12w086.bil, n11w087.bil, n12w087.bil – (If using 90m resolution data) The DEM data files the Masaya region from the SRTM 3-sec dataset (downloaded via https://earthexplorer.usgs. gov/ – choose ‘SRTM Void Filled’ and ’BIL’ format). Make sure to rename the files to the names given here if necessary.

  • (optional) xy_masaya.dat – This is a 2-column text file containing the x and y coordinates (in km, in the same projection as used for the main grid) of receptor points at which the terrain height will be calculated in addition to the gridded points in the main output file (only output if LXY = T in the input file).

Python generated Topography

3dNicaragua.py

python3 <py-path>/3dNicaragua.py <demFile>

demFile = a tab delimited ASCII file with the 6 lines of metadata (ncols, nrows, xllcorner, yllcorner, cellsize, NODATA_value) followed by a matrix of topographic heights (m) where the top-left/bottom-right heights correspond to the North-West/South-East corners of the area covered by the DEM data

  • The DEM metadata is read in, and the lower left x and y coordinates, along with the cell size, is used to calculate the projected coordinates of each data point. These are then converted to lat/lon using the utm package, assuming a UTM zone P16 projected coordinate system (appropriate for the Masaya area of Nicaragua).
  • The DEM height data are also read in, and any ‘NODATA’ values (measurements taken over water) are replaced with zeros.
  • The Basemap and matplotlib packages are used to plot the 3D data.
  • The ‘stride’ parameter is hard-coded to 100 but can be reduced to increase the resolution of the plot (takes longer to execute).
Clone this wiki locally