You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
Creating a function to specifically enable this
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.
Activity
dopplershift commentedon Dec 7, 2016
As we add more calculations, like specific humidity, this becomes all the more interesting...
dopplershift commentedon Dec 7, 2016
Ideas:
'water_vapor_mixing_ratio'to identify parameterse/e_s, while WMO hasr_v / r_vs; these are slightly different. Would be nice to have these available and selectable.Dataset) of stuff saying what I have and a request for what I want.Questions:
Use case:
I have specific humidity, temperature, and pressure; I want to get dewpoint without:
This could help simplify, or at least prevent the explosion of, the calculations module as we build up functionality.
Improve doc + linting (comment Unidata#3 in PR Unidata#3572)