Skip to content

Commit

Permalink
Patch to fix agg regression
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Oct 27, 2023
1 parent 23ab9c8 commit d562690
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ingest_tools/ingest_tools/nos_ofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]):
Expand Down
2 changes: 1 addition & 1 deletion ingest_tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d562690

Please sign in to comment.