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

Create Basic OmF/OmA Maps #108

Merged
merged 8 commits into from
Nov 18, 2021
Merged

Create Basic OmF/OmA Maps #108

merged 8 commits into from
Nov 18, 2021

Conversation

CoryMartin-NOAA
Copy link
Contributor

Closes #96

This adds a new type of plot, map departures, which will plot O-F or O-A (depending on YAML) for the specified domains and variables.

It computes the vmin/vmax based off of the max/min values and is always centered on 0, and also annotates the nobs, min, max on the figure.

Two examples are attached.
Screen Shot 2021-11-17 at 3 54 37 PM
Screen Shot 2021-11-17 at 3 57 14 PM

Copy link
Collaborator

@kevindougherty-noaa kevindougherty-noaa left a comment

Choose a reason for hiding this comment

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

Looks great, just one minor comment.

LAMDA/map_departures.py Outdated Show resolved Hide resolved
Copy link
Contributor

@JacobCarley-NOAA JacobCarley-NOAA left a comment

Choose a reason for hiding this comment

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

Maps look good. Some marks are hard to see when values are small. Suggest adding nonzero line thickness to the marker (circle) edges to make the locations of each observation more clear.

@@ -37,7 +37,7 @@ def _create_map_departures(df, domain, projection,
omfscatter = MapScatter(latitude=lats,
longitude=lons,
data=omf)
omfscatter.markersize = 1
omfscatter.markersize = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible to add the following kwarg? omfscatter.linewidths=0.15. I don't know API from which MapScatter is derived, but assuming it's from matplotlib and is based upon matplotlib.pyplot.scatter that should help the markers show up a little bit better. If it doesn't work right we made need to change the edgecolor kwarg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is something we will have to add to EMCPy, as I don't think all **kwargs are inherited. We probably have to add it, what do you think @kevindougherty-noaa ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I was just about to comment on this. Taking a look at MapScatter, I think it would be just as simple as adding self.linewidths as an additional argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this needs even more work in EMCPy, as I don't think the edge colors argument is passed properly, see NOAA-EMC/emcpy#80

@CoryMartin-NOAA
Copy link
Contributor Author

@JacobCarley-NOAA thoughts? I think this now makes the line edges dominate the plot instead of the fill colors:
Screen Shot 2021-11-18 at 9 18 05 AM
Screen Shot 2021-11-18 at 9 19 37 AM

@kevindougherty-noaa
Copy link
Collaborator

@CoryMartin-NOAA I agree it kind of takes away from the colors. Also, this is not an issue on your end, but it looks like CONUS domain is using a 110m coastline and 50m states. Will have to figure that out in EMCPy how to handle that better.

@JacobCarley-NOAA
Copy link
Contributor

JacobCarley-NOAA commented Nov 18, 2021

@CoryMartin-NOAA Yeah. You and @kevindougherty-noaa are right. I'm kind of surprised of the overwhelming effect of adding the edges to be honest. No edges is definitely preferable over this.

Overall this is pretty minor.

@CoryMartin-NOAA
Copy link
Contributor Author

@kevindougherty-noaa do you approve the PR now? You requested changes earlier.

Copy link
Collaborator

@kevindougherty-noaa kevindougherty-noaa left a comment

Choose a reason for hiding this comment

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

Yes, my apologies. Looks great!

@CoryMartin-NOAA CoryMartin-NOAA merged commit dea228d into feature/LAMDA Nov 18, 2021
@CoryMartin-NOAA CoryMartin-NOAA deleted the feature/omf_maps branch November 18, 2021 19:16
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.

3 participants