Skip to content

Conversation

@kgoebber
Copy link
Collaborator

@kgoebber kgoebber commented Oct 14, 2021

Description Of Changes

This PR stems out of the issue #2126 to implement a method for generating a finer grid spacing for data contouring purposes when using low resolution gridded output. This PR implements a version of the prototype function developed by @jthielen and also adds an attribute to the declarative syntax, with limited functionality, to make use of this new function.

Open for conversation on the naming conventions used here. I shied away from the GEMPAK language of CONTUR, as I thought that would be very confusing with our already implemented contours attributed and opted for a zoom reference, which aligns with the native SciPy function. The attribute is currently names field_zoom to imply that you are zooming the particular field through the spline interpolation. As an aside, I also refrained from using smooth, or some derivative thereof, in the name as there will be a future PR implementing one of the smoothing functions as a declarative attribute that I intend to use a derivative of that name for that attribute.

Checklist

@kgoebber kgoebber requested a review from a team as a code owner October 14, 2021 21:41
@kgoebber kgoebber requested review from dopplershift and removed request for a team October 14, 2021 21:41
@kgoebber kgoebber force-pushed the add_zoom_function branch 2 times, most recently from 7f09d50 to 76f9ae9 Compare October 15, 2021 01:52
@kgoebber kgoebber mentioned this pull request Oct 15, 2021
3 tasks
@kgoebber
Copy link
Collaborator Author

Looks like we are failing on 3.7 minimum because of the SciPy zoom function not having the grid_mode keyword argument. What is the best way to handle this situation?

@dopplershift
Copy link
Member

Well, looks like grid_mode was added in scipy/scipy#13095, which was released in 1.6.0 31 December 2020. That would put us at a 11 month support window on our next release if we bumped to it. So...how important is grid_mode?

@kgoebber
Copy link
Collaborator Author

I don't think the option is critically important and have only used the default setting. We can always come back and add it in when and if is determined that it would be useful.

@dopplershift dopplershift added this to the 1.2.0 milestone Oct 20, 2021
@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Plots Pertains to producing plots labels Oct 20, 2021
@sgdecker
Copy link
Contributor

What about contour_smooth for this one to complement field_smooth from the other PR? Or they could be verb first: smooth_contour and smooth_field which might be better from a tab-completion standpoint (you get to pick or become aware of two ways to smooth things and don't clash with contours)?

@kgoebber kgoebber force-pushed the add_zoom_function branch 6 times, most recently from f29cac7 to 0bcd333 Compare November 8, 2021 22:42
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

Looks good and didn't run into any issues testing it myself. Feel free to address these minor things and then add the references between this and smooth_field to this PR while I go kick #2156 in.

Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

Tiny misses; then good to go by me!

@kgoebber kgoebber force-pushed the add_zoom_function branch 2 times, most recently from 652907c to c887732 Compare November 16, 2021 22:28
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

Last request, just making consistencies with the new name.

@dopplershift dopplershift merged commit 495a2db into Unidata:main Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a super-sampling smoother analogous to GEMPAK's CONTUR subbox factor

4 participants