Skip to content

Commit

Permalink
removed code for non-monotonic cmems observation files
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Sep 18, 2024
1 parent f226cf8 commit f55f973
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions dfm_tools/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,6 @@ def cmems_ssh_retrieve_data(row, dir_output, time_min=None, time_max=None,
# drop all unnecessary vars
ds = ds.drop_vars(["SLEV_QC","TIME_QC","DEPH_QC","LATITUDE","LONGITUDE","STATION","POSITION"], errors="ignore")

# check order of time variable
if not ds.time.to_pandas().index.is_monotonic_increasing:
# TODO: happens in some MO_TS_TG_RMN-* stations in NRT dataset, asked to fix
# Genova, Imperia, LaSpezia, Livorno, Ravenna, Venice
stat_name = row.loc["station_name_unique"]
print(f"[{stat_name} NOT MONOTONIC] ", end="")
del ds
os.remove(file_data_raw)
return
# ds = ds.sortby("time")

# slice on time extent
ds = ds.sel(time=slice(time_min, time_max))
if len(ds.time) == 0:
Expand Down

0 comments on commit f55f973

Please sign in to comment.