Skip to content

Commit

Permalink
fix logic in SE interpolate_vector routines
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-eaton committed Aug 23, 2024
1 parent 04ceba6 commit a125750
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 11 additions & 1 deletion doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/dynamics/se/dycore/interpolate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down

0 comments on commit a125750

Please sign in to comment.