Skip to content

Commit

Permalink
GCPy 1.3.3 release
Browse files Browse the repository at this point in the history
Important features include
- Updates and fixes for benchmark scripts
- Improved documentation for installing Conda and GCPy
- Improved documentation for GCHP regridding
- General code cleanup

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Mar 9, 2023
2 parents f8da728 + f620801 commit 84d11cb
Show file tree
Hide file tree
Showing 22 changed files with 2,706 additions and 1,262 deletions.
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,34 @@ All notable changes to GCPy will be documented in this file.

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).

## Unreleased
## [1.3.3] -- 2023-03-09
### Added
- Updated installation documentation, we now recommend users to create
a conda environment using the `environment.yml` file
- Benchmark summary table output (intended for 1hr & 1mo benchmarks)
- Species/emissions/inventories that differ between Dev & Ref versions are now printed at the top of the benchmark emissions, inventory, and global mass tables. if there are too many species with diffs, an alternate message is printed.
- New functions in `benchmark.py` and `util.py` to facilitate printing of the species/emissions/inventories that differ between Dev & Ref versions.
- Added new RTD documentation for installing Conda 4.12.0 with Miniconda
- Added GCHP regridding environnment file `docs/environment_files/gchp_regridding.yml`

### Changed
- Applied cleanup susggestions from pylint to `benchmark.py`, `util.py`, `plot.py`, `oh_metrics.py`, `ste_flux.py`
- Replaced format with f-strings in `benchmark.py`, `util.py`, `plot.py`, `oh_metrics.py`, `ste_flux.py`
- Abstract some common in `benchmark.py` into functions
- Replaced direct calls to `yaml.load` with `util.read_config.file`
- Restore tag information to benchmark `refstr` and `devstr` labels
- Add a newline to diff-of-diffs refstr and devstr if the string is too long.
- Updated GCHP regridding documentation
- Restored `ipython` and `jupyter ` to environment file `environment.yml`

## [1.3.2] -- 2022-10-25

### Changed
- Bug fix: Fixed malformed version declaration for cartopy (use `==`
### Fixes
- Fixed malformed version declaration for cartopy (use `==`
instead of `=`) in setup.py. This was preventing upload to
conda-forge.

- Vertically flip GCHP emissions when computing transport tracers budget

## [1.3.1] -- 2022-10-25

### Changed
Expand Down
1 change: 1 addition & 0 deletions benchmark/1mo_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ options:
ops_budget_table: False
OH_metrics: True
ste_table: True # GCC only
summary_table: True
plot_options: # Plot concentrations and emissions by category?
by_spc_cat: True
by_hco_cat: True
115 changes: 115 additions & 0 deletions benchmark/1yr_ch4_benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
&---
# =====================================================================
# Benchmark configuration file (**EDIT AS NEEDED**)
# customize in the following manner:
# (1) Edit the path variables so that they point to folders w/ model data
# (2) Edit the version strings for each benchmark simulation
# (3) Edit the switches that turn on/off creating of plots and tables
# (4) If necessary, edit labels for the dev and ref versions
# Note: When doing GCHP vs GCC comparisions gchp_dev will be compared
# to gcc_dev (not gcc_ref!). This ensures consistency in version names
# when doing GCHP vs GCC diff-of-diffs (mps, 6/27/19)
# =====================================================================
#
# Configuration for 1yr CH4Benchmark
#
# paths:
# main_dir: High-level directory containing ref & dev rundirs
# results_dir: Directory where plots/tables will be created
# weights_dir: Path to regridding weights
# spcdb_dir: Folder in which the species_database.yml file is
# located. If set to "default", then will look for
# species_database.yml in one of the Dev rundirs.
#
paths:
main_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/geos-chem/validation/gcpy_test_data/1yr_fullchem
results_dir: /path/to/BenchmarkResults
weights_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/GCHP/RegriddingWeights
spcdb_dir: default
#
# data: Contains configurations for ref and dev runs
# version: Version string (must not contain spaces)
# dir: Path to run directory
# outputs_subdir: Subdirectory w/ GEOS-Chem diagnostic files
# restarts_subdir: Subdirectory w/ GEOS-Chem restarts
# bmk_start: Simulation start date (YYYY-MM-DDThh:mm:ss)
# bmk_end: Simulation end date (YYYY-MM-DDThh:mm:ss)
# resolution: GCHP resolution string
#
data:
ref:
gcc:
version: GCC_ref
dir: GCC_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_ref
dir: GCHP_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_13.1: False # for gcpy_test_data, edit if needed
is_pre_14.0: False # for gcpy_test_data, edit if needed
resolution: c24 # for gcpy_test_data, edit if needed
dev:
gcc:
version: GCC_dev
dir: GCC_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_dev
dir: GCHP_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_13.1: False # for gcpy_test_data, edit if needed
is_pre_14.0: False # for gcpy_test_data, edit if needed
resolution: c24 # for gcpy_test_data, edit if needed
#
# options: Specify the types of comparisons to perform
#
options:
bmk_type: CH4Benchmark
gcpy_test: False # Specify if this is a gcpy test validation run
comparisons:
gcc_vs_gcc:
run: True # True to run this comparison
dir: GCC_version_comparison
tables_subdir: Tables
gchp_vs_gcc:
run: False
dir: GCHP_GCC_comparison
tables_subdir: Tables
gchp_vs_gchp:
run: False
dir: GCHP_version_comparison
tables_subdir: Tables
gchp_vs_gcc_diff_of_diffs:
run: False
dir: GCHP_GCC_diff_of_diffs
#
# outputs: Types of output to generate (plots/tables)
#
outputs:
plot_conc: True
plot_emis: True
emis_table: True
plot_jvalues: False
plot_aod: False
mass_table: True
ops_budget_table: False
aer_budget_table: False
Ox_budget_table: False
ste_table: False
OH_metrics: True
plot_options:
by_spc_cat: True
by_hco_cat: True
17 changes: 6 additions & 11 deletions benchmark/modules/run_1yr_fullchem_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,9 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
gchp_vs_gcc_devstr = config["data"]["dev"]["gchp"]["version"]
gchp_vs_gchp_refstr = config["data"]["ref"]["gchp"]["version"]
gchp_vs_gchp_devstr = config["data"]["dev"]["gchp"]["version"]
diff_of_diffs_refstr = (
config["data"]["dev"]["gcc"]["version"]
+ " - "
+ config["data"]["ref"]["gcc"]["version"]
)
diff_of_diffs_devstr = (
config["data"]["dev"]["gchp"]["version"]
+ " - "
+ config["data"]["ref"]["gchp"]["version"]
)

diff_of_diffs_refstr = bmk.diff_of_diffs_toprow_title(config, "gcc")
diff_of_diffs_devstr = bmk.diff_of_diffs_toprow_title(config, "gchp")

########################################################################
### THE REST OF THESE SETTINGS SHOULD NOT NEED TO BE CHANGED ###
########################################################################
Expand Down Expand Up @@ -477,6 +469,7 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
"plot_options"]["by_spc_cat"],
plot_by_hco_cat=config["options"]["outputs"][
"plot_options"]["by_hco_cat"],
benchmark_type=bmk_type,
overwrite=True,
spcdb_dir=spcdb_dir,
)
Expand All @@ -501,6 +494,7 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
"plot_options"]["by_spc_cat"],
plot_by_hco_cat=config["options"]["outputs"][
"plot_options"]["by_hco_cat"],
benchmark_type=bmk_type,
overwrite=True,
spcdb_dir=spcdb_dir,
)
Expand Down Expand Up @@ -530,6 +524,7 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
dev,
gcc_vs_gcc_devstr,
dst=gcc_vs_gcc_resultsdir,
benchmark_type=bmk_type,
ref_interval=sec_per_month_ref,
dev_interval=sec_per_month_dev,
overwrite=True,
Expand Down
Loading

0 comments on commit 84d11cb

Please sign in to comment.