From 5ff4f3fcdb78f357b5399c89dbdd333b64fe78d9 Mon Sep 17 00:00:00 2001 From: xincjin-NOAA <122945910+xincjin-NOAA@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:47:25 -0400 Subject: [PATCH] fix a bug in deter_sfc_gmi (#781) --- src/gsi/deter_sfc_mod.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gsi/deter_sfc_mod.f90 b/src/gsi/deter_sfc_mod.f90 index 271e81c5d2..2fa85f8ba5 100644 --- a/src/gsi/deter_sfc_mod.f90 +++ b/src/gsi/deter_sfc_mod.f90 @@ -1410,7 +1410,7 @@ subroutine deter_sfc_gmi(dlat_earth,dlon_earth,isflg) n_grid=int(40000 / grid_dist) + 1 klatn = max(klat1 - n_grid, 1) klonn = klon1 - n_grid - if (klonn < 0) klonn = nlon_sfc - klonn + if (klonn < 1) klonn = nlon_sfc - klonn klatpn = min((klat1 + n_grid), nlat_sfc) klonpn = klon1 + n_grid if (klonpn > nlon_sfc) klonpn = klonpn - nlon_sfc