diff --git a/hydromt_sfincs/utils.py b/hydromt_sfincs/utils.py index 5e4801c1..28648f7d 100644 --- a/hydromt_sfincs/utils.py +++ b/hydromt_sfincs/utils.py @@ -241,9 +241,9 @@ def write_xyn(fn: str = "sfincs.obs", gdf: gpd.GeoDataFrame = None, crs: int = N except: name = "obs" + str(point["id"]) if crs.is_geographic: - string = f"{x:12.6f}{y:12.6f} {name}\n" + string = f'{x:12.6f}{y:12.6f} "{name}"\n' else: - string = f"{x:12.1f}{y:12.1f} {name}\n" + string = f'{x:12.1f}{y:12.1f} "{name}"\n' fid.write(string) diff --git a/tests/data/sfincs_test/sfincs.obs b/tests/data/sfincs_test/sfincs.obs index 99e24534..b281e062 100644 --- a/tests/data/sfincs_test/sfincs.obs +++ b/tests/data/sfincs_test/sfincs.obs @@ -1,3 +1,3 @@ - 320037.8 5042898.4 obs1 - 327100.8 5046162.0 obs2 - 322030.6 5047006.9 obs3 + 320037.8 5042898.4 "obs1" + 327100.8 5046162.0 "obs2" + 322030.6 5047006.9 "obs3"