diff --git a/particle_tracking_manager/the_manager.py b/particle_tracking_manager/the_manager.py index da35c6d..7a1b017 100644 --- a/particle_tracking_manager/the_manager.py +++ b/particle_tracking_manager/the_manager.py @@ -164,6 +164,7 @@ class ParticleTrackingManager: seed_seafloor: bool output_file: str output_format: str + output_file_initial: Optional[str] def __init__( self, @@ -223,6 +224,8 @@ def __init__( self.__dict__["has_run_seeding"] = False self.__dict__["has_run"] = False + self.output_file_initial = None + # Set all attributes which will trigger some checks and changes in __setattr__ # these will also update "value" in the config dict for key in sig.parameters.keys(): @@ -383,9 +386,10 @@ def __setattr__(self, name: str, value) -> None: ) # make new attribute for initial output file - self.output_file_initial = str( - pathlib.Path(f"{output_file}_initial").with_suffix(".nc") - ) + if self.output_file_initial is None: + self.output_file_initial = str( + pathlib.Path(f"{output_file}_initial").with_suffix(".nc") + ) if self.output_format is not None: if self.output_format == "netcdf":