Skip to content

Commit

Permalink
Make the fprun script to accept FP directories too.
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Nov 10, 2016
1 parent 5feafa7 commit dfaa11f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions reflexible/flexpart.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Class that can open a FLEXPART run and access to the configfiles and outputs.
"""

from __future__ import print_function
from __future__ import absolute_import

Expand Down
7 changes: 3 additions & 4 deletions reflexible/scripts/fprun.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def main():
)
parser.add_argument(
"pathnames", nargs="?",
help="The Flexpart pathnames file stating where options and output are."
help=("The Flexpart pathnames file stating where options and output "
"are. If you pass a dir, a 'pathnames' file will be appended "
"automatically. If not found yet, a FP output dir is assumed.")
)

args = parser.parse_args()
Expand All @@ -63,9 +65,6 @@ def main():
parser.print_help()
sys.exit(1)

if not os.path.isfile(args.pathnames):
raise IOError("PLEXPART pathnames not found in '%s'" % args.pathnames)

fprun = rf.Flexpart(args.pathnames, nested=args.nested)
print(fprun)

Expand Down

0 comments on commit dfaa11f

Please sign in to comment.