Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LucR31 committed Feb 22, 2024
1 parent b409ad4 commit 11dbb05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions aiida_flexpart/calculations/new_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions aiida_flexpart/parsers/flexpart_cosmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 11dbb05

Please sign in to comment.