Skip to content

Conversation

@C2oWisComing
Copy link
Contributor

Description Of Changes

Add a function for SWEAT Index calculation based on this formula:
SWEAT = 12Td850 + 20(TT - 49) + 2f850 + f500 + 125(S + 0.2)

Test data from http://weather.uwyo.edu/cgi-bin/sounding?region=seasia&TYPE=GIF%3ASKEWT&YEAR=2021&MONTH=09&FROM=1700&TO=1700&STNM=48453

Checklist

@C2oWisComing C2oWisComing requested a review from a team as a code owner July 12, 2022 07:46
@C2oWisComing C2oWisComing requested review from dcamron and removed request for a team July 12, 2022 07:46
Copy link
Contributor Author

@C2oWisComing C2oWisComing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add SWEAT Index calculate function.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies on it taking so long to review this, but as we get ready for a new release, it'd be great to get this in.

If you don't mind, I'd prefer to use one of our existing references than continue to expand the list, just to keep things simple.

I also made some suggestions that make the implementation more robust towards units and made it possible that it might work with grids (and eliminated some conditions that weren't checked by tests).

@dopplershift dopplershift added Type: Feature New functionality Area: Calc Pertains to calculations labels Sep 15, 2022
@dopplershift dopplershift added this to the September 2022 milestone Sep 15, 2022
@C2oWisComing
Copy link
Contributor Author

Thank you for your kind review. I will fix it all asap.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more suggested changes. The change to the calculation somehow got missed and not included in my last review (oops). The changes to the docstring should fix the linting errors.

dopplershift
dopplershift previously approved these changes Sep 20, 2022
@dopplershift
Copy link
Member

Hrmmm...we're hitting a RecursionError on the minimum versions run, probably due to some kind of numpy + units problem. I'm digging in now.

@C2oWisComing
Copy link
Contributor Author

Thank you I really appreciate your help.

C2oWisComing and others added 3 commits September 21, 2022 16:54
This is still well-within our window and fixes a RecursionError
in the SWEAT test due to adding a numpy scalar to a dimensionless
quantity.
@dopplershift dopplershift merged commit fc46d12 into Unidata:main Sep 22, 2022
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

Status: Done

Development

Successfully merging this pull request may close these issues.

SWEAT Index

2 participants