Skip to content

Commit

Permalink
Merge pull request #359 from ContactEngineering/24_io_issues
Browse files Browse the repository at this point in the history
BUG: Avoid always warning about unit
  • Loading branch information
pastewka committed Mar 4, 2024
2 parents ed5cf40 + 5429814 commit fc29ab9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions SurfaceTopography/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change log for SurfaceTopography
================================

v1.1376 (05Mar24)
-----------------

- BUG: Avoid always warning about unit

v1.13.6 (04Mar24)
-----------------

Expand Down
4 changes: 2 additions & 2 deletions SurfaceTopography/Container/IO/CE.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def __init__(self, fn, datafile_keys=['original', 'squeezed-netcdf'], ignore_fil
unit_from_file = reader.channels[data_source].unit
if unit_from_file is not None:
if unit is not None:
# Need to set this to None to avoid collision
unit = None
if unit_from_file != unit:
warnings.warn(f'Unit from data file (={unit_from_file}) and from meta.yml '
f'(={unit}) differ for topography {datafiles[datafile_key]}')
# Need to set this to None to avoid collision
unit = None

readers += [
_ReadTopography(reader,
Expand Down

0 comments on commit fc29ab9

Please sign in to comment.