From a125750122e825dbe65bbb55b2bd985b762e113f Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Fri, 23 Aug 2024 11:50:52 -0400 Subject: [PATCH] fix logic in SE interpolate_vector routines --- doc/ChangeLog | 12 +++++++++++- src/dynamics/se/dycore/interpolate_mod.F90 | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index f0244f31a1..5292ccce45 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,7 +3,7 @@ Tag name: Originator(s): jedwards, eaton Date: -One-line Summary: fix issues #1108, #1106, #1058; merge PR#1101 +One-line Summary: fix issues #1108, #1106, #1058, #1051; merge PR#1101 Github PR URL: https://github.com/ESCOMP/CAM/pull/1131 Purpose of changes (include the issue number and title text for each relevant GitHub issue): @@ -31,6 +31,11 @@ Issue #1058 - Remove unused pbuf variable smaw remains. It is used locally, and may be written to history file (UW_turbtype). +Issue #1051 - Bad logic in SE dycore "interpolate_vector" subroutines +- These subroutines are not currently used by CAM as they are restricted to + interpolating fields on the GLL grid. Fix the conditional logic and + update the endrun message. + Describe any changes made to build system: @@ -65,6 +70,11 @@ src/control/cam_snapshot_common.F90 . fill_pbuf_info - remove smaw, turbtype +src/dynamics/se/dycore/interpolate_mod.F90 +. interpolate_vector2d and interpolate_vector3d + - fix conditional logic and clarify endrun message to indicate that the + input fields must be on the GLL grid. + src/physics/cam/eddy_diff.F90 . caleddy - remove intent(out) arg sm_aw diff --git a/src/dynamics/se/dycore/interpolate_mod.F90 b/src/dynamics/se/dycore/interpolate_mod.F90 index 65e1e26c9b..55093dad73 100644 --- a/src/dynamics/se/dycore/interpolate_mod.F90 +++ b/src/dynamics/se/dycore/interpolate_mod.F90 @@ -1625,8 +1625,8 @@ subroutine interpolate_vector2d(interpdata,elem,fld_cube,npts,fld,input_coords, if (npts==np) then interp => interp_p - else if (npts==np) then - call endrun('interpolate_vector2d: Error in interpolate_vector(): input must be on velocity grid') + else + call endrun('interpolate_vector2d: Error in interpolate_vector(): input must be on GLL grid') endif @@ -1715,8 +1715,8 @@ subroutine interpolate_vector3d(interpdata,elem,fld_cube,npts,nlev,fld,input_coo if (npts==np) then interp => interp_p - else if (npts==np) then - call endrun('interpolate_vector3d: Error in interpolate_vector(): input must be on velocity grid') + else + call endrun('interpolate_vector3d: Error in interpolate_vector(): input must be on GLL grid') endif