Skip to content

Review changes for upcoming 0.11.0 release #508

@sandorkertesz

Description

@sandorkertesz

This is the discussion page for the major (breaking) changes in this release.

Xarray engine

A new Xarray engine "earthkit" was implemented and used by default in Field.to_xarray(). The old (cfgrib) engine can also be
invoked via engine="cfgrib". This is definitely a BREAKING change.

Q:

  • Is "earthkit" should be the default?
  • Should we print a warning on first calling to_xarray() that the default engine changed?

SimpleFieldList

This is a fieldlist that simply stores a list of arbitrary fields. It is a top level object and can be directly imported from earthkit-data. For detailed discussion see here: #471

Q:

  • Is it a good name?

Array backend

The array backends for the fields/fieldlists were refactored and simplified with some breaking changes. For detailed discussion see here: #471

Q:

  • The array-api-compat package became a mandatory dependency. Is it acceptable?

Field modification

The Field.copy() and Field.to_field() methods were added to alter field metadata and values. They have slightly different behaviours.

  • copy(): returns a new field containing modified metadata or/and values. The original field kept unaltered. The new field acts like a wrapper around the original field.
  • to_field(): returns a new (in-memory) ArrayField (values array + Metadata object). New values, array_backend and/or new metadata can be specified. Always calls override() to generate the metadata for the new ArrayField (so for GRIB data it clones a new handle). The name was chosen to match the existingFieldList.to_fieldlist() method, which currently turns a fieldlist into a SimpleFieldList containing ArrayFields (so basically calls to_field() on each field).

Q:

  • Is copy() a suitable name
  • Should we keep both copy() and to_field()? Or unify them? What should happen to to_fieldlist()?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions