Skip to content

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

@mrhardman

Description

@mrhardman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions