-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add WOCE and SOSE density contour plots #877
Conversation
Somewhat ironic but this function also handles contours
Separate masking is needed for the main and reference fields.
Also, turn off contour labels (which aren't working).
@mark-petersen and @milenaveneziani, please take a look at this as soon as you are able. I think we should discuss it on Slack or have a quick video chat. I know there's a lot that could be improved. I tried a lot that didn't help as well and I'd like to chat about that before either of you requests things I've already been struggling with. These include contour labels and the range and density of contour values. |
@xylar: I think these look great. Just what we need. My only suggestion is to keep the little inset showing the section location off the plot, so that we can see the isopycnals close to the Antarctic shelf. Could you also briefly clarify this:
do you mean that we can plot both short and long extent for each transect at the same time (within the same analysis)? Thanks! |
@milenaveneziani, yep, I can move the inset up a bit and the figure down a bit so we don't have that overlap.
Yes, they're both there: |
great! I wonder if we can note the contour labels in some other way. Either adding text to the title or/and maybe adding a couple of contours in different color (I imagine the second option is more time consuming). It would be just good to know that there is a correspondence in the contour labels between model and observations. |
Also plot both coastal zooms and full WOCE transects for polar regions.
46cf1c2
to
4e1c599
Compare
Yeah, I think it's worth thinking about. I don't think adding text to the title will be helpful because a given plot may not actually have contours that cover the full bounds. But I do think having contours shaded somehow and a colorbar might be helpful. I could also imagine it not being easy to tell which shade is which value (particularly for a colorblind person). But I can try that out. |
8996e88
to
920f90a
Compare
@milenaveneziani, here are some updated test results: I also updated the figures above. Let me know if you have more feedback. |
I like them @xylar. It's only unfortunate that the highest values have similar colors (yellows) between model and observations, but those do not show in the plots. I tried to look for a colormap that only had blues and greens with no yellows, but I couldn't find anything. |
@milenaveneziani, I played around with color maps for several hours yesterday. They yellow isn't the only problem. Even if you exclude it, it's super hard to tell different shades of purple, blue or green apart. It's much easier to tell red from red-orange from orange from yellow-orange from yellow to my eyes. I just found it super hard to come up with a color map that was satisfactory. I'm going to play around with the stretch factor I applied to |
@milenaveneziani, in my opinion, this is not better: |
@xylar: I think that is better, actually. Because now I know that the model curves are in blues/greens and the observation contours are in reds/yellows. |
@milenaveneziani, I'm happy to go with the more blue-green option. My sense, though, was that you can't tell which blue-green curve corresponds to what yellow-orange curve. But maybe that's true either way. |
920f90a
to
79b375f
Compare
agreed on both counts. |
I played around a little more and have a compromise at the top of the PR. Halfway between the too yellow and too blue versions. It's not perfect in that the blue-green lines are still hard to tell apart but it's the best I seem to be able to do for now. If @mark-petersen is happy, I'll merge early next week. |
79b375f
to
01312f7
Compare
@mark-petersen, could you give this a glance? |
@xylar: Maybe try to use "black to dark grey" color bar for model, "Dark red to red" color bar for observations. Also, try to different thickness for different contour lines |
@zhangshixuan1987, I appreciate your suggestions. I have tried a black-to-gray color map and it didn't provide enough contrast to distinguish the lines from one another. I also tried subtler color maps like the dark-red-to-red you suggest and the problem was similar. I think only the "hot" color map I'm currently using (or a color map like a rainbow, which I prefer not to use) provides sufficiently distinct colors to be able to say which line has which density. I will try using different line thicknesses, but I think I will use thicker lines for model and thinner for obs, rather than trying to use different thicknesses for different contour values because I think it would be similarly difficult to be sure that a given thickness corresponds to a given density contour. |
Agreed. |
I think I'm also likely to prefer the current approach but I will try out an alternative that was suggested by @cbegeman and others at today's Cryo meeting and see if it works as well or better. We may not reach a consensus on this but it doesn't hurt to at least see what our options are. |
0dd3eb2
to
b1acbfa
Compare
Use thick lines for the "main" and thin lines for the "ref".
b1acbfa
to
1846fe6
Compare
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.
Yes, I really like this. The recent changes are helpful to compare the depths of individual isopycnals. Thanks.
I also think the thick-thin contrast is nice. It's mentally so much easier to compare across the same color map. Thanks, @xylar! |
I think we have consensus now on this. Thanks @xylar! |
Thanks everyone! I'm running some tests to make sure this does not harm. One side effect is that contours on the normal T and S transects have width 2 and I don't think we want that. I'll fix that before merging. |
Fixed! |
When not using
|
All the other tests passed so just need to track that one down. |
Fixed the masking of contour plots. Rerunning the tests. |
Test suite on Anvil is now passing. |
A request was made by the cryosphere team for density contour plots that can be compared either with observations (or SOSE) or against other model runs. The aim with these plots is to compare the slopes of isopicnals as we vary eddy parameterizations (GM and Redi).
This merge adds galleries of density contour plots on WOCE and SOSE transects. Here are two WOCE examples:


This merge also fixes several issues that emerged in contour comparison plots. We have not tried them since moving to plotting transects with triangles on the native MPAS grid. Some problems emerged, most notably that contours on triangles do not seem to allow value labels on the contours themselves.
As an alternative to contour labels, plots with color maps have been used instead. The color maps were chosen to try to maximize the distinction both between contours with the same color map and between the 2 color maps.
It seems useful to plot both the full WOCE transects and the shorter "zooms" close to the Antarctic coast, so this merge makes that the default for polar regions:

