Skip to content

Commit bc14ebb

Browse files
fix errors with running on windows
1 parent f8ed451 commit bc14ebb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

schimpy/clip_dems.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def load_dem_list(dem_spec_yaml):
8282

8383
if isinstance(data, dict) and "dem_list" in data:
8484
dem_list = data["dem_list"]
85+
elif isinstance(data, dict) and "dem_list" in data["mesh"]:
86+
dem_list = data["mesh"]["dem_list"]
8587
elif isinstance(data, dict) and "dem" in data and isinstance(data["dem"], dict) and "dem_list" in data["dem"]:
8688
dem_list = data["dem"]["dem_list"]
8789
else:
@@ -195,7 +197,7 @@ def clip_dem(xlo, xhi, demlist="dem.txt", outformat="AAIGrid",
195197
* ds_dy
196198
)
197199
print("Approx number of raster cells: %s " % int(approx_size))
198-
outname = "%s_%s.%s" % (prefix, iout, extension)
200+
outname = os.path.abspath("%s_%s.%s" % (prefix, iout, extension))
199201
if hshift:
200202
shift = "-a_ullr %s %s %s %s " % (
201203
win_xlo[0] + ds_dx / 2.0,

0 commit comments

Comments
 (0)