SEISAMUSE

Jun Xie的博客

感谢Seisman写了FnetPy,可以很方便地下载数据。
安装:

1
pip install https://github.com/seisman/FnetPy/archive/master.zip

例子:

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
39
40
41
42
43
import os
from obspy.io.xseed import Parser
from FnetPy import Client
from datetime import datetime,timedelta
from obspy import read_inventory,read,Trace
from datetime import datetime
client = Client('用户名', '密码')

current_date=datetime(2013,1,1,0,0)
#current_date=datetime(2004,12,30,0,0)
end_date=datetime(2025,1,1,0,0)
output_dir='./seed'
raw_dir='./raw'
resp_dir='./resp'
os.makedirs(output_dir, exist_ok=True)
os.makedirs(raw_dir, exist_ok=True)
os.makedirs(resp_dir, exist_ok=True)
while (current_date<end_date):
start_time = current_data
start_str = current_date.strftime("%Y_%m_%d_%H_%M_%S")
name=start_str+".seed"
fname=os.path.join(raw_dir,name)
output_file=os.path.join(output_dir, name)
if os.path.exists(output_file):
print(f"[跳过] 文件已存在: {output_file}")
current_date+=timedelta(days=1)
continue
open(output_file, 'wb').close() # 创建空文件
if not os.path.exists(fname):
print('download data from '+str(start_time)+' to '+str(end_time))
client.get_waveform(start_time, duration_in_seconds=86400+3600,component="LHZ",filename=fname) # download
print('download '+fname+' down!')
current_date+=timedelta(days=1)
st = read(fname) # read
parser = Parser(fname) #parse
parser.write_resp(resp_dir, zipped=False)
for tr in st:
resp_file = f"RESP.{tr.get_id()}"
inv = read_inventory(os.path.join(resp_dir, resp_file))
tr.remove_response(inventory=inv, output="VEL")
#print(tr.stats)
st.write(output_file, format="MSEED")
print('Finished')

这个脚本可以下载2013到2025年Fnet所有台站的LHZ连续波形数据,数据长度为25小时,overlap 1小时。去除仪器响应后的速度记录存放在seed文件夹中。每天的数据名称为%Y_%m_%d_%H_%M_%S.seed。账户需要去NIED去申请,当然用我的也可以。

利用obspy的MassDownloader下载连续的波形示例。

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
import obspy
from obspy.clients.fdsn.mass_downloader import RectangularDomain, CircularDomain, \
Restrictions, MassDownloader
# Rectangular domain containing parts of southern Germany.
#domain = RectangularDomain(minlatitude=-15, maxlatitude=18,
# minlongitude=10, maxlongitude=22)
domain = CircularDomain(
latitude=0,
longitude=0,
minradius=0.0,
maxradius=12.0
)
restrictions = Restrictions(
# Get data for a whole year.
starttime=obspy.UTCDateTime(2005, 1, 15),
endtime=obspy.UTCDateTime(2007, 10, 15),
# Chunk it to have one file per day.
chunklength_in_sec=86400,
# Considering the enormous amount of data associated with continuous
# requests, you might want to limit the data based on SEED identifiers.
# If the location code is specified, the location priority list is not
# used; the same is true for the channel argument and priority list.
network="??", station="????", location="*", channel="LHZ",
# The typical use case for such a data set are noise correlations where
# gaps are dealt with at a later stage.
reject_channels_with_gaps=False,
# Same is true with the minimum length. All data might be useful.
minimum_length=0.0,
# Guard against the same station having different names.
minimum_interstation_distance_in_m=100.0)
# Restrict the number of providers if you know which serve the desired
# data. If in doubt just don't specify - then all providers will be
# queried.
#mdl = MassDownloader(providers=["IRIS","USGS","GFZ"])
mdl = MassDownloader()
mdl.download(domain, restrictions, mseed_storage="waveforms",
stationxml_storage="stations")

  1. Fast analysis of the seismic rupture SSA2py is an emergent python based software that allows fast analysis of the seismic rupture, making possible the near-realtime identification of the rupture characteristics after a significant seismic event.
  2. Fast matching filter Seismic matched-filter search for both CPU and GPU architectures.
  3. MUSIC Teleseismic Back-Projection Perform the Back-Projection Imaging on the seismograms of large earthquakes recorded by large-scale dense arrays.
  4. Seismic_BPMF Fully automated workflow for earthquake detection and location with the backprojection and matched filtering methods.
  5. ARRU_seismic_backprojection ARRU Phase Picker: Attention Recurrent‐Residual U‐Net for Picking Seismic P‐ and S‐Phase Arrivals.
  6. earthquake_back_projection Back-projection of high-frequency radiation from earthquake source using multiple arrays. Methodology is based on Ishii (2012).
  7. earthquake_detection Codes used in the earthquake detection and location method presented in Beauce et al. 2019, DOI: 10.1029/2019JB018110. A real data example is also provided.
  8. beampower Fast routines for seismic backprojection/beamforming for both CPU and GPU architectures.
  9. Iterative Linear Stress Inversion (ILSI) Python package for stress tensor inversion.
  10. Pyrocko A Python framework for efficient use of pre-computed Green’s functions in seismological and other physical forward and inverse source problems.

  deepseek很火,我也来凑热闹。之前发布的一些LLM都没关注本地部署,因为似乎要钱,而deepseek是免费的(贫穷限制了我的想象)。

阅读全文 »
0%