From 1a93445160189fb65469d6c72d11bf405187865b Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Thu, 18 Apr 2024 15:58:39 -0400 Subject: [PATCH] Make stretched grid target lat and lon computation consistent with restart 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 --- base/MAPL_CubedSphereGridFactory.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/MAPL_CubedSphereGridFactory.F90 b/base/MAPL_CubedSphereGridFactory.F90 index abd24727098d..c9b7853303b9 100644 --- a/base/MAPL_CubedSphereGridFactory.F90 +++ b/base/MAPL_CubedSphereGridFactory.F90 @@ -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