Skip to content

Commit

Permalink
Partially fix asp_plot icesat plots
Browse files Browse the repository at this point in the history
  • Loading branch information
bpurinton committed Nov 19, 2024
1 parent 2e03f85 commit 70bad09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion asp_plot/altimetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def pull_atl06sr_multi_processing(

print(f"\nICESat-2 ATL06 request processing for: {key}")
fn = f"{fn_base}.parquet"
print(fn)

if os.path.exists(fn):
print(f"Existing file found, reading in: {fn}")
atl06sr = gpd.read_parquet(fn)
Expand Down
18 changes: 8 additions & 10 deletions asp_plot/cli/asp_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,26 @@ def main(

# ICESat-2 comparison
if plot_icesat:
icesat = Altimetry(dem_fn=asp_dem)
icesat = Altimetry(directory=directory, dem_fn=asp_dem)

icesat.pull_atl06sr(
esa_worldcover=True,
icesat.pull_atl06sr_multi_processing(
save_to_parquet=False,
)

icesat.filter_atl06sr(
mask_worldcover_water=True,
save_to_parquet=False,
save_to_csv=False,
)
icesat.filter_esa_worldcover(filter_out="water")

icesat.predefined_temporal_filter_atl06sr()

icesat.mapview_plot_atl06sr_to_dem(
title=f"Filtered ICESat-2 minus DEM (n={icesat.atl06sr_filtered.shape[0]})",
key="ground_seasonal",
save_dir=plots_directory,
fig_fn=f"{next(figure_counter):02}.png",
**ctx_kwargs,
)

icesat.histogram(
title=f"Filtered ICESat-2 minus DEM (n={icesat.atl06sr_filtered.shape[0]})",
key="ground_seasonal",
plot_aligned=False,
save_dir=plots_directory,
fig_fn=f"{next(figure_counter):02}.png",
)
Expand Down

0 comments on commit 70bad09

Please sign in to comment.