Пример #1
0
 def test_multi_timeseries_incomplete(self):
     '''
     Ensures multi-timeseries-incomplete detection works
     '''
     with Dataset(resources.STATIC_FILES['multi-timeseries-incomplete']) as nc:
         for variable in util.get_geophysical_variables(nc):
             assert util.is_multi_timeseries_incomplete(nc, variable), "{} is multi-timeseries incomplete".format(variable)
Пример #2
0
    def check_dimensions(self, dataset):
        '''
        Checks that the feature types of this dataset are consitent with a time series incomplete dataset

        :param netCDF4.Dataset dataset: An open netCDF dataset
        '''
        required_ctx = TestCtx(BaseCheck.HIGH, 'All geophysical variables are time-series incomplete feature types')
        message = '{} must be a valid timeseries feature type. It must have dimensions of (timeSeries, time).'
        message += ' And all coordinates must have dimensions of (timeSeries)'
        for variable in util.get_geophysical_variables(dataset):
            is_valid = util.is_multi_timeseries_incomplete(dataset, variable)
            required_ctx.assert_true(
                is_valid,
                message.format(variable)
            )
        return required_ctx.to_result()
Пример #3
0
    def check_dimensions(self, dataset):
        '''
        Checks that the feature types of this dataset are consitent with a time series incomplete dataset

        :param netCDF4.Dataset dataset: An open netCDF dataset
        '''
        required_ctx = TestCtx(
            BaseCheck.HIGH,
            'All geophysical variables are time-series incomplete feature types'
        )
        message = '{} must be a valid timeseries feature type. It must have dimensions of (timeSeries, time).'
        message += ' And all coordinates must have dimensions of (timeSeries)'
        for variable in util.get_geophysical_variables(dataset):
            is_valid = util.is_multi_timeseries_incomplete(dataset, variable)
            required_ctx.assert_true(is_valid, message.format(variable))
        return required_ctx.to_result()