Skip to content

Commit

Permalink
Merge pull request #1335 from metno/fix_read_pyaro_filters
Browse files Browse the repository at this point in the history
Adds better definition of filters. Adds tqdm to read_pyaro
  • Loading branch information
heikoklein authored Sep 5, 2024
2 parents 87d84b3 + 80a44e1 commit cc6279e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyaerocom/io/pyaro/pyaro_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PyaroConfig(BaseModel):
name: str
data_id: str
filename_or_obj_or_url: str
filters: dict[str, dict[str, list[str]]]
filters: dict[str, dict[str, list[str]] | dict[str, list[tuple]]]
name_map: dict[str, str] | None = None # no Unit conversion option

##########################
Expand Down
6 changes: 3 additions & 3 deletions pyaerocom/io/pyaro/read_pyaro.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from copy import deepcopy
from typing import NewType

from tqdm import tqdm

import numpy as np
from pyaro import list_timeseries_engines, open_timeseries
from pyaro.timeseries import Data, Reader, Station
Expand Down Expand Up @@ -161,9 +163,7 @@ def _convert_to_ungriddeddata(self, pyaro_data: dict[str, Data]) -> UngriddedDat
metadata_idx = 0
for var, var_data in pyaro_data.items():
size = var_size[var]
for i in range(
0, size
): # The 1 start is a temp fix for the empty first row of the current Data implementation from pyaro
for i in tqdm(range(size), disable=None):
data_line = var_data[i]
current_station = data_line["stations"]

Expand Down

0 comments on commit cc6279e

Please sign in to comment.