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,10 @@
:: Calculate effect of the model at a low height using difference distance-size
:: ratios for the recursive division of tesseroids.
:: WARNING: This is only an example. You should not use the -t option in
:: practice
tessgrd -r-3/3/-3/3 -b50/50 -z4e03 | ^
tessgzz model.txt -t0.0001 -lratio1.log | ^
tessgzz model.txt -t0.5 -lratio2.log | ^
tessgzz model.txt -t1 -lratio3.log | ^
tessgzz model.txt -v -lratio-default.log > output.txt

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Calculate effect of the model at a low height using difference distance-size
# ratios for the recursive division of tesseroids.
# WARNING: This is only an example. You should not use the -t option in practice
tessgrd -r-3/3/-3/3 -b50/50 -z4e03 | \
tessgzz model.txt -t0.0001 -lratio1.log | \
tessgzz model.txt -t0.5 -lratio2.log | \
tessgzz model.txt -t1 -lratio3.log | \
tessgzz model.txt -v -lratio-default.log > output.txt

View File

@@ -0,0 +1,2 @@
# Test tesseroid model file
-1.5 1.5 -1.5 1.5 0 -5000 200

18
cookbook/custom_ratio/plot.py Executable file
View File

@@ -0,0 +1,18 @@
"""
Plot the columns of the output files
"""
import sys
from matplotlib import pyplot as plt
import numpy as np
data = np.loadtxt(sys.argv[1], unpack=True)
shape = (int(sys.argv[2]), int(sys.argv[3]))
lon = np.reshape(data[0], shape)
lat = np.reshape(data[1], shape)
for i, value in enumerate(data[3:]):
value = np.reshape(value, shape)
plt.figure(figsize=(4, 3))
plt.title("Column %d" % (i + 4))
plt.contourf(lon, lat, value, 50)
plt.colorbar()
plt.savefig('column%d.png' % (i + 4))