8000 Add Weisman-Klemp analytical sounding function by aschueth · Pull Request #1676 · Unidata/MetPy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Weisman-Klemp analytical sounding function #1676

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aschueth
Copy link
Contributor
@aschueth aschueth commented Jan 28, 2021

As the title suggests, I added the Weisman-Klemp analytical sounding function to calc/indices.py.

@aschueth
Copy link
Contributor Author
aschueth commented Jan 28, 2021

The way I wrote this function has all the parameters as keyword arguments, and doesn't accept any normal arguments. The lack of normal arguments makes it a strange type of function. Is the formatting of the keyword arguments (as is) acceptable, or is there a better 8000 way to do it? Another option is to remove the keyword arguments and make it a static function, but in my opinion, it severely limits the flexibility of the function.

I am also unsure how to go about testing this since it is not a simple I/O function. Preliminarily, I was thinking of calculating CAPE, LCL, LFC, EL, and/or other parameters and comparing them to known values from this thermodynamic sounding. However, that would require the test function to use metpy calc functions which is somewhat recursive and might not be favorable?

Base automatically changed from master to main February 22, 2021 22:39
@dopplershift
Copy link
Member

@aschueth Thanks for coming back around to this and apologies on the delayed response.

  1. Actually, you can pass normal arguments, it's just that all arguments have defaults, so to pass by order you have to override all the others. I think the current interface is fine.
  2. Tests for this function per-se aren't probably precisely needed. I mean, if you have a reference for what the values at say 500 hPa or 850 hPa are, you could do that as a sanity check.
  3. More interesting is to use this function in tests for some of our other calculations. That would literally be the same test as you outlined above, but it would be testing our calculation functions, rather than necessarily the analytical sounding. Which I think very much has some value.

@dopplershift dopplershift requested a review from a team as a code owner October 31, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WK82 analytical sounding
2 participants
0