File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -650,8 +650,8 @@ def variable_interpolation(
650650
651651 if not isinstance (to_pandas , bool ):
652652 raise TypeError (f"to_pandas must be of type bool. Got: { type (to_pandas )} " )
653-
654- #Avoid Quhall errors by filling in bad sigma values with -1 for the surface or 0 for the waterbed based on neighboring values
653+
654+ # Avoid Quhall errors by filling in bad sigma values with -1 for the surface or 0 for the waterbed based on neighboring values
655655 if "mesh2d_interface_sigma" in data .variables :
656656 sigma = data ["mesh2d_interface_sigma" ].values
657657 bad = ~ np .isfinite (sigma ) | (np .abs (sigma ) > 0.1 )
@@ -663,7 +663,7 @@ def variable_interpolation(
663663 neighbors .append (sigma [idx - 1 ])
664664 if idx < len (sigma ) - 1 :
665665 neighbors .append (sigma [idx + 1 ])
666-
666+
667667 if neighbors :
668668 avg_neighbor = np .mean (neighbors )
669669 if np .abs (avg_neighbor - (- 1.0 )) < np .abs (avg_neighbor ):
@@ -672,12 +672,12 @@ def variable_interpolation(
672672 sigma [idx ] = 0.0
673673 else :
674674 sigma [idx ] = - 1.0
675-
675+
676676 data ["mesh2d_interface_sigma" ] = xr .DataArray (
677677 sigma ,
678678 dims = data ["mesh2d_interface_sigma" ].dims ,
679679 attrs = data ["mesh2d_interface_sigma" ].attrs ,
680- )
680+ )
681681
682682 data_raw = {}
683683 for var in variables :
You can’t perform that action at this time.
0 commit comments