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

Automatic field calculation #3

Open
dopplershift opened this issue Mar 31, 2014 · 2 comments · May be fixed by #2070
Open

Automatic field calculation #3

dopplershift opened this issue Mar 31, 2014 · 2 comments · May be fixed by #2070
Assignees
Labels
Area: Calc Pertains to calculations Type: Feature New functionality

Comments

@dopplershift
Copy link
Member

I have visions of being able to have certain fields automatically calculated on datasets. By providing a decorator for calculation functions (and utilizing unit handling), the calculations could specify its requirements, and a graph of relationships between the calculations could be generated. Using this graph, we could plot a course to calculate one variable from what's available.

@dopplershift dopplershift self-assigned this Mar 31, 2014
@dopplershift dopplershift added the Type: Feature New functionality label Apr 20, 2015
@dopplershift dopplershift added the Area: Calc Pertains to calculations label Jan 26, 2016
@dopplershift
Copy link
Member Author

As we add more calculations, like specific humidity, this becomes all the more interesting...

@dopplershift
Copy link
Member Author

dopplershift commented Dec 7, 2016

Ideas:

  • Decorator to register functions for what they take and what they produce
  • Strings like 'water_vapor_mixing_ratio' to identify parameters
  • Possibly need id for functions (if we can't use their name) so that you can optionally specify one to use. For example, AMS glossary has RH as e/e_s, while WMO has r_v / r_vs; these are slightly different. Would be nice to have these available and selectable.
  • Graph search to determine shortest path
  • Driver function for performing calculation; take a dictionary (or maybe a Dataset) of stuff saying what I have and a request for what I want.
  • Ability to override built-in calculations; essentially manually adding a node to the graph that could even be required to be in the final path
  • Optional debugging/warnings that some passed in parameters/relations are not used to catch naming problems

Questions:

  • Is it appropriate for things like EL, LCL, CAPE?
  • What about dimensionality?

Use case:
I have specific humidity, temperature, and pressure; I want to get dewpoint without:

  1. Creating a function to specifically enable this
  2. Needing to discover for myself the easiest way to do this with the built-in primitive functions

This could help simplify, or at least prevent the explosion of, the calculations module as we build up functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Type: Feature New functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants