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

Bnb/ws power law #165

Merged
merged 3 commits into from
Sep 14, 2023
Merged

Bnb/ws power law #165

merged 3 commits into from
Sep 14, 2023

Conversation

bnb32
Copy link
Collaborator

@bnb32 bnb32 commented Sep 11, 2023

No description provided.

@bnb32 bnb32 force-pushed the bnb/ws_power_law branch 3 times, most recently from 572d0f3 to 76777d0 Compare September 11, 2023 16:56
@bnb32
Copy link
Collaborator Author

bnb32 commented Sep 14, 2023

@grantbuster Main edits in feature_handling.py, interpolation.py, and test_data_handling_nc.py

Copy link
Member

@grantbuster grantbuster left a comment

Choose a reason for hiding this comment

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

minor thought on power law reference and alpha value

"""U wind component feature class with needed inputs method and compute
method. Uses power law extrapolation to get values above surface

https://en.wikipedia.org/wiki/Wind_profile_power_law
Copy link
Member

Choose a reason for hiding this comment

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

Thoughts on using this NOAA reference and set alpha=0.2 and put alpha as a class variable for transparency?

https://csl.noaa.gov/projects/lamar/windshearformula.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Class var is a good idea. Why the disagreement between the alpha values though?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure but NOAA is more defensible haha

Copy link
Member

Choose a reason for hiding this comment

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

our high school teachers would be so proud

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Our high school teachers were wrong. Wikipedia actually links to a paper. NOAA doesn't have a source for 0.2 that I can see?

Copy link
Member

Choose a reason for hiding this comment

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

Just a reminder to be really intentional when adding big test files like this. Every file added is added forever and bloats the repo size.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is trimmed for only needed vars but I misnamed it last merge.

input_files = [os.path.join(TEST_DATA_DIR, 'uas_test.nc')]

with xr.open_mfdataset(input_files) as fh:
u_100m = fh['uas'].values * 100**0.143
Copy link
Member

Choose a reason for hiding this comment

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

if you set alpha to class attr you can reference that here

@grantbuster grantbuster merged commit 90f7921 into main Sep 14, 2023
5 checks passed
@grantbuster grantbuster deleted the bnb/ws_power_law branch September 14, 2023 20:06
github-actions bot pushed a commit that referenced this pull request Sep 14, 2023
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.

2 participants