Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed May 30, 2024
1 parent 0520967 commit d812343
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions esmf_regrid/experimental/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def _clean_var_names(cube):
coord.var_name = None
for con in cube.mesh.connectivities():
con.var_name = None
return cube


def save_regridder(rg, filename):
Expand Down Expand Up @@ -293,8 +292,10 @@ def load_regridder(filename):
cubes = iris.load(filename)

# Extract the source, target and metadata information.
src_cube = _clean_var_names(cubes.extract_cube(SOURCE_NAME))
tgt_cube = _clean_var_names(cubes.extract_cube(TARGET_NAME))
src_cube = cubes.extract_cube(SOURCE_NAME)
_clean_var_names(src_cube)
tgt_cube = cubes.extract_cube(TARGET_NAME)
_clean_var_names(tgt_cube)
weights_cube = cubes.extract_cube(WEIGHTS_NAME)
weight_shape_cube = cubes.extract_cube(WEIGHTS_SHAPE_NAME)

Expand Down
2 changes: 0 additions & 2 deletions esmf_regrid/tests/unit/experimental/io/test_save_regridder.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ def test_managed_var_name():

with _managed_var_name(src, tgt):
for coord in src.mesh.coords():
print(coord)
assert coord.var_name != DUMMY_VAR_NAME_SRC
for coord in tgt.mesh.coords():
print(coord)
assert coord.var_name != DUMMY_VAR_NAME_TGT

0 comments on commit d812343

Please sign in to comment.