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

interpolation adjustment: option to include single levels in interpol… #254

Merged
merged 5 commits into from
Jan 15, 2025

Conversation

bnb32
Copy link
Collaborator

@bnb32 bnb32 commented Jan 8, 2025

…ation along with isobars. Doing so can sometimes lead to issues if values computed from pressure levels differ from the single level values. This can result in very large alpha values in the linear interpolation routine.

…ation along with isobars. Doing so can sometimes lead to issues if values computed from pressure levels differ from the single level values. This can result in very large alpha values in the linear interpolation routine.
@bnb32 bnb32 requested a review from grantbuster January 8, 2025 18:11
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.

@bnb32 are you adding this primarily to ignore the single level values? They were previously included by default?

The fact that this is such an issue concerns me and makes me think we should be using the single level values (if available) instead of pressure levels.

@bnb32
Copy link
Collaborator Author

bnb32 commented Jan 9, 2025

@grantbuster Yeah I'm using this to ignore single level values when I want to interpolate to hub heights. I found that when I was interpolating temperature to 100m some of the heights in the pressure level data were close to 2m. If I included the single level temperature_2m values I'd end up with two interpolation heights close to 2m (e.g. 2 and 2.001 or something), since the interpolation method uses the two closest heights to 100m, even if they are both below 100m. This gives a very high alpha value in the interpolation scheme which then outputs nonsense when extrapolating this to 100m. It's not possible to use only single levels for temp interpolation, since there's only 2m, and I didn't see this issue with windspeeds (which already have single level values at 10 and 100, for ERA). I could modify the interp_kwargs to enable only using the single levels though.

…d to control which features are used in derivations, instead of using ``interp_kwargs``. Removed ``include_single_levels`` parsing from ``interp_kwargs``
@bnb32 bnb32 force-pushed the bnb/interp_adjustment branch from 00a61e8 to c03ad14 Compare January 11, 2025 17:21
@bnb32 bnb32 requested a review from grantbuster January 14, 2025 14:24
@bnb32
Copy link
Collaborator Author

bnb32 commented Jan 14, 2025

@grantbuster I changed the approach here to enable skipping either pressure level variables or single level variables. Instead of adding a bunch of options to interp_kwargs I added the load_features kwarg, through which you select features to load (aka use in derivations).

@bnb32 bnb32 merged commit f4095ae into main Jan 15, 2025
12 checks passed
@bnb32 bnb32 deleted the bnb/interp_adjustment branch January 15, 2025 16:31
github-actions bot pushed a commit that referenced this pull request Jan 15, 2025
interpolation adjustment: option to include single levels in interpol…
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