Skip to content

Commit

Permalink
removed unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gtramonte committed Jul 25, 2024
1 parent 997eb13 commit 81b8650
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions drivers/intake_geokube/afm.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,6 @@ def add_projection(dset: xr.Dataset, **kwargs) -> xr.Dataset:
enc["grid_mapping"] = "crs"
return dset

def _get_ds_attrs_names(pattern):
fmt = Formatter()
# get the dataset attrs from the pattern
ds_attr_names = [i[1] for i in fmt.parse(pattern) if i[1]]
return ds_attr_names


def _get_df_from_files_list(files, pattern, ds_attr_names):
l = []
for f in files:
d = reverse_format(pattern, f)
d[FILES_COL] = f
l.append(d)
df = pd.DataFrame(l)
if len(l) == 0:
raise ValueError(f"No files found for the provided path!")
# unique index for each dataset attribute combos - we create a list of files
df = df.groupby(ds_attr_names)[FILES_COL].apply(list).reset_index()
df = df.set_index(ds_attr_names)
return df

class CMCCAFMSource(GeokubeSource):
name = "cmcc_afm_geokube"
Expand Down

0 comments on commit 81b8650

Please sign in to comment.