Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_regrid.py now uses DELP_DRY for delta-dry pressure variable name when creating GCHP files #297

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,3 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

# Use Node.js version 20 to avoid deprecation warnings
runs:
using: 'node20'
main: 'main.js'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- CS inquiry functions in `gcpy/cstools.py` now work properly for `xr.Dataset` and `xr.DataArray` objects
- Prevent an import error by using `seaborn-v0_8-darkgrid` in`gcpy/benchmark/modules/benchmark_models_vs_obs.py`
- `gcpy/file_regrid.py` now creates GCHP files with `DELP_DRY` instead of `DELPDRY`

## [1.4.2] - 2024-01-26
### Added
Expand Down
9 changes: 5 additions & 4 deletions gcpy/file_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,10 +1100,11 @@ def rename_restart_variables(
# ==============================================================
if towards_gchp:
for var in dset.data_vars.keys():
if "Met_DELPDRY" in var:
old_to_new[var] = "DELP_DRY"
if var.startswith("Met_"):
old_to_new[var] = var.replace("Met_", "")
if "DELPDRY" in var:
old_to_new[var] = "DELP_DRY"
else:
old_to_new[var] = var.replace("Met_", "")
if var.startswith("Chem_"):
old_to_new[var] = var.replace("Chem_", "")
if var.startswith("SpeciesRst_"):
Expand All @@ -1117,7 +1118,7 @@ def rename_restart_variables(
# checkpoint -> classic/diagnostic
# ==============================================================
for var in dset.data_vars.keys():
if var == "DELP_DRY":
if var == "DELP_DRY" or var == "DELPDRY":
old_to_new[var] = "Met_DELPDRY"
if var == "BXHEIGHT":
old_to_new[var] = "Met_BXHEIGHT"
Expand Down
Loading