diff --git a/pyat/czcore.py b/pyat/czcore.py index 0615cc2..bc60e74 100644 --- a/pyat/czcore.py +++ b/pyat/czcore.py @@ -100,7 +100,7 @@ def call_Bellhop(freq, sd, dr, bathm, ssp, sed, base,azi): run_type = 'I' # incoherently sum beams, see AT docs for more info nbeams = 1000 alpha = np.linspace(-90, 90, 2) # min and max launch angle -20 degrees to 20 degrees - box = Box(Zmax, 100) # bound the region you let the beams go, depth in meters and range in km + box = Box(Zmax, Rmax+10) # bound the region you let the beams go, depth in meters and range in km deltas = 0 # length step of ray trace, 0 means automatically choose beam = Beam(RunType=run_type, Nbeams=nbeams, alpha=alpha, box=box, deltas=deltas) # package """删除ssp 已修改 8.26""" @@ -290,7 +290,7 @@ def child(freq, sd, dr, isPlot, bathm, ssp, sed, base, azi, descript): czdetail.descript = descript return CzData(azi, ranges, depths, TL, bathym, Rays, czdetail) -def call_cz(database, freq, lat, lon, azi, sourceDepth=10, dr=0.1, isPlot=False): +def call_cz(database, freq, lat, lon, azi, sourceDepth=10, R=100, dr=0.1, isPlot=False): sd = np.array([sourceDepth]) # Source depth results = [] @@ -301,7 +301,7 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, dr=0.1, isPlot=False # return czdata ''' 计算单个方向的会聚区 ''' if azi != None: - [bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=100, azi=azi) + [bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=R, azi=azi) if np.mean(bathm.d) >= 2000: ranges, depths, TL, bathym, Rays, czdetail = call_fangwei(freq, sd, dr, bathm, ssp, sed, base, azi, isPlot=isPlot) @@ -315,7 +315,7 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, dr=0.1, isPlot=False descripts = ["正北方向", "东北方向", "正东方向", "东南方向", "正南方向", "西南方向", "正西方向", "西北方向"] theta = np.arange(0, 359, 45) for i in range(8): - [bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=100, azi=theta[i]) + [bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=R, azi=theta[i]) if np.mean(bathm.d) >= 2000: applyResults.append(pool.apply_async(partial(child, freq, sd, dr, isPlot), (bathm, ssp, sed, base, theta[i], descripts[i]))) # applyResults.append(pool.apply_async(partial(child, database, freq, lat, lon, sd, isPlot), (pi,))) @@ -331,5 +331,5 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, dr=0.1, isPlot=False # ETOPO1Path = '/home/gan/下载/code/20220920/ETOPO1' # database = DataBase(ETOPO1Path, STPath) # database.set_timePeriod(timeIndex) -# res = call_cz(database, 300, 13, 115, 0, 60, True) +# res = call_cz(database, 300, 13, 115, None, 60, 150, 0.1, True) # a = 1