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

Bug fix for stretched grid restart attribute check #34

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

lizziel
Copy link

@lizziel lizziel commented Apr 18, 2024

This PR fixes a mismatch between stretched grid coordinates as computed from attributes in the restart file and in the configure files. Target lat/lon are read from file as REAL4 and written to checkpoint as REAL4. Conversion to radians, however, uses 180 degrees at double precision, while conversion back to lat/lon uses 180 degrees as single precision. This results in failing the online check that the coordinates are identical.

Please note that MAPL will have a major overhaul to MAPL3 soon. I am therefore applying the simplest fix to our fork only rather than change MAPL to compare lat/lon instead radians. However, I will check that the bug is not present in the MAPL3 development code.

closes geoschem/GCHP#404

…start

This update changes the conversion of input target lat and lon to avoid
small differences with output target lat and lon written to the restart
file. Both values are single precision but the conversion used double
precision 180 when converting from degrees to radians.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Copy link

@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 @lizziel. This is good to merge.

@yantosca yantosca self-assigned this Apr 24, 2024
@yantosca yantosca changed the title But fix for stretched grid restart attribute check Bug fix for stretched grid restart attribute check Apr 24, 2024
@yantosca yantosca added bugfix Fixes a previously-reported issue stretched grid Related to stretched grid simulation and removed bug Something isn't working labels Apr 24, 2024
@yantosca yantosca merged commit 850f20a into gchp/dev Apr 24, 2024
6 checks passed
@yantosca yantosca deleted the bugfix/stretch_grid_restart_attribute_check branch April 24, 2024 20:53
@yantosca
Copy link

GCHP integration tests all passed:

==============================================================================
GCHP: Execution Test Results

GCHP      #8b1f7ca GEOS-Chem submod update: Merge PR #2263 (Removed fixed date ranges)
GEOS-Chem #b54ad6df8 Merge PR #2263 (Remove hardcoded year range for met, restarts, BC)
HEMCO     #fddcae5 Update version to 3.8.1 for release

Number of execution tests: 11

Submitted as SLURM job: 29493409
==============================================================================
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a previously-reported issue stretched grid Related to stretched grid simulation
Projects
None yet
2 participants