Skip to content

Commit

Permalink
updated mattern for matching zarr folders
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed Aug 31, 2024
1 parent ceee7a4 commit 8494fd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oceanstream/process/combine_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ def combine_zarr_files(input_folder, zarr_output_file=None, chunks=None):

def from_filename(file_name):
"""Extract creation time from the file name if it follows a specific pattern."""
pattern = r'(\d{4}[A-Z])?-D(\d{8})-T(\d{6})'
# pattern = r'(\d{4}[A-Z])?-D(\d{8})-T(\d{6})'
pattern = r'(\d{4}[A-Z])?-?D(\d{8})-T(\d{6})$'
match = re.search(pattern, file_name)

if match:
date_str = match.group(2)
time_str = match.group(3)
Expand Down

0 comments on commit 8494fd1

Please sign in to comment.