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

Extend poloidal_plot option in animate_list() to support polygon plotting. #311

Open
mrhardman opened this issue Jan 31, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@mrhardman
Copy link
Collaborator

Mike Kryjak improved the poloidal plotting in #280, by introducing a function

def plot2d_polygon(
da,
ax=None,
cax=None,
cmap="viridis",
norm=None,
logscale=False,
antialias=False,
vmin=None,
vmax=None,
extend="neither",
add_colorbar=True,
colorbar_label=None,
separatrix=True,
separatrix_kwargs={"color": "white", "linestyle": "-", "linewidth": 2},
targets=False,
add_limiter_hatching=False,
grid_only=False,
linewidth=0,
linecolor="black",
):

, so that unphysical artefacts of plotting do not appear. This feature has not been extended to support animate_list, used in examples in Hermes-3, e.g.,

ds.bout.animate_list(
    ["Nd"],
    poloidal_plot=True,
    show=True,
    save_as="hermes_animation",
)

This appears to affect nonorthogonal grids particularly badly. The figures below are generated from two simulations of neutral diffusion on orthogonal and nonorthogonal grids for the same physics case.

Orthogonal output:
Image
Nonorthogonal output showing fictitious artefacts:
Image

@mrhardman mrhardman added the enhancement New feature or request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant