initial upload
This commit is contained in:
3
cookbook/simple_prism/model.txt
Executable file
3
cookbook/simple_prism/model.txt
Executable 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
25
cookbook/simple_prism/plot.py
Executable 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))
|
11
cookbook/simple_prism/simple_prism.bat
Executable file
11
cookbook/simple_prism/simple_prism.bat
Executable 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
|
BIN
cookbook/simple_prism/simple_prism.png
Executable file
BIN
cookbook/simple_prism/simple_prism.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 585 KiB |
11
cookbook/simple_prism/simple_prism.sh
Executable file
11
cookbook/simple_prism/simple_prism.sh
Executable 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
|
Reference in New Issue
Block a user