Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bena-nasa committed Jan 6, 2025
1 parent 181dcb7 commit 774bbd9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Tests/generate_extdatadriver_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import yaml
import glob

dims_dict = {"2":"xy", "3":"xyz"}

def get_dims(component_map, name):
for comp in component_map:
if name in component_map[comp]:
Expand Down Expand Up @@ -114,10 +116,7 @@ def parse_args():
long_name = "NA"
units = "NA"
dims = get_dims(component_map, item)
if dims == "2":
cdims = "xy"
elif dims == "3":
cdims = "xyz"
cdims = dims_dict[dims]

if item not in written:
f_agcm.write(item+cm+long_name+cm+units+cm+cdims+cm+"c"+nl)
Expand All @@ -134,10 +133,7 @@ def parse_args():
long_name = "NA"
units = "NA"
dims = get_dims(component_map, item)
if dims == "2":
cdims = "xy"
elif dims == "3":
cdims = "xyz"
cdims = dims_dict[dims]

if item not in written:
f_agcm.write(item+cm+long_name+cm+units+cm+cdims+cm+"c"+nl)
Expand Down

0 comments on commit 774bbd9

Please sign in to comment.