Skip to content

Commit

Permalink
Fix read_pace bug for V2 (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs authored Aug 7, 2024
1 parent 2a59624 commit d620dfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hypercoast/pace.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def read_pace_aop(filepath, engine="h5netcdf", **kwargs):
filepath, engine=engine, group="navigation_data", **kwargs
)
dataset = dataset.set_coords(("longitude", "latitude"))
dataset = dataset.rename({"pixel_control_points": "pixels_per_line"})
if "pixel_control_points" in dataset.dims:
dataset = dataset.rename({"pixel_control_points": "pixels_per_line"})
dataset = xr.merge([rrs, dataset.coords.to_dataset()])
dataset.coords["wavelength_3d"] = wvl.coords["wavelength_3d"]

Expand Down Expand Up @@ -117,7 +118,8 @@ def read_pace_bgc(
filepath, engine=engine, group="navigation_data", **kwargs
)
dataset = dataset.set_coords(("longitude", "latitude"))
dataset = dataset.rename({"pixel_control_points": "pixels_per_line"})
if "pixel_control_points" in dataset.dims:
dataset = dataset.rename({"pixel_control_points": "pixels_per_line"})
dataset = xr.merge([ds, dataset.coords.to_dataset()])
dataset = dataset.rename(
{
Expand Down

0 comments on commit d620dfb

Please sign in to comment.