From da3552845041c559ba67364a4cc84ffcdb243d04 Mon Sep 17 00:00:00 2001 From: veenstrajelmer <60435591+veenstrajelmer@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:49:56 +0200 Subject: [PATCH] replaced delim_whitespace with sep (#922) --- dfm_tools/get_nc_helpers.py | 2 +- dfm_tools/observations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dfm_tools/get_nc_helpers.py b/dfm_tools/get_nc_helpers.py index e18a4a912..1f27fdba1 100644 --- a/dfm_tools/get_nc_helpers.py +++ b/dfm_tools/get_nc_helpers.py @@ -89,7 +89,7 @@ def rename_fouvars(ds:(xr.Dataset,xu.UgridDataset), drop_tidal_times:bool = True """ file_freqs = 'https://raw.githubusercontent.com/Deltares/hatyan/main/hatyan/data/data_foreman_frequencies.txt' #TODO: fix hatyan dependency (MSQM and M1 were also added, but file is not used by hatyan, so might disappear one day) - freqs_pd = pd.read_csv(file_freqs,names=['freq','dependents'],delim_whitespace=True,comment='#') + freqs_pd = pd.read_csv(file_freqs, names=['freq','dependents'], sep="\\s+", comment='#') freqs_pd['angfreq'] = freqs_pd['freq'] * 360 #deg/hr gridname = ds.grid.name diff --git a/dfm_tools/observations.py b/dfm_tools/observations.py index 01ef03d8c..aa212dc7d 100644 --- a/dfm_tools/observations.py +++ b/dfm_tools/observations.py @@ -694,7 +694,7 @@ def gesla3_ssh_retrieve_data(row, dir_output, time_min=None, time_max=None, file_gesla = row.name with gesla3_zip.open(file_gesla, "r") as f: - data = pd.read_csv(f, comment='#', delim_whitespace = True, + data = pd.read_csv(f, comment='#', sep="\\s+", names=["date", "time", "sea_level", "qc_flag", "use_flag"], parse_dates=[[0, 1]], index_col=0)