Skip to content

Extending support for parcels.convert module #2468

@VeckoTheGecko

Description

@VeckoTheGecko

#2460 introduced the convert module of Parcels, which hints at a new API for Parcels.

  • Use (e.g.) convert.nemo_to_sgrid to convert data from the input data format to an SGRID compliant dataset - explicitly providing what fields they want to use
  • (optional) Modify the dataset
  • Pass the resulting dataset to FieldSet.from_sgrid_conventions() to ingest the rest

This allows users to have full control of the data ingestion process, as well as modify/correct the SGRID metadata before passing to the rest of Parcels.

Note that Parcels won't automatically discover metadata when it comes to fields - these need to be explicitly provided by the user. This makes our API more explicit and controllable by the user - removing some guesswork as to which variables they want to use for U and V - and also will promote users using cf_xarray more (via the ds.cf repr provided by cf_xarray).

This also means that the only metadata inspection needed by Parcels would be:

  • on the dimensions
  • on the coordinates
  • units (on the fields, and on coords/dims)
  • SGRID conventions

There won't be a need to look at standard names.

The following functions will need to be made to complete the conversion across to this conversion module:

  • convert.copernicusmarine_to_sgrid (and remove FieldSet.from_copernicusmarine)
  • convert.mitgcm_to_sgrid
  • convert.croco_to_sgrid
  • convert.mom5_to_sgrid
  • ...

It's still to be decided what the final API for these conversion methods are - and whether they all have the same API (which depends on the details of the models being supported).

It's also currently not clear what the ingestion for unstructured grids look like, and whether functions like convert.fesom2_to_ugrid will be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    oceanographyIssues that require knowledge of oceanography to completetrackingIssues used as a way of tracking other issuesv4

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions