Skip to content

[FEATURE]: Add functionality to organize WRF data into a DataTree #110

Open
@jthielen

Description

@jthielen

Description

WRF output can easily have a couple hundred data variables in a dataset, which is not ideal for interactive exploration of a dataset's contents. With DataTree, we would have a tree-like hierarchical data structure for xarray which could be used for this.

From @lpilz in #10:

  • Which diagnostics do we want to provide and do we want to expose them in a DataTree eventually?

One suggestion might be:

DataTree("root")
|-- DataNode("2d_variables")
|   |-- DataArrayNode("sea_surface_temperature")
|   |-- DataArrayNode("surface_temperature")
|   |-- DataArrayNode("surface_air_pressure")
|   |-- DataArrayNode("air_pressure_at_sea_level")
|   |-- DataArrayNode("air_temperature_at_2m") (?)
|   ....
|-- DataNode("3d_variables")
    |-- DataArrayNode("air_temperature")
    |-- DataArrayNode("air_pressure")
    |-- DataArrayNode("northward_wind")
    |-- DataArrayNode("eastward_wind")
    ....

Implementation

This would likely become a new accessor method, such as .xwrf.organize().

Tests

After xwrf.postprocess(), we have a post processed dataset (with likely many data variables). Then, after xwrf.organize(), we would have a DataTree with (a yet to be decided) tree-like grouping of data variables. Calling xwrf.organize() without xwrf.postprocess() would fail.

Questions

What form of heirarchy would we want to have and how deep?

  • 2d_variables vs. 3d_variables?
  • semantic grouping of variables, such as thermodynamic, grid_metrics, kinematic, accumulated, etc.?
  • Parse the WRF Registry somehow and assign groups based on that?
  • some other strategy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions