def cylinder(self,deltaT=300.0,radius=200.0,start_depth=100.0):
'''
creates a cylindrical temperature anomaly with a gaussian blur
usage: First read a temperature snapshot.
Params:
deltaT : cylinder excess temperature
radius : cylinder radius (im km)
start_depth: starting depth of the cylinder (default = 100.0)
'''
T_ref = self.T_adiabat[::-1]
T_here = np.zeros((self.npts_rad,self.npts_theta))
for i in range(0,self.npts_rad):
print T_ref[i]
km_per_degree = self.rad_km[i]*2*np.pi/360.0
for j in range(0,self.npts_theta):
cyl_th_here = radius / km_per_degree
th_here = self.theta[j]
depth_here = 6371.0 - self.rad_km[i]
if th_here <= cyl_th_here and depth_here > 100.0:
T_here[(self.npts_rad-1)-i,j] = T_ref[i] + deltaT
else:
T_here[(self.npts_rad-1)-i,j] = T_ref[i]
filtered = gaussian_filter(T_here,sigma=[0,3])
self.T = filtered
#self.T = T_here
评论列表
文章目录