@@ -116,30 +116,30 @@ def model(self, value):
116
116
def sample_age_grid (self , lons , lats , time ):
117
117
# age_grid = self.downloader.get_age_grid(reconstruction_time)
118
118
if self .agegrid_filename :
119
- age_raster = gplately .Raster (filename = self .agegrid_filename .format (time ))
119
+ age_raster = gplately .Raster (data = self .agegrid_filename .format (time ))
120
120
elif self .downloader :
121
121
grid = self .downloader .get_age_grid (time )
122
- age_raster = gplately .Raster (array = grid , extent = [- 180 ,180 ,- 90 ,90 ])
122
+ age_raster = gplately .Raster (data = grid , extent = [- 180 ,180 ,- 90 ,90 ])
123
123
else :
124
124
raise ValueError ("Cannot download age grid. \
125
125
Set agegrid_filename or provide a supported reconstruction model" )
126
126
127
- age_raster .fill_NaNs (overwrite = True ) # fill in NaN values
127
+ age_raster .fill_NaNs (inplace = True ) # fill in NaN values
128
128
age_interp = age_raster .interpolate (lons , lats ) # interpolate to trenches
129
129
return age_interp
130
130
131
131
def sample_spreading_rate_grid (self , lons , lats , time ):
132
132
# spreadrate_grid = self.downloader.get_spreading_rate_grid(reconstruction_time)
133
133
if self .spreadrate_filename :
134
- spreadrate_raster = gplately .Raster (filename = self .spreadrate_filename .format (time ))
134
+ spreadrate_raster = gplately .Raster (data = self .spreadrate_filename .format (time ))
135
135
elif self .downloader :
136
136
grid = self .downloader .get_spreading_rate_grid (time )
137
- spreadrate_raster = gplately .Raster (array = grid , extent = [- 180 ,180 ,- 90 ,90 ])
137
+ spreadrate_raster = gplately .Raster (data = grid , extent = [- 180 ,180 ,- 90 ,90 ])
138
138
else :
139
139
raise ValueError ("Cannot download spreading rate grid. \
140
140
Set spreadrate_filename or provide a supported reconstruction model" )
141
141
142
- spreadrate_raster .fill_NaNs (overwrite = True )
142
+ spreadrate_raster .fill_NaNs (inplace = True )
143
143
spreadrate_interp = spreadrate_raster .interpolate (lons , lats )
144
144
return spreadrate_interp * 1e-3
145
145
@@ -262,7 +262,7 @@ def tessellate_slab_dip(self, time, tessellation_threshold_radians=DEFAULT_TESSE
262
262
output_subducting_absolute_velocity_components = True )
263
263
264
264
# mask "negative" subduction rates
265
- subduction_convergence = subduction_data [:,2 ]* 1e-2 * np .cos (np .deg2rad (subduction_data [:,3 ]))
265
+ subduction_convergence = np . fabs ( subduction_data [:,2 ]) * 1e-2 * np .cos (np .deg2rad (subduction_data [:,3 ]))
266
266
subduction_data = subduction_data [subduction_convergence >= 0 ]
267
267
268
268
subduction_lon = subduction_data [:,0 ]
@@ -273,6 +273,8 @@ def tessellate_slab_dip(self, time, tessellation_threshold_radians=DEFAULT_TESSE
273
273
subduction_pid_sub = subduction_data [:,8 ]
274
274
subduction_pid_over = subduction_data [:,9 ]
275
275
subduction_length = np .deg2rad (subduction_data [:,6 ]) * gplately .EARTH_RADIUS * 1e3 # in metres
276
+ subduction_convergence = np .fabs (subduction_data [:,2 ])* 1e-2 * np .cos (np .deg2rad (subduction_data [:,3 ]))
277
+ subduction_migration = np .fabs (subduction_data [:,4 ])* 1e-2 * np .cos (np .deg2rad (subduction_data [:,5 ]))
276
278
subduction_convergence = subduction_data [:,2 ]* 1e-2 * np .cos (np .deg2rad (subduction_data [:,3 ]))
277
279
subduction_migration = subduction_data [:,4 ]* 1e-2 * np .cos (np .deg2rad (subduction_data [:,5 ]))
278
280
subduction_plate_vel = subduction_data [:,10 ]* 1e-2
0 commit comments