Skip to content

Commit 54ca71e

Browse files
committed
Remove year splicing which is a potential bug if simulation has a suffix in the filename
1 parent 8999df5 commit 54ca71e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pygem/bin/postproc/postproc_distribute_ice.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def pygem_to_oggm(pygem_simpath, oggm_diag=None, debug=False):
7676
area_m2(time, dis_along_flowline): float64
7777
thickness_m (time, dis_along_flowline): float64
7878
"""
79-
yr0, yr1 = pygem_simpath.split('_')[-3:-1]
80-
pygem_ds = xr.open_dataset(pygem_simpath).sel(year=slice(yr0, yr1))
79+
pygem_ds = xr.open_dataset(pygem_simpath)
8180
time = pygem_ds.coords['year'].values.flatten().astype(float)
8281
distance_along_flowline = pygem_ds['bin_distance'].values.flatten().astype(float)
8382
area = pygem_ds['bin_area_annual'].values[0].astype(float).T

0 commit comments

Comments
 (0)