Skip to content

Commit

Permalink
Merge branch 'tmp' into restructure_xr
Browse files Browse the repository at this point in the history
  • Loading branch information
bohlinger committed Nov 22, 2023
2 parents d247d73 + 8766fb8 commit b1a58eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions wavy/filtermod.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,22 +539,22 @@ def filter_footprint_land_interaction(self, **kwargs):
Filters away the ones that do interact and returns a clean data set.
"""
print("Apply filter_footprint_land_interaction")
domain = kwargs.get('domain', 'lonlat')
new = deepcopy(self)
if "fpr" in list(new.vars.keys()):
pass
else:
new = new.compute_pulse_limited_footprint_radius()
_, _, _, _, ls_idx_lst = new._generate_xtrack_footprints(domain)
_, _, _, _, ls_idx_lst = new._generate_xtrack_footprints(**kwargs)
# apply indices to dataset
new.vars = new.vars.isel(time=ls_idx_lst)
print(" Number of disregarded values:",
(len(self.vars.lons)-len(ls_idx_lst)))
print(" Number of remaining values:", len(new.vars['time']))
return new

def _generate_xtrack_footprints(self, domain):
n = 500 + 1
def _generate_xtrack_footprints(self, **kwargs):
domain = kwargs.get('domain', 'lonlat')
n = kwargs.get('number_of_seeds', 250) + 1
new = deepcopy(self)
lons = new.vars.lons.values
lats = new.vars.lats.values
Expand Down
5 changes: 4 additions & 1 deletion wavy/quicklookmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ def quicklook(self, a=False, projection=None, **kwargs):
# plot sat
if kwargs.get("plot_xtrack_pulse_limited_fpr") is not None:
domain = kwargs.get('domain', 'lonlat')
number_of_seeds = kwargs.get('number_of_seeds', 100)
lons_perp, lats_perp, _, _, ls_idx_lst = \
self._generate_xtrack_footprints(domain)
self._generate_xtrack_footprints(
domain=domain,
number_of_seeds=number_of_seeds)
sc2 = ax.scatter(lons_perp, lats_perp,
s=.2, c='b', marker='.',
edgecolor='face',
Expand Down

0 comments on commit b1a58eb

Please sign in to comment.