Skip to content

Automatic field calculation #3

Open

Description

@dopplershift

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.

Activity

  1. self-assigned this
    on Mar 31, 2014
  2. dopplershift commented on Dec 7, 2016

    @dopplershift
    MemberAuthor

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

  3. dopplershift commented on Dec 7, 2016

    @dopplershift
    MemberAuthor

    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.

  4. modified the milestone: on Mar 10, 2017
  5. removed this from the 0.7 milestone on Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions