-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path26.interp_gmt.py
More file actions
executable file
·38 lines (34 loc) · 1.14 KB
/
26.interp_gmt.py
File metadata and controls
executable file
·38 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
import sys, os
import numpy as np
import flac
import flac_interpolate as fi
import flac_gravity3 as fg
import matplotlib
#matplotlib.use('Agg')
from matplotlib import cm
import matplotlib.pyplot as plt
#-------------------------------------------------------------------
model = sys.argv[1]
frame = int(sys.argv[2])
plt.rcParams["font.family"] = "Times New Roman"
path='/home/jiching/geoflac/'
#path = '/scratch2/jiching/22winter/'
#path = '/scratch2/jiching/03model/'
#path = 'F:/model/'
# path = 'D:/model/'
path = '/Volumes/SSD500/model/'
savepath='/home/jiching/geoflac/data/'
savepath='/Volumes/SSD500/data/'
figpath='/home/jiching/geoflac/figure/'
figpath='/Users/ji-chingchen/OneDrive - 國立台灣大學/年會/2022/POSTER/'
phasein = 1
tin = 0
vis = 0
gravity = 0
#-------------------------------------------------------------------
if phasein:
phase_interpolate_file = savepath+model+'_frame_'+str(frame)+'interpolate_ph.txt'
cmd = 'tail -n +2 %(phase_interpolate_file)s | xyz2grd -G%(phgrd)s -I%(dx)f/%(dz)f -R%(xmin)f/%(xmax)f/%(zmin)f/%(zmax)f' % locals()
print(cmd)
#os.system(cmd)