aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r--Python/pywarpx/picmi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index f4d7a34ed..f9495d2b5 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -1034,6 +1034,11 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic):
self.diagnostic.openpmd_backend = self.openpmd_backend
self.diagnostic.intervals = self.period
+ if self.write_dir is not None or self.file_prefix is not None:
+ write_dir = (self.write_dir or 'diags')
+ file_prefix = (self.file_prefix or self.name)
+ self.diagnostic.file_prefix = write_dir + '/' + file_prefix
+
# --- Use a set to ensure that fields don't get repeated.
variables = set()