-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Currently, what is holding up the completion of L1_working_with_age_ensembles.ipynb is this line:
ensemble = pyleo.EnsembleGeoSeries.from_PaleoEnsembleArray(geo_series = ts, paleo_array = paleoValues, age_depth = ts.depth, paleo_depth = paleoDepth)
Traceback:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[26], line 8
1 ts = pyleo.GeoSeries(time = chronValues, value = paleo_row['paleoData_values'].iloc[0],
2 time_name = time_name, time_unit = time_unit,
3 value_name = value_name, value_unit = value_unit,
4 label = 'MD98-2181', archiveType = 'Marine sediment',
5 depth = chronDepth, depth_name = 'Depth', depth_unit = 'cm', lat = paleo_df['geo_meanLat'].iloc[0],
6 lon = paleo_df['geo_meanLon'].iloc[0])
----> 8 ensemble = pyleo.EnsembleGeoSeries.from_PaleoEnsembleArray(geo_series = ts, paleo_array = paleoValues, age_depth = ts.depth, paleo_depth = paleoDepth)
File [~/Documents/GitHub/Pyleoclim_util/pyleoclim/core/ensemblegeoseries.py:441](http://localhost:60043/doc/tree/~/Documents/GitHub/Pyleoclim_util/pyleoclim/core/ensemblegeoseries.py#line=440), in EnsembleGeoSeries.from_PaleoEnsembleArray(self, geo_series, paleo_array, paleo_depth, age_depth, extrapolate, verbose)
438 raise ValueError("Age depth and series time need to have the same length")
440 #Interpolate the age array to the value depth
--> 441 mapped_paleo = lipdutils.mapAgeEnsembleToPaleoData(
442 ensembleValues=paleo_array,
443 depthEnsemble=paleo_depth,
444 depthMapping=age_depth,
445 extrapolate=extrapolate
446 )
448 series_list = []
450 #check that mapped_age and the original time vector are similar, and that the object is not a geoseries object
File [~/Documents/GitHub/Pyleoclim_util/pyleoclim/utils/lipdutils.py:1187](http://localhost:60043/doc/tree/~/Documents/GitHub/Pyleoclim_util/pyleoclim/utils/lipdutils.py#line=1186), in mapAgeEnsembleToPaleoData(ensembleValues, depthEnsemble, depthMapping, extrapolate)
1184 depthMapping = np.array(depthMapping)
1186 #Interpolate
-> 1187 ensembleValuesMapped = np.zeros((len(depthMapping),np.shape(ensembleValues)[1])) #placeholder
1189 if extrapolate is True:
1190 for i in np.arange(0,np.shape(ensembleValues)[1]):
IndexError: tuple index out of range
@alexkjames I think you were the one who wrote this Pyleoclim
function - can you please take a look?
Metadata
Metadata
Assignees
Labels
No labels