Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jthielen opened this issue Sep 21, 2022 · 0 comments
Open

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

jthielen opened this issue Sep 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jthielen
Copy link
Collaborator

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?
@jthielen jthielen added the enhancement New feature or request label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant