diff --git a/modules/util/geos_nav.py b/modules/util/geos_nav.py index 58e8dfa663edc1644c89916d63c8d8bef3468d83..dd47b0ba3c9faf19f29e125e3b07246a1849d63f 100644 --- a/modules/util/geos_nav.py +++ b/modules/util/geos_nav.py @@ -95,8 +95,9 @@ class GEOSNavigation: r_1 = self.h - r_earth * np.cos(geocentric_lat) * np.cos(geographic_lon - self.sub_lon) r_2 = -r_earth * np.cos(geocentric_lat) * np.sin(geographic_lon - self.sub_lon) r_3 = r_earth * np.sin(geocentric_lat) + r = np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3) - if r_1 > self.h: + if r >= self.h: return np.nan, np.nan if self.scan_geom == 'GEOS': @@ -120,6 +121,7 @@ class GEOSNavigation: r_1 = self.h - r_earth * np.cos(geocentric_lat) * np.cos(geographic_lon - self.sub_lon) r_2 = -r_earth * np.cos(geocentric_lat) * np.sin(geographic_lon - self.sub_lon) r_3 = r_earth * np.sin(geocentric_lat) + r = np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3) if self.scan_geom == 'GEOS': lamda_sat = np.arctan(-r_2/r_1) @@ -128,8 +130,8 @@ class GEOSNavigation: lamda_sat = np.arcsin(-r_2/np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3)) theta_sat = np.arctan(r_3/r_1) - lamda_sat = np.where(r_1 > self.h, np.nan, lamda_sat) - theta_sat = np.where(r_1 > self.h, np.nan, theta_sat) + lamda_sat = np.where(r > self.h, np.nan, lamda_sat) + theta_sat = np.where(r > self.h, np.nan, theta_sat) return lamda_sat, theta_sat