Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
 * Revert some prior glider fixes
  • Loading branch information
jr3cermak authored and ocefpaf committed May 23, 2024
1 parent 0d109a3 commit ec50124
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions cc_plugin_glider/glider_dac.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,6 @@ def check_required_variables(self, dataset):
"instrument_ctd",
]

if 'acoustic_profile_slocum' in self.options:
required_variables.remove('pressure')
required_variables.remove('temperature')
required_variables.remove('conductivity')
required_variables.remove('density')

if 'acoustic_metrics_slocum' in self.options:
required_variables.remove('depth')
required_variables.remove('u')
required_variables.remove('v')
required_variables.remove('instrument_ctd')

level = BaseCheck.HIGH
out_of = len(required_variables)
score = 0
Expand Down Expand Up @@ -456,19 +444,10 @@ def check_monotonically_increasing_time(self, ds):
"""
# shouldn't this already be handled by CF trajectory featureType?
test_ctx = TestCtx(BaseCheck.HIGH, "Profile data is valid")
if not self.options is None and 'acoustic_profile_slocum' in self.options:
# For the acoustic profiles, data is 3D data(time, depth). Time
# is repeated for n depths, but it still should be monotonically
# increasing along unique records.
test_ctx.assert_true(
np.all(np.diff(np.unique(ds.variables["time"])) > 0),
"Time variable is not monotonically increasing",
)
else:
test_ctx.assert_true(
np.all(np.diff(ds.variables["time"]) > 0),
"Time variable is not monotonically increasing",
)
test_ctx.assert_true(
np.all(np.diff(ds.variables["time"]) > 0),
"Time variable is not monotonically increasing",
)
return test_ctx.to_result()

def check_dim_no_data(self, dataset):
Expand Down

0 comments on commit ec50124

Please sign in to comment.