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

Const interp #57

Merged
merged 6 commits into from
Sep 13, 2016
Merged

Const interp #57

merged 6 commits into from
Sep 13, 2016

Conversation

NicWayand
Copy link
Collaborator

Added simple interpolation option "nearest", that simple takes the nearest station. Useful for getting close to original gridded forcing (i.e. a NWP model) that covers entire mesh by area.

Addresses #56

image

@@ -130,7 +140,7 @@ void core::config_options(const pt::ptree &value)
if(N)
{
n = *N;
if( n < 2)
if( (n < 2) & (*ia != "nearest")) // ALlow less than 2 if nearest interp is used
Copy link
Owner

Choose a reason for hiding this comment

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

This should be logical and (&&), not bit-wise and ( &).

can you add a new elseif so the error message is correct? Or just change the error message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@NicWayand
Copy link
Collaborator Author

Spline with 4 nearest stations for comparison with above nearest interp method

image

@Chrismarsh Chrismarsh merged commit 1dc45cd into Chrismarsh:master Sep 13, 2016
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