Skip to content

Commit

Permalink
Rename files (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Sep 7, 2022
1 parent d716774 commit b8b8abe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions oggm/cli/prepro_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,24 +475,24 @@ def _time_log():

# And for level 2: shapes
if len(gdirs_cent) > 0:
opath = os.path.join(sum_dir, f'{rgi_reg}_centerlines.shp')
opath = os.path.join(sum_dir, f'centerlines_{rgi_reg}.shp')
utils.write_centerlines_to_shape(gdirs_cent, to_tar=True,
path=opath)
opath = os.path.join(sum_dir, f'{rgi_reg}_centerlines_smoothed.shp')
opath = os.path.join(sum_dir, f'centerlines_smoothed_{rgi_reg}.shp')
utils.write_centerlines_to_shape(gdirs_cent, to_tar=True,
ensure_exterior_match=True,
simplify_line=0.5,
corner_cutting=5,
path=opath)
opath = os.path.join(sum_dir, f'{rgi_reg}_flowlines.shp')
opath = os.path.join(sum_dir, f'flowlines_{rgi_reg}.shp')
utils.write_centerlines_to_shape(gdirs_cent, to_tar=True,
flowlines_output=True,
path=opath)
opath = os.path.join(sum_dir, f'{rgi_reg}_geom_widths.shp')
opath = os.path.join(sum_dir, f'geom_widths_{rgi_reg}.shp')
utils.write_centerlines_to_shape(gdirs_cent, to_tar=True,
geometrical_widths_output=True,
path=opath)
opath = os.path.join(sum_dir, f'{rgi_reg}_widths.shp')
opath = os.path.join(sum_dir, f'widths_{rgi_reg}.shp')
utils.write_centerlines_to_shape(gdirs_cent, to_tar=True,
corrected_widths_output=True,
path=opath)
Expand Down
6 changes: 3 additions & 3 deletions oggm/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,11 @@ def test_full_run(self):
'glacier_statistics_11.csv'))
assert 'main_flowline_length' in df
assert os.path.isfile(os.path.join(odir, 'RGI61', 'b_020', 'L2',
'summary', '11_centerlines.tar.gz'))
'summary', 'centerlines_11.tar.gz'))
assert os.path.isfile(os.path.join(odir, 'RGI61', 'b_020', 'L2',
'summary', '11_centerlines_smoothed.tar.gz'))
'summary', 'centerlines_smoothed_11.tar.gz'))
assert os.path.isfile(os.path.join(odir, 'RGI61', 'b_020', 'L2',
'summary', '11_widths.tar.gz'))
'summary', 'widths_11.tar.gz'))

df = pd.read_csv(os.path.join(odir, 'RGI61', 'b_020', 'L3', 'summary',
'glacier_statistics_11.csv'), index_col=0)
Expand Down

0 comments on commit b8b8abe

Please sign in to comment.