Skip to content

Commit

Permalink
Merge branch 'NCAR:main' into adf_case_dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpm authored Jun 12, 2024
2 parents 142d4e5 + 536325f commit 935b6f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/analysis/amwg_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def amwg_table(adf):
#-----------------------------------------

#Loop over CAM cases:
#Initialize list of case name csv files for case comparison check later
csv_list = []
for case_idx, case_name in enumerate(case_names):

#Convert output location string to a Path object:
Expand Down Expand Up @@ -306,6 +308,9 @@ def amwg_table(adf):
print(f"\n\tAMWG table for '{case_name}' not created.\n")
#End try/except

#Keep track of case csv files for comparison table check later
csv_list.extend(sorted(output_location.glob(f"amwg_table_{case_name}.csv")))

#End of model case loop
#----------------------

Expand All @@ -314,7 +319,7 @@ def amwg_table(adf):
#Check if observations are being compared to, if so skip table comparison...
if not adf.get_basic_info("compare_obs"):
#Check if all tables were created to compare against, if not, skip table comparison...
if len(sorted(output_location.glob("*.csv"))) != len(case_names):
if len(csv_list) != len(case_names):
print("\tNot enough cases to compare, skipping comparison table...")
else:
#Create comparison table for both cases
Expand Down

0 comments on commit 935b6f4

Please sign in to comment.