Skip to content

Commit 5fbb1b3

Browse files
committed
Ensure arguments are in the correct order
gcpy/benchmark/modules/run_1yr_fullchem_benchmark.py - Make sure that "spcdb_files" is passed as the 7th argument to make_benchmark_operations_budget (following "dev_interval") - Trimmed trailing whitespace gcpy/benchmark/run_benchmark.py - Pass "colname" as the 5th argument to routines "make_benchmark_collection_2d_var_plots" and "make_benchmark_collection_3d_var_plots" (preceding "spcdb_files") - Make sure that "spcdb_files" is passed as the 7th argument to make_benchmark_operations_budget (following "dev_interval") - Removed a duplicate import of "make_benchmark_operations_budget" - Trimmed trailing whitespace CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
1 parent ac4c089 commit 5fbb1b3

File tree

3 files changed

+40
-24
lines changed

3 files changed

+40
-24
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to GCPy will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased] - TBD
8+
### Fixed
9+
- Passed `spcdb_files` as a non-keyword argument (following `dev_interval`) to `make_benchmark_operations_budget` where missing
10+
- Passed `colname` as a non-keyword argument to `make_benchmark_collection_2d_var_plots` and `make_benchmark_collection_3d_var_plots`
11+
12+
### Removed
13+
- Removed a duplicate import of `make_benchmark_operations_budget` in `gcpy/benchmark/run_benchmark.py`
14+
715
## [1.7.1] - 2026-02-03
816
### Changed
917
- Bumped `pip` to version 26.0 in `setup.py` and environment files

gcpy/benchmark/modules/run_1yr_fullchem_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,9 @@ def gcc_vs_gcc_ops_budg(mon):
747747
refpath,
748748
config["data"]["dev"]["gcc"]["version"],
749749
devpath,
750-
spcdb_files,
751750
sec_per_month_ref[mon],
752751
sec_per_month_dev[mon],
752+
spcdb_files,
753753
benchmark_type=bmk_type,
754754
label=f"at 01{bmk_mon_yr_strs_dev[mon]}",
755755
dst=gcc_vs_gcc_tablesdir,
@@ -1379,7 +1379,7 @@ def gchp_vs_gcc_mass_table(mon):
13791379
gchp_vs_gcc_devstr,
13801380
spcdb_files,
13811381
dst=gchp_vs_gcc_tablesdir,
1382-
overwrite=True,
1382+
overwrite=True,
13831383
subdst=date_str_dev,
13841384
ref_hdr_label=f"at {date_str_ref}",
13851385
dev_hdr_label=f"at {date_str_dev}",

gcpy/benchmark/run_benchmark.py

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
make_benchmark_mass_accumulation_tables, \
6262
make_benchmark_operations_budget, \
6363
make_benchmark_collection_2d_var_plots, \
64-
make_benchmark_collection_3d_var_plots, \
65-
make_benchmark_operations_budget
64+
make_benchmark_collection_3d_var_plots
6665
from gcpy.benchmark.modules.ste_flux import make_benchmark_ste_table
6766
from gcpy.benchmark.modules.oh_metrics import make_benchmark_oh_metrics
6867
from gcpy.benchmark.modules.run_1yr_fullchem_benchmark \
@@ -477,8 +476,8 @@ def run_benchmark_default(config):
477476
gcc_vs_gcc_refstr,
478477
dev,
479478
gcc_vs_gcc_devstr,
479+
colname,
480480
spcdb_files,
481-
colname=colname,
482481
var_prefix=colname,
483482
dst=gcc_vs_gcc_resultsdir,
484483
weightsdir=config["paths"]["weights_dir"],
@@ -504,8 +503,8 @@ def run_benchmark_default(config):
504503
gcc_vs_gcc_refstr,
505504
dev,
506505
gcc_vs_gcc_devstr,
506+
colname,
507507
spcdb_files,
508-
colname=colname,
509508
dst=gcc_vs_gcc_resultsdir,
510509
weightsdir=config["paths"]["weights_dir"],
511510
overwrite=True,
@@ -519,13 +518,14 @@ def run_benchmark_default(config):
519518
print("\n%%% Creating GCC vs. GCC 2D StateMet plots %%%")
520519

