From c9264d9d9ea0ef5d17591be612781273314faae6 Mon Sep 17 00:00:00 2001
From: Joern Behrens <joern.behrens@uni-hamburg.de>
Date: Sun, 6 Mar 2022 18:54:27 +0100
Subject: [PATCH] corrected latitude determination

---
 flash2d/src/options-sphere/ADV_wind_stacked.f90 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flash2d/src/options-sphere/ADV_wind_stacked.f90 b/flash2d/src/options-sphere/ADV_wind_stacked.f90
index 3d7d534..a50e3bd 100644
--- a/flash2d/src/options-sphere/ADV_wind_stacked.f90
+++ b/flash2d/src/options-sphere/ADV_wind_stacked.f90
@@ -527,8 +527,8 @@
       END IF
 
       determine_lat: DO i_cnt=1, i_lat-1
-        IF(REAL(r_lat(i_cnt),GRID_SR) .LT. r_coord(2)) THEN
-          IF(REAL(r_lat(i_cnt +1),GRID_SR) .GE. r_coord(2)) THEN
+        IF(REAL(r_lat(i_cnt),GRID_SR) .GE. r_coord(2)) THEN
+          IF(REAL(r_lat(i_cnt +1),GRID_SR) .LT. r_coord(2)) THEN
             i_loy= i_cnt
             i_hiy= i_cnt+1
             exit determine_lat
-- 
GitLab