Skip to content

Commit

Permalink
Update profile.py
Browse files Browse the repository at this point in the history
added case of no data
  • Loading branch information
jasontempestholt committed Jan 29, 2024
1 parent ccddc03 commit 60fafc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coast/data/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ def extract_en4_profiles(self, dataset_names, region_bounds, chunks: dict = {}):
self.read_en4(dataset_names, multiple=True, chunks=chunks)

pr = self.subset_indices_lonlat_box(lonbounds=[x_min, x_max], latbounds=[y_min, y_max])
pr = pr.process_en4()
if pr.dataset.id_dim.shape[0] >0:
pr = pr.process_en4()
else:
print("No data can't process")
return pr

@staticmethod
Expand Down

0 comments on commit 60fafc4

Please sign in to comment.