gctl/dep/tesseroids/cookbook/dem_brasil/dem_density.py
2024-09-10 15:45:07 +08:00

14 lines
348 B
Python
Executable File

"""
Assign density values for the DEM points.
"""
import sys
import numpy
lons, lats, heights = numpy.loadtxt(sys.argv[1], unpack=True)
for i in xrange(len(heights)):
if heights[i] >=0:
print "%lf %lf %lf %lf" % (lons[i], lats[i], heights[i], 2670.0)
else:
print "%lf %lf %lf %lf" % (lons[i], lats[i], heights[i], 1670.0)