@@ -282,7 +282,9 @@ def from_xarray(cls, ds: xr.Dataset, uxgrid: Grid = None, ugrid_dims: dict = Non
282282 return cls (ds , uxgrid = uxgrid )
283283
284284 @classmethod
285- def from_healpix (cls , ds : Union [str , os .PathLike , xr .Dataset ], ** kwargs ):
285+ def from_healpix (
286+ cls , ds : Union [str , os .PathLike , xr .Dataset ], pixels_only : bool = True , ** kwargs
287+ ):
286288 """
287289 Loads a dataset represented in the HEALPix format into a ``ux.UxDataSet``, paired
288290 with a ``Grid`` containing information about the HEALPix definition.
@@ -291,6 +293,8 @@ def from_healpix(cls, ds: Union[str, os.PathLike, xr.Dataset], **kwargs):
291293 ----------
292294 ds: str, os.PathLike, xr.Dataset
293295 Reference to a HEALPix Dataset
296+ pixels_only : bool
297+ Whether to only compute pixels (`face_lon`, `face_lat`) or to also construct boundaries (`face_node_connectivity`, `node_lon`, `node_lat`)
294298
295299 Returns
296300 -------
@@ -308,7 +312,7 @@ def from_healpix(cls, ds: Union[str, os.PathLike, xr.Dataset], **kwargs):
308312 zoom = np .emath .logn (4 , (ds .sizes ["cell" ] / 12 )).astype (int )
309313
310314 # Attach a HEALPix Grid
311- uxgrid = Grid .from_healpix (zoom )
315+ uxgrid = Grid .from_healpix (zoom , pixels_only = pixels_only , ** kwargs )
312316
313317 return cls .from_xarray (ds , uxgrid , {"cell" : "n_face" })
314318
0 commit comments