pygetm.output.memory module

class pygetm.output.memory.MemoryFile(available_fields: Mapping[str, Array], logger: Logger, interval: timedelta | int = 1, interval_units: TimeUnit = TimeUnit.TIMESTEPS, start: datetime | None = None, stop: datetime | None = None, default_dtype: DTypeLike | None = None, save_initial: bool = True, sub: bool = False, add_coordinates: bool = True)[source]

Bases: File

Parameters:
  • interval – time interval to save at

  • interval_units – units for time interval (not used if interval is given as datetime.timedelta)

  • start – simulation time at which to start saving. This defaults to the start of the simulation

  • stop – simulation time at which to stop saving. This defaults to the end of the simulation

  • default_dtype – default data type for real-valued variables

  • sub – whether to save separate files per subdomain

  • save_initial – whether to save at the very start of the simulation

close_now(*args, **kwargs)[source]
save_now(seconds_passed: float, time: datetime | None)[source]
start_now(seconds_passed: float, time: datetime | None, *args, **kwargs) bool[source]
property x: Dataset