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

remove nogus array flip in 2D adv-diff example + code cleanup #468

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

AgnieszkaZaba
Copy link
Collaborator

No description provided.

@pawelmagnu
Copy link
Collaborator

I am not sure if this is a debug leftover; when plotting images pixel 0,0 is in the top left in matplotlib, but in most visualizations, it is in the bottom left, so I guess this flip is necessary

@AgnieszkaZaba
Copy link
Collaborator Author

I am not sure if this is a debug leftover; when plotting images pixel 0,0 is in the top left in matplotlib, but in most visualizations, it is in the bottom left, so I guess this flip is necessary

Maybe something changed because I run this notebook yesterday and saved animation was flipped (compared to initial and final plots). Could you check it?

@slayoo
Copy link
Member

slayoo commented Oct 24, 2024

Note: imshow features the origin parameter which is set to upper by default, but can be changed to lower: https://matplotlib.org/stable/users/explain/artists/imshow_extent.html

Also, it would be best to use the plot function also within animation generation to ensure that the data are plotted in exactly the same way both in the plots and in the animation.

@slayoo
Copy link
Member

slayoo commented Nov 15, 2024

@AgnieszkaZaba, @pawelmagnu, ping :) let's sort this one out!

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (6d161a2) to head (8288129).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #468   +/-   ##
=======================================
  Coverage   92.02%   92.02%           
=======================================
  Files          30       30           
  Lines        1468     1468           
=======================================
  Hits         1351     1351           
  Misses        117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@pawelmagnu
Copy link
Collaborator

I think we still need to remove the flipud statement

@AgnieszkaZaba
Copy link
Collaborator Author

AgnieszkaZaba commented Nov 17, 2024

I think we still need to remove the flipud statement

Ok, we can remove flipud. But then if we set 'origin' to 'lower', we have to do the same for previous plots.

@AgnieszkaZaba
Copy link
Collaborator Author

AgnieszkaZaba commented Nov 17, 2024

Now it using plot function (as @slayoo suggested).
@pawelmagnu extra parameter was added to plot function (for deciding if colorbar should be shown). Maybe there is a better way to do this?

@slayoo slayoo changed the title remove debug leftover (?) array flip in 2D adv-diff example remove nogus array flip in 2D adv-diff example + code cleanup Nov 22, 2024
@slayoo slayoo added this pull request to the merge queue Nov 22, 2024
Merged via the queue into open-atmos:main with commit a8f04f7 Nov 22, 2024
33 checks passed
@AgnieszkaZaba AgnieszkaZaba deleted the patch-1 branch November 22, 2024 13:51
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