From 0185bb9f23ca9c9e96a22bf7ce09baa04c7d3491 Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Fri, 18 Mar 2022 16:03:57 -0400 Subject: [PATCH] The fix in CALUPDHEL.f (#458) * Modify CALUPDHEL.f for restricting undefined grids in computation. * Update VERSION to 10.0.12. --- VERSION | 2 +- sorc/ncep_post.fd/CALUPDHEL.f | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 89acc9519..59a550906 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.0.11 +10.0.12 diff --git a/sorc/ncep_post.fd/CALUPDHEL.f b/sorc/ncep_post.fd/CALUPDHEL.f index 11fbc98b2..b9e3bbbec 100644 --- a/sorc/ncep_post.fd/CALUPDHEL.f +++ b/sorc/ncep_post.fd/CALUPDHEL.f @@ -11,6 +11,7 @@ !! 11-01-11 M Pyle - converted to F90 for unified post !! 11-04-05 H Chuang - added B grid option !! 20-11-06 J Meng - USE UPP_MATH MODULE +!! 22-03-17 Wen Meng - Restrict computation from undefined grids. !! !! USAGE: CALL CALUPDHEL(UPDHEL) !! @@ -101,6 +102,8 @@ SUBROUTINE CALUPDHEL(UPDHEL) DO J=JSTA_M,JEND_M DO I=2,IM-1 + IF (HTSFC(I,J) < spval) THEN + R2DX = 1./(2.*DX(I,J)) R2DY = 1./(2.*DY(I,J)) @@ -133,6 +136,11 @@ SUBROUTINE CALUPDHEL(UPDHEL) ENDIF ENDDO l_loop + + ELSE + UPDHEL(I,J) = spval + ENDIF + ENDDO ENDDO