Skip to content

Commit

Permalink
Flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vanroekel committed Nov 1, 2024
1 parent 02876cd commit 691e656
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from compass.ocean.tests.utility.create_salin_restoring.extrap_salin import (
ExtrapSalin,
)
from compass.ocean.tests.utility.create_salin_restoring.salinity_restoring import (
Salinity,
)
from compass.ocean.tests.utility.create_salin_restoring.\
salinity_restoring import Salinity
from compass.testcase import TestCase


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def __init__(self, test_case):
Parameters
----------
test_case : compass.ocean.tests.utility.create_salin_restoring.CreateSalinRestoring
test_case : compass.ocean.tests.utility.create_salin_restoring.
CreateSalinRestoring
The test case this step belongs to
"""
Expand All @@ -46,7 +47,8 @@ def setup(self):

datestring = now.strftime("%Y%m%d")

self.woa_filename = f'woa23_decav_0.25_sss_monthly_extrap.{datestring}.nc'
self.woa_filename = f'woa23_decav_0.25_sss_monthly_extrap.\
{datestring}.nc'
self.add_output_file(self.woa_filename)

def run(self):
Expand Down Expand Up @@ -97,7 +99,8 @@ def _extrap(out_filename):

field_extrap = _extrap_with_halo(field[i, :, :], kernel, valid,
lon_with_halo, lon_no_halo)
field[i, fill_mask] = field_extrap[fill_mask] / valid_weight_sum[fill_mask]
field[i, fill_mask] = field_extrap[fill_mask] / \
valid_weight_sum[fill_mask]

valid = new_valid
prev_fill_count = fill_count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ def run(self):
for month in ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul',
'aug', 'sep', 'octo', 'nov', 'dec']:
ds = xr.open_dataset(
f'woa_salin_{month}.nc',
decode_times=False).isel(depth=0).drop_vars('depth')
f'woa_salin_{month}.nc',
decode_times=False).isel(depth=0). \
drop_vars('depth')
slices.append(ds.s_an)

ds_out['s_an'] = xr.concat(slices, dim='time')
Expand Down

0 comments on commit 691e656

Please sign in to comment.