Skip to content
Snippets Groups Projects
Commit 13b80754 authored by tomrink's avatar tomrink
Browse files

add a helper method

parent 8d904554
No related branches found
No related tags found
No related merge requests found
...@@ -265,6 +265,24 @@ def get_navigation(satellite='GOES16', domain='FD'): ...@@ -265,6 +265,24 @@ def get_navigation(satellite='GOES16', domain='FD'):
return nav return nav
def get_lon_lat_2d_mesh(nav, ll, cc):
num_elems = len(cc)
num_lines = len(ll)
cc = np.array(cc)
ll = np.array(ll)
x_rad = cc * nav.CFAC + nav.COFF
y_rad = ll * nav.LFAC + nav.LOFF
ll, cc = np.meshgrid(ll, cc, indexing='ij')
cc = cc.flatten()
ll = ll.flatten()
lon_s, lat_s = nav.lc_to_earth(cc, ll)
lons_2d = lon_s.reshape((num_lines, num_elems))
lats_2d = lat_s.reshape((num_lines, num_elems))
return lons_2d, lats_2d, x_rad, y_rad
# def compute_scale_offset(lon_a, lat_a, col_a, line_a, lon_b, lat_b, col_b, line_b): # def compute_scale_offset(lon_a, lat_a, col_a, line_a, lon_b, lat_b, col_b, line_b):
# lamda_a, theta_a = earth_to_sat(lon_a, lat_a) # lamda_a, theta_a = earth_to_sat(lon_a, lat_a)
# lamda_b, theta_b = earth_to_sat(lon_b, lat_b) # lamda_b, theta_b = earth_to_sat(lon_b, lat_b)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment