diff --git a/modules/util/romio.py b/modules/util/romio.py index 1133ca4962d80935a0c692ea070e81785acc3889..ca6b58ca62c5b5de87c588b740422e32df4b1191 100644 --- a/modules/util/romio.py +++ b/modules/util/romio.py @@ -3,6 +3,7 @@ import numpy as np from util.geos_nav import GEOSNavigation from netCDF4 import Dataset import pickle +from util.util import haversine_np def romio_to_fgf(filename, goes_e_w='EAST'): @@ -24,6 +25,11 @@ def romio_to_fgf(filename, goes_e_w='EAST'): nav = GEOSNavigation(sub_lon=-137.0) cc, ll = nav.earth_to_lc_s(lon_array.flatten(), lat_array.flatten()) + tlons, tlats = nav.lc_to_earth(cc, ll) + dist = haversine_np(lon_array.flatten(), lat_array.flatten(), tlons, tlats) + ok = np.invert(np.isnan(dist)) + print(np.average(dist[ok])) + print(np.histogram(dist[ok])) cc = cc.reshape(lon_array.shape) ll = ll.reshape(lon_array.shape)