Skip to content

Commit

Permalink
Refactor process(): rename stashvar.
Browse files Browse the repository at this point in the history
  • Loading branch information
truth-quark committed Aug 19, 2024
1 parent 1f82d65 commit 739026a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions umpost/um2netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,11 @@ def process(infile, outfile, args):

# cube processing & modification
for c in cubes:
umvar = stashvar.StashVar(c.item_code) # TODO: rename with `stash` as it's from stash codes

fix_var_name(c, umvar.uniquename, args.simple)
fix_standard_name(c, umvar.standard_name, args.verbose)
fix_long_name(c, umvar.long_name)
fix_units(c, umvar.units, args.verbose)
st = stashvar.StashVar(c.item_code)
fix_var_name(c, st.uniquename, args.simple)
fix_standard_name(c, st.standard_name, args.verbose)
fix_long_name(c, st.long_name)
fix_units(c, st.units, args.verbose)

# Interval in cell methods isn't reliable so better to remove it.
c.cell_methods = fix_cell_methods(c.cell_methods)
Expand Down

0 comments on commit 739026a

Please sign in to comment.