diff --git a/ingest_tools/ingest_tools/nos_ofs.py b/ingest_tools/ingest_tools/nos_ofs.py index 5627c2e..ff09e24 100644 --- a/ingest_tools/ingest_tools/nos_ofs.py +++ b/ingest_tools/ingest_tools/nos_ofs.py @@ -72,7 +72,8 @@ def generate_nos_model_run_glob_expression(key: str, model_date: str, model_hour ''' prefix, run_type, postfix = re.search(r'(.*).([f|n])\d{3}.\d{8}.t\d{2}z.(.*)', key).groups() model_run_type = ModelRunType.from_offset_prefix(run_type) - return f'{prefix}.{run_type}*.{model_date}.t{model_hour}z.{postfix}', model_run_type + glob_expression = '[0-9][0-9][0-9]' + return f'{prefix}.{run_type}{glob_expression}.{model_date}.t{model_hour}z.{postfix}', model_run_type def generate_nos_best_time_series_glob_expression(key: str) -> str: @@ -82,7 +83,8 @@ def generate_nos_best_time_series_glob_expression(key: str) -> str: The following expression will be created: nos/nos.dbofs.fields.f*.*.t*z.nc.zarr' ''' prefix, postfix = re.search(r'(.*).f\d{3}.\d{8}.t\d{2}z.(.*)', key).groups() - return f'{prefix}.f*.*.t*z.{postfix}' + glob_expression = 'f[0-9][0-9][0-9]' + return f'{prefix}.{glob_expression}.*.t*z.{postfix}' def generate_kerchunked_nos_model_run(region: str, bucket: str, key: str, concat_dims=List[str], identical_dims=List[str]): diff --git a/ingest_tools/requirements.txt b/ingest_tools/requirements.txt index 051b454..862c575 100644 --- a/ingest_tools/requirements.txt +++ b/ingest_tools/requirements.txt @@ -2,7 +2,7 @@ xarray==2023.9.0 s3fs==2023.9.2 zarr==2.16.1 scipy==1.11.3 -kerchunk@git+https://github.com/fsspec/kerchunk@5598f6834b439cafb822b9e01956de847eb7d583 +kerchunk@git+https://github.com/fsspec/kerchunk@cdd106b7ada2731c6f45018159f1d3d53acd8d3e python-dateutil==2.8.2 pytz==2023.3 numcodecs==0.11.0