From 96005b353f2ab89a06f99982ec74c73465e3d942 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Fri, 17 Jan 2025 16:20:10 -0700 Subject: [PATCH] Minor Edit Review --- regional_mom6/regional_mom6.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/regional_mom6/regional_mom6.py b/regional_mom6/regional_mom6.py index 2038c21c..29c3e145 100644 --- a/regional_mom6/regional_mom6.py +++ b/regional_mom6/regional_mom6.py @@ -2302,13 +2302,8 @@ def setup_run_directory( # Check if we can implement tides if with_tides: - if not (self.mom_input_dir / "forcing").exists(): - all_files = os.listdir(Path(self.mom_input_dir)) - else: - all_files = os.listdir( - Path(self.mom_input_dir / "forcing") - ) + os.listdir(Path(self.mom_input_dir)) - tidal_files_exist = any("tidal" in filename for filename in all_files) + tidal_files_exist = any(Path(self.mom_input_dir).rglob("*tidal*")) + if not tidal_files_exist: raise ValueError( "No files with 'tidal' in their names found in the forcing or input directory. If you meant to use tides, please run the setup_tides_rectangle_boundaries method first. That does output some tidal files."