From b014029b0b2682895841131f0a6f2e2ef1190a48 Mon Sep 17 00:00:00 2001 From: Spencer Wong Date: Fri, 20 Sep 2024 14:18:45 +1000 Subject: [PATCH] Add TODO for filename regex --- umpost/conversion_driver_esm1p5.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umpost/conversion_driver_esm1p5.py b/umpost/conversion_driver_esm1p5.py index f692db3..2a96f9c 100755 --- a/umpost/conversion_driver_esm1p5.py +++ b/umpost/conversion_driver_esm1p5.py @@ -142,6 +142,8 @@ def get_nc_filename(fields_file_name, date=None): if date is None: return f"{fields_file_name}.nc" + # TODO: Use regex to extract stem and unit from filename to improve + # clarity, and for better handling of unexpected filenames. stem = fields_file_name[0:FF_UNIT_INDEX + 1] unit = fields_file_name[FF_UNIT_INDEX]