Skip to content

Commit

Permalink
Merge PR #34 (Bug fix for stretched grid restart attribute check)
Browse files Browse the repository at this point in the history
This merge brings PR #34 (Bug fix for stretched grid restart attribute check,
by @lizziel) into the GCHP development stream (i.e. gchp/dev branch).

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.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Apr 24, 2024
2 parents d61f89a + 1a93445 commit 850f20a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/MAPL_CubedSphereGridFactory.F90
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ subroutine check_and_fill_consistency(this, unusable, rc)
_ASSERT(this%target_lat >= -90.0, 'Latitude should be greater than -90.0 degrees')
_ASSERT(this%target_lat <= 90, 'Latitude should be less than 90.0 degrees')
this%stretched_cube = .true.
this%target_lon=this%target_lon*pi/180.d0
this%target_lat=this%target_lat*pi/180.d0
this%target_lon=this%target_lon*MAPL_PI/180.0
this%target_lat=this%target_lat*MAPL_PI/180.0
end if

! Check decomposition/bounds
Expand Down

0 comments on commit 850f20a

Please sign in to comment.