Skip to content

Commit 56ba62f

Browse files
committed
Response to reviews, improve python for compare_nc_files tool
1 parent 75219a5 commit 56ba62f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/eamxx/scripts/compare_nc_files.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from utils import expect, ensure_netcdf4
2-
3-
ensure_netcdf4()
1+
from utils import expect, _ensure_pylib_impl
2+
_ensure_pylib_impl("xarray")
43

54
import xarray as xr
65
import numpy as np
@@ -67,7 +66,7 @@ def compare_variables(self):
6766
ds_tgt = xr.open_dataset(self._tgt_file)
6867

6968
success = True
70-
if self._compare == None or self._compare == []:
69+
if self._compare is None or self._compare == []:
7170
self._compare = []
7271
# If compare is an empty list, compare all variables
7372
print(f"Specific comparison variables not provided,\n"

0 commit comments

Comments
 (0)