diff --git a/aiida_flexpart/calculations/new_plugin.py b/aiida_flexpart/calculations/new_plugin.py index 9c2a433..a18095d 100644 --- a/aiida_flexpart/calculations/new_plugin.py +++ b/aiida_flexpart/calculations/new_plugin.py @@ -7,8 +7,8 @@ import yaml params_dict = {'rel.com':[], - 'domain.str': "EUROPE", - 'nest': False, + 'domain.str': "EUROPE", + 'nest': False, 'by.month': True, 'overwrite': True, 'nn.cores': 12, @@ -70,7 +70,8 @@ def prepare_for_submission(self, folder): params_dict.update({'rel.com':list(set(rel)), 'path':path, - 'days':days + 'days':days, + 'bs.path':days }) _ = yaml.dump(params_dict, f) diff --git a/aiida_flexpart/parsers/flexpart_cosmo.py b/aiida_flexpart/parsers/flexpart_cosmo.py index ed8c81a..0314bf0 100644 --- a/aiida_flexpart/parsers/flexpart_cosmo.py +++ b/aiida_flexpart/parsers/flexpart_cosmo.py @@ -50,10 +50,11 @@ def parse(self, **kwargs): # add output file self.logger.info(f"Parsing '{output_filename}'") with self.retrieved.open(output_filename, 'r') as handle: - output_node = SinglefileData(file=handle) - self.out('output_file', output_node) content = handle.read() + output_node = SinglefileData(file=handle) if 'CONGRATULATIONS' not in content: + self.out('output_file', output_node) return ExitCode(1) + self.out('output_file', output_node) return ExitCode(0)