initial upload

This commit is contained in:
2021-05-05 10:58:03 +08:00
parent d6ffc7f33c
commit f1cf25db22
114 changed files with 83953 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# Test prism model file
2000 5000 2000 15000 0 5000 1000
10000 18000 10000 18000 0 5000 -1000

25
cookbook/simple_prism/plot.py Executable file
View File

@@ -0,0 +1,25 @@
"""
Plot the columns of the output files
"""
import sys
import pylab
data = pylab.loadtxt(sys.argv[1], unpack=True)
shape = (int(sys.argv[2]), int(sys.argv[3]))
lon = pylab.reshape(data[0], shape)
lat = pylab.reshape(data[1], shape)
xmin, xmax = lon.min(), lon.max()
ymin, ymax = lat.min(), lat.max()
for i, value in enumerate(data[3:]):
value = pylab.reshape(value, shape)
pylab.figure(figsize=(4, 3))
pylab.title("Column %d" % (i + 4))
pylab.axis('scaled')
pylab.pcolor(lon, lat, value)
pylab.colorbar()
pylab.contour(lon, lat, value, 12, color='k')
#pylab.xlabel("Longitude")
#pylab.ylabel("Latitude")
pylab.xlim(xmin, xmax)
pylab.ylim(ymin, ymax)
pylab.savefig('column%d.png' % (i + 4))

View File

@@ -0,0 +1,11 @@
:: Generate a regular grid, pipe it to all the computation programs,
:: and write the result to output.txt
tessgrd -r0/20000/0/20000 -b50/50 -z1000 | ^
prismpot model.txt | ^
prismgx model.txt | prismgy model.txt | prismgz model.txt | ^
prismgxx model.txt | prismgxy model.txt | ^
prismgxz model.txt | prismgyy model.txt | ^
prismgyz model.txt | prismgzz model.txt > output.txt

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Generate a regular grid, pipe it to all the computation programs,
# and write the result to output.txt
tessgrd -r0/20000/0/20000 -b50/50 -z1000 | \
prismpot model.txt | \
prismgx model.txt | prismgy model.txt | prismgz model.txt | \
prismgxx model.txt | prismgxy model.txt | \
prismgxz model.txt | prismgyy model.txt | \
prismgyz model.txt | prismgzz model.txt > output.txt