From 15c5a6f1f02002dac8fa8c002cd95cbdc36148bc Mon Sep 17 00:00:00 2001 From: LucR31 Date: Mon, 4 Mar 2024 12:02:42 +0000 Subject: [PATCH] extras --- aiida_flexpart/calculations/flexpart_post.py | 4 ++-- aiida_flexpart/workflows/multi_dates_workflow.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/aiida_flexpart/calculations/flexpart_post.py b/aiida_flexpart/calculations/flexpart_post.py index 20425e0..9e980bf 100644 --- a/aiida_flexpart/calculations/flexpart_post.py +++ b/aiida_flexpart/calculations/flexpart_post.py @@ -36,7 +36,7 @@ def define(cls, spec): def prepare_for_submission(self, folder): params = ['-m',self.inputs.input_dir.get_remote_path(), - '-r','./' + '-r','./','-p' ] if 'input_offline_dir' in self.inputs: params += ['-n',self.inputs.input_offline_dir.get_remote_path()] @@ -50,6 +50,6 @@ def prepare_for_submission(self, folder): # Prepare a `CalcInfo` to be returned to the engine calcinfo = common.CalcInfo() calcinfo.codes_info = [codeinfo] - calcinfo.retrieve_list = ['grid_time_*.nc', 'boundary_sensitivity_*.nc', 'aiida.out'] + calcinfo.retrieve_list = ['grid_time_*.nc', 'boundary_sensitivity_*.nc','*.png', 'aiida.out'] return calcinfo diff --git a/aiida_flexpart/workflows/multi_dates_workflow.py b/aiida_flexpart/workflows/multi_dates_workflow.py index 1b4f6d5..c4a2154 100644 --- a/aiida_flexpart/workflows/multi_dates_workflow.py +++ b/aiida_flexpart/workflows/multi_dates_workflow.py @@ -28,6 +28,9 @@ def define(cls, spec): spec.input('check_meteo_ifs_code', valid_type=orm.AbstractCode) spec.input('post_processing_code', valid_type=orm.AbstractCode) + #extras + spec.input('name', valid_type=str, non_db=True, required=False) + # Basic Inputs spec.input('simulation_dates', valid_type=orm.List, @@ -157,7 +160,9 @@ def setup(self): self.ctx.outgrid = self.inputs.outgrid self.ctx.species = self.inputs.species self.ctx.land_use = self.inputs.land_use - #self.base.extras.set('this',3) + if 'name' in self.inputs: + self.node.base.extras.set(self.inputs.name, + {'command': self.ctx.command.get_dict()}) def prepare_meteo_folder_ifs(self): """prepare meteo folder"""