umr-lops / xsar

Synthetic Aperture Radar (SAR) Level-1 GRD python mapper for efficient xarray/dask based processing
https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/
MIT License
25 stars 8 forks source link

Improve raster variables #33

Open oarcher opened 2 years ago

oarcher commented 2 years ago

Originally posted by @oarcher in https://github.com/umr-lops/xsar/issues/30#issuecomment-1022623336

oarcher commented 2 years ago

We should also use a decorator to register a new raster.

something like:


@register_raster(get_function=bind(resource_strftime, ..., step=1))
def ecmwf_0100_1h(fname):
  ...
  ecmwf_ds.rio.write_crs("EPSG:4326", inplace=True)
  return ecmwf_ds