@@ -122,7 +122,7 @@ def parse_args(args=None):
122122 "--ninst" ,
123123 default = 30 ,
124124 type = int ,
125- help = "The number of instances (should be the same for " " both cases)." ,
125+ help = "The number of instances (should be the same for both cases)." ,
126126 )
127127
128128 parser .add_argument (
@@ -158,6 +158,13 @@ def parse_args(args=None):
158158 "--alpha" , default = 0.05 , type = float , help = "Alpha threshold for pass / fail"
159159 )
160160
161+ parser .add_argument (
162+ "--hist-name" ,
163+ default = "h0" ,
164+ help = "History file extension [eam: h0, scream: h, mpas: hist], default: h0" ,
165+ type = str ,
166+ )
167+
161168 args , _ = parser .parse_known_args (args )
162169
163170 # use config file arguments, but override with command line arguments
@@ -287,10 +294,13 @@ def case_files(args):
287294 if args .test_case == args .ref_case :
288295 key1 += "1"
289296 key2 += "2"
290-
291297 f_sets = {
292- key1 : e3sm .component_monthly_files (args .test_dir , args .component , args .ninst ),
293- key2 : e3sm .component_monthly_files (args .ref_dir , args .component , args .ninst ),
298+ key1 : e3sm .component_monthly_files (
299+ args .test_dir , args .component , args .ninst , hist_name = args .hist_name
300+ ),
301+ key2 : e3sm .component_monthly_files (
302+ args .ref_dir , args .component , args .ninst , hist_name = args .hist_name
303+ ),
294304 }
295305
296306 for key in f_sets :
@@ -428,7 +438,9 @@ def main(args):
428438 args .test_case = key1
429439 args .ref_case = key2
430440
431- monthly_avgs = e3sm .gather_monthly_averages (ens_files , args .var_set )
441+ monthly_avgs = e3sm .gather_monthly_averages (
442+ ens_files , args .var_set , hist_name = args .hist_name
443+ )
432444 annual_avgs = (
433445 monthly_avgs .groupby (["case" , "variable" , "instance" ])
434446 .monthly_mean .aggregate (monthly_to_annual_avg )
0 commit comments