Skip to content

execute_local_udf doesn't work with latest NetCDF files #314

@soxofaan

Description

@soxofaan

downloaded a netcdf file and tried to use execute_local_udf on it

execute_local_udf(udf_code, "copernicus-raw.nc")
...
ValueError: could not convert string to float: ''

reason: netcdf files from VITO backend now have a dimension-less "crs" variable

<xarray.Dataset>
Dimensions:  (t: 1, x: 215, y: 144)
Coordinates:
  * t        (t) datetime64[ns] 2013-01-10
  * x        (x) float64 4.001 4.004 4.007 4.01 4.013 ... 4.588 4.59 4.593 4.596
  * y        (y) float64 51.4 51.4 51.39 51.39 51.39 ... 51.01 51.01 51.0 51.0
Data variables:
    crs      |S1 b''
    DEM      (t, y, x) float32 nan 1.219 1.458 1.349 ... 6.339 11.01 14.49 14.49
Attributes:
    Conventions:  CF-1.8
    institution:  openEO platform

and that (string) variable is blindly being dragged in as a "band", and conversion to float fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions