-
Notifications
You must be signed in to change notification settings - Fork 53
Clean up the nino34 index task #293
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
Conversation
...in preparation for adding a panel of a reference run. A function for helping to determine the extent of the y axis for spectra has been moved from plotting into this task and has also been cleaned up/simplified
|
@vanroekel, if you could look over these changes and make sure that you are okay with them, I would appreciate it. |
|
@vanroekel and @milenaveneziani, I am not sure we really discussed the decision to have IndexNino34 use the output from MpasTimeSeriesTask (meaning it has the same bounds as all other time series). This could be reconsidered, or a separate instance of MpasTimeSeriesTask could be used to extract time series for indices (with potentially different bounds). The purpose of removing the |
TestingI tested this with the QU240 test case on my laptop. Results are nearly identical with only some small variation in the y axis of the spectra and the format of the titles and legends. |
|
@xylar I think we should have separate bounds for NINO34. As an example, often we have found a need to ignore the first 10 years or so for a NINO computation, but want to retain years 1-10 for other time series. |
114e24f to
ffb1b27
Compare
|
@vanroekel, okay, sounds good. I just switched to having separate bounds for indices again. It didn't take long to implement. |
|
|
||
| from ..shared.io.utility import build_config_full_path | ||
|
|
||
| from ..shared.timekeeping.utility import get_simulation_start_time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't being used
| return (colormap, colorbarLevels) | ||
|
|
||
|
|
||
| def plot_size_y_axis(plt, xaxisValues, **data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to IndexNino34 because it's not likely to be used elsewhere.
136fe77 to
9a4597a
Compare
The prefix about a UserWarning with a useless stacktrace in front of warnings produced by warnings.warn are just confusing.
9a4597a to
3a76c8d
Compare
vanroekel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Great, thanks @vanroekel for the quick review. |
|
I'm going to go ahead an merge. |
This clean up is needed to generalize the task in preparation for supporting comparison with a reference run (which will replace one of the panels).
A new task has been added to extract time series needed by indices (which may have different time bounds than time series). Support for separate time bounds was eliminated, perhaps accidentally, in #271.
Nino34 spectra are now packed into dictionaries for easier iteration and panels are plotted in loops.
The function for determining the maximum value of all spectra (to determine the bounds of the y axes of these plots) has been cleaned up so it no longer relies on a plot already having been performed).
All warnings previously produced with
warnings.warnhave been switched to just usingprint('Warning:..')because this produces much more intuitive output without a (nearly always useless) stack trace.