GaPFlow.viz.animations

GaPFlow.viz.animations#

Create animations from simulation output stored as NetCDF files.

The methods within this module are either called from the command-line interface or directly from a GaPFlow.Problem instance.

Functions

animate_1d(filename_sol, filename_topo[, ...])

Create animation for 1D simulations.

animate_1d_gp(filename_sol[, seconds, save, ...])

Create animation for 1D simulations.

animate_2d(filename_sol[, seconds, save])

Create animation for 2D simulations.

GaPFlow.viz.animations.animate_1d(filename_sol: str, filename_topo: str, seconds: float = 10.0, save: bool = False)#

Create animation for 1D simulations.

Parameters:
  • filename_sol (str) – Relative path to the solution NetCDF file.

  • filename_topo (str) – Relative path to the topography NetCDF file.

  • seconds (float) – Length of the saved video in seconds, i.e. determines the frame rate.

  • save (bool) – Whether the plot should be saved or not

GaPFlow.viz.animations.animate_1d_gp(filename_sol: str, seconds: float = 10.0, save: bool = False, tol_p: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None, tol_s: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None)#

Create animation for 1D simulations.

Parameters:
  • filename_sol (str) – Relative path to the solution NetCDF file.

  • seconds (float) – Length of the saved video in seconds, i.e. determines the frame rate.

  • save (bool) – Whether the plot should be saved or not

GaPFlow.viz.animations.animate_2d(filename_sol: str, seconds: float = 10.0, save: bool = False)#

Create animation for 2D simulations.

Parameters:
  • filename_sol (str) – Relative path to the solution NetCDF file.

  • seconds (float) – Length of the saved video in seconds, i.e. determines the frame rate.

  • save (bool) – Whether the plot should be saved or not