Skip to content

Commit

Permalink
Bug fixes for compare_diags.py example script
Browse files Browse the repository at this point in the history
gcpy/examples/diagnostics/compare_diags.py
- Import rename_and_flip_gchp_rst_vars function from gcpy.util

gcpy/examples/diagnostics/compare_diags.yml
- Added "n_cores: -1" to specify maximum parallelization

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Dec 21, 2023
1 parent a056352 commit 0b9b342
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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] - TBD
### Fixed
- Import error in `gcpy/examples/diagnostics/compare_diags.py`
- Added missing `n_cores` to `gcpy/examples/diagnostics/compare_diags.yml`

## [1.4.1] - 2023-12-08
### Fixed
- Now use the proper default value for the `--weightsdir` argument to `gcpy/file_regrid.py`
Expand Down
6 changes: 3 additions & 3 deletions gcpy/examples/diagnostics/compare_diags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import warnings
import numpy as np
from gcpy.util import add_missing_variables, compare_varnames, \
dataset_reader, read_config_file
dataset_reader, read_config_file, rename_and_flip_gchp_rst_vars
from gcpy.constants import skip_these_vars
from gcpy.plot.compare_single_level import compare_single_level
from gcpy.plot.compare_zonal_mean import compare_zonal_mean
Expand Down Expand Up @@ -109,8 +109,8 @@ def read_data(config):
# If the data is from a GCHP restart file, rename variables and
# flip levels to match the GEOS-Chem Classic naming and level
# conventions. Otherwise no changes will be made.
refdata = util.rename_and_flip_gchp_rst_vars(refdata)
devdata = util.rename_and_flip_gchp_rst_vars(devdata)
refdata = rename_and_flip_gchp_rst_vars(refdata)
devdata = rename_and_flip_gchp_rst_vars(devdata)

# Define dictionary for return
data = {
Expand Down
1 change: 1 addition & 0 deletions gcpy/examples/diagnostics/compare_diags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ options:
filename: ''
skip_small_diffs: True
small_diff_threshold: 0.0000
n_cores: -1

0 comments on commit 0b9b342

Please sign in to comment.