521520
# Create plots
521+
colname = "StateMet"
522522
make_benchmark_collection_2d_var_plots(
523523
refmet,
524524
gcc_vs_gcc_refstr,
525525
devmet,
526526
gcc_vs_gcc_devstr,
527+
colname,
527528
spcdb_files,
528-
colname="StateMet",
529529
var_prefix='Met',
530530
dst=gcc_vs_gcc_resultsdir,
531531
weightsdir=config["paths"]["weights_dir"],
@@ -540,13 +540,14 @@ def run_benchmark_default(config):
540540
print("\n%%% Creating GCC vs. GCC 3D StateMet plots %%%")
541541

542542
# Create plots
543+
colname = "StateMet"
543544
make_benchmark_collection_3d_var_plots(
544545
refmet,
545546
gcc_vs_gcc_refstr,
546547
devmet,
547548
gcc_vs_gcc_devstr,
549+
colname,
548550
spcdb_files,
549-
colname="StateMet",
550551
var_prefix='Met',
551552
dst=gcc_vs_gcc_resultsdir,
552553
weightsdir=config["paths"]["weights_dir"],
@@ -730,6 +731,7 @@ def run_benchmark_default(config):
730731
dev,
731732
gcc_ref_sec_diff,
732733
gcc_dev_sec_diff,
734+
spcdb_files,
733735
benchmark_type=config["options"]["bmk_type"],
734736
label=comparison_str,
735737
dst=gcc_vs_gcc_tablesdir,
@@ -865,7 +867,7 @@ def run_benchmark_default(config):
865867
overwrite=True,
866868
verbose=False,
867869
)
868-
870+
869871

870872
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
871873
# Create GCHP vs GCC benchmark plots and tables
@@ -1071,8 +1073,8 @@ def run_benchmark_default(config):
10711073
gchp_vs_gcc_refstr,
10721074
dev,
10731075
gchp_vs_gcc_devstr,
1076+
colname,
10741077
spcdb_files,
1075-
colname=colname,
10761078
var_prefix=colname,
10771079
dst=gchp_vs_gcc_resultsdir,
10781080
weightsdir=config["paths"]["weights_dir"],
@@ -1103,8 +1105,8 @@ def run_benchmark_default(config):
11031105
gchp_vs_gcc_refstr,
11041106
dev,
11051107
gchp_vs_gcc_devstr,
1108+
colname,
11061109
spcdb_files,
1107-
colname=colname,
11081110
dst=gchp_vs_gcc_resultsdir,
11091111
weightsdir=config["paths"]["weights_dir"],
11101112
overwrite=True,
@@ -1118,13 +1120,14 @@ def run_benchmark_default(config):
11181120
print("\n%%% Creating GCHP vs. GCC 2D StateMet plots %%%")
11191121

11201122
# Create plots
1123+
colname = "StateMet"
11211124
make_benchmark_collection_2d_var_plots(
11221125
refmet,
11231126
gchp_vs_gcc_refstr,
11241127
devmet,
11251128
gchp_vs_gcc_devstr,
1129+
colname,
11261130
spcdb_files,
1127-
colname="StateMet",
11281131
var_prefix='Met',
11291132
dst=gchp_vs_gcc_resultsdir,
11301133
weightsdir=config["paths"]["weights_dir"],
@@ -1139,13 +1142,14 @@ def run_benchmark_default(config):
11391142
print("\n%%% Creating GCHP vs. GCC 3D StateMet plots %%%")
11401143

11411144
# Create plots
1145+
colname = "StateMet"
11421146
make_benchmark_collection_3d_var_plots(
11431147
refmet,
11441148
gchp_vs_gcc_refstr,
11451149
devmet,
11461150
gchp_vs_gcc_devstr,
1151+
colname,
11471152
spcdb_files,
1148-
colname="StateMet",
11491153
var_prefix='Met',
11501154
dst=gchp_vs_gcc_resultsdir,
11511155
weightsdir=config["paths"]["weights_dir"],
@@ -1386,6 +1390,7 @@ def run_benchmark_default(config):
13861390
dev,
13871391
gcc_dev_sec_diff,
13881392
gchp_dev_sec_diff,
1393+
spcdb_files,
13891394
benchmark_type=config["options"]["bmk_type"],
13901395
label=comparison_str,
13911396
operations=[
@@ -1463,7 +1468,7 @@ def run_benchmark_default(config):
14631468
verbose=False,
14641469
dev_gchp=True
14651470
)
1466-
1471+
14671472
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14681473
# Create GCHP vs GCHP benchmark plots and tables
14691474
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1697,8 +1702,8 @@ def run_benchmark_default(config):
16971702
gchp_vs_gchp_refstr,
16981703
dev,
16991704
gchp_vs_gchp_devstr,
1705+
colname,
17001706
spcdb_files,
1701-
colname=colname,
17021707
var_prefix=colname,
17031708
dst=gchp_vs_gchp_resultsdir,
17041709
weightsdir=config["paths"]["weights_dir"],
@@ -1734,8 +1739,8 @@ def run_benchmark_default(config):
17341739
gchp_vs_gchp_refstr,
17351740
dev,
17361741
gchp_vs_gchp_devstr,
1742+
colname,
17371743
spcdb_files,
1738-
colname=colname,
17391744
dst=gchp_vs_gchp_resultsdir,
17401745
weightsdir=config["paths"]["weights_dir"],
17411746
overwrite=True,
@@ -1749,13 +1754,14 @@ def run_benchmark_default(config):
17491754
print("\n%%% Creating GCHP vs. GCHP 2D StateMet plots %%%")
17501755

17511756
# Create plots
1757+
colname = "StateMet"
17521758
make_benchmark_collection_2d_var_plots(
17531759
refmet,
17541760
gchp_vs_gchp_refstr,
17551761
devmet,
17561762
gchp_vs_gchp_devstr,
1763+
colname,
17571764
spcdb_files,
1758-
colname="StateMet",
17591765
var_prefix='Met',
17601766
dst=gchp_vs_gchp_resultsdir,
17611767
weightsdir=config["paths"]["weights_dir"],
@@ -1770,13 +1776,14 @@ def run_benchmark_default(config):
17701776
print("\n%%% Creating GCHP vs. GCHP 3D StateMet plots %%%")
17711777

17721778
# Create plots
1779+
colname = "StateMet"
17731780
make_benchmark_collection_3d_var_plots(
17741781
refmet,
17751782
gchp_vs_gchp_refstr,
17761783
devmet,
17771784
gchp_vs_gchp_devstr,
1785+
colname,
17781786
spcdb_files,
1779-
colname="StateMet",
17801787
var_prefix='Met',
17811788
dst=gchp_vs_gchp_resultsdir,
17821789
weightsdir=config["paths"]["weights_dir"],
@@ -1898,7 +1905,7 @@ def run_benchmark_default(config):
18981905
gchp_res=config["data"]["dev"]["gchp"]["resolution"],
18991906
gchp_is_pre_14_0=config["data"]["dev"]["gchp"]["is_pre_14.0"]
19001907
)
1901-
1908+
19021909
# Date strings for start of run
19031910
ref_date_str = datetime64_to_str(
19041911
gchp_ref_date,
@@ -2042,6 +2049,7 @@ def run_benchmark_default(config):
20422049
dev,
20432050
gchp_ref_sec_diff,
20442051
gchp_dev_sec_diff,
2052+
spcdb_files,
20452053
benchmark_type=config["options"]["bmk_type"],
20462054
label=comparison_str,
20472055
operations=[
@@ -2119,7 +2127,7 @@ def run_benchmark_default(config):
21192127
dst=gchp_vs_gchp_tablesdir,
21202128
overwrite=True,
21212129
)
2122-
2130+
21232131
# ==================================================================
21242132
# GCHP vs. GCHP summary table
21252133
# ==================================================================
@@ -2181,7 +2189,7 @@ def run_benchmark_default(config):
21812189
overwrite=True,
21822190
verbose=False,
21832191
)
2184-
2192+
21852193
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21862194
# Create GCHP vs GCC difference of differences benchmark plots
21872195
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2192,15 +2200,15 @@ def run_benchmark_default(config):
21922200

21932201
# Species database files (just use the gcc ones)
21942202
spcdb_files = get_species_database_files(config, "gcc", "gcc")
2195-
2203+
21962204
# Filepaths
21972205
gcc_ref = get_filepath(
2198-
gcc_vs_gcc_refdir,
2206+
gcc_vs_gcc_refdir,
21992207
"SpeciesConc",
22002208
gcc_ref_date
22012209
)
22022210
gcc_dev = get_filepath(
2203-
gcc_vs_gcc_devdir,
2211+
gcc_vs_gcc_devdir,
22042212
"SpeciesConc",
22052213
gcc_dev_date
22062214
)

0 commit comments

Comments
 (0)