From bb864d372cb6549e0e74ca8ddf27faa6b41f7b53 Mon Sep 17 00:00:00 2001 From: 1Dandan Date: Mon, 27 Oct 2025 17:36:37 -0400 Subject: [PATCH 1/2] Fix the error then target lat/lon is exactly 0.0 --- gcpy/regrid_restart_file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcpy/regrid_restart_file.py b/gcpy/regrid_restart_file.py index e811f1ad..db5fd648 100644 --- a/gcpy/regrid_restart_file.py +++ b/gcpy/regrid_restart_file.py @@ -552,9 +552,9 @@ def regrid_restart_file( logging.info("Creating a stretched-grid restart file") if ( - (not COMMAND_LINE.stretch_factor) - or (not COMMAND_LINE.target_latitude) - or (not COMMAND_LINE.target_longitude) + COMMAND_LINE.stretch_factor is None + or COMMAND_LINE.target_latitude is None + or COMMAND_LINE.target_longitude is None ): ERROR_MESSAGE = ( "--stretched-grid was set but not all stretched-" From 56c21a085719e3956b7a178b994b430775f77800 Mon Sep 17 00:00:00 2001 From: 1Dandan Date: Tue, 28 Oct 2025 10:16:52 -0400 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d01f8b5e..1ff62e49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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 +- Fix the restart regridding for stretched GCHP when target lat/lon is exactly 0.0 in `gcpy/regrid_restart_file.py` + ## [1.6.2] - 2025-06-12 ### Added - Added `create_benchmark_sanity_check_table` routine to `gcpy/benchmark/benchmark_funcs.py` to test if variables are all zero or NaN