Skip to content

Fix error when using a template at different resolution to regrid a restart file#410

Merged
yantosca merged 1 commit intogeoschem:devfrom
1Dandan:regrid_restart
Feb 17, 2026
Merged

Fix error when using a template at different resolution to regrid a restart file#410
yantosca merged 1 commit intogeoschem:devfrom
1Dandan:regrid_restart

Conversation

@1Dandan
Copy link
Contributor

@1Dandan 1Dandan commented Feb 13, 2026

Name and Institution (Required)

Name: Dandan Zhang
Institution: Harvard University

Describe the update

I need to regrid restart file to a resolution that may not be available at the resolution of current generated restarts files.
As the template for a restarting file is only to add attributes, it should be benign to use templates at different resolutions.
Thus,

  • I removed the part of raising error when the template resolution does not match. Instead, I cleaned global attributes from the template and only add attributes when stretched GCHP is used.
  • I also update the drop to be drop_vars as drop is deprecated in newer xarray version.

Expected changes

It will allow regridding restart file to any spatial resolution regardless the resolution of the template restart file.

Reference(s)

N/A

@yantosca yantosca self-requested a review February 17, 2026 21:49
@yantosca yantosca self-assigned this Feb 17, 2026
@yantosca yantosca added category: Bug Fix Fixes a bug that was previously reported topic: Regridding Issues pertaining to horizontal & vertical regridding labels Feb 17, 2026
@yantosca yantosca added this to the 1.8.0 milestone Feb 17, 2026
@yantosca yantosca changed the base branch from main to dev February 17, 2026 22:06
Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @1Dandan. Looks good to merge!

@yantosca yantosca merged commit b240f16 into geoschem:dev Feb 17, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Bug Fix Fixes a bug that was previously reported topic: Regridding Issues pertaining to horizontal & vertical regridding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants