Skip to content

Commit ea6879d

Browse files
authored
Update um_fields_subset.py
Edited the filter_fields comment
1 parent 81a49b0 commit ea6879d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/um_fields_subset.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import mule
1414
import os
1515
import argparse
16+
1617
PROG_STASH_CODES = (0, 33, 34)
1718
MASK_CODE = 30
1819

@@ -50,7 +51,6 @@ def parse_arguments():
5051
args_parsed.include_list = [int(v) for v in args_parsed.include_list.split(",")] if args_parsed.include_list else []
5152
args_parsed.exclude_list = [int(x) for x in args_parsed.exclude_list.split(",")] if args_parsed.exclude_list else []
5253

53-
5454
# Check if neither -v nor -x is provided
5555
if not args_parsed.include_list and not args_parsed.exclude_list and not args_parsed.prognostic:
5656
raise argparse.ArgumentError(None, "Error: Either -v or -x or -p must be specified.")
@@ -60,8 +60,8 @@ def parse_arguments():
6060

6161
def validate_arguments(include_list, exclude_list, prognostic):
6262
"""
63-
Checks that the inclusion and exclusion lists are not provided simultaneously
64-
and ensures that the 'prognostic' flag is not used with explicit inclusion or exclusion lists.
63+
Checks that the inclusion and exclusion lists are not provided simultaneously and
64+
ensures that the 'prognostic' flag is not used with explicit inclusion or exclusion lists.
6565
6666
Parameters
6767
----------
@@ -76,7 +76,6 @@ def validate_arguments(include_list, exclude_list, prognostic):
7676
----------
7777
None
7878
"""
79-
8079
if include_list and exclude_list:
8180
raise Exception("Error: -x and -v are mutually exclusive")
8281

@@ -139,8 +138,8 @@ def filter_fields(input_file, prognostic, include_list, exclude_list):
139138
140139
Parameters
141140
----------
142-
field : object
143-
The field object to be checked.
141+
input_file : object
142+
The loaded dump fields file
144143
prognostic : bool
145144
A boolean flag indicating if only prognostic fields should be included.
146145
include_list : list of int

0 commit comments

Comments
 (0)