QC checks on sequential buoy reports

marine_qc.do_aground_check(lons, lats, dates, smooth_win, min_win_period, max_win_period)[source]

Perform the aground check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • smooth_win (int) – Length of window (odd number) in datapoints used for smoothing lon/lat.

  • min_win_period (int) – Minimum period of time in days over which position is assessed for no movement (see description).

  • max_win_period (int or None) – Maximum period of time in days over which position is assessed for no movement (this should be greater than min_win_period and allow for erratic temporal sampling e.g. min_win_period+2 to allow for gaps of up to 2-days in sampling).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if aground check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • smooth_win = 41

  • min_win_period = 8

  • max_win_period = 10

marine_qc.do_speed_check(lons, lats, dates, speed_limit, min_win_period, max_win_period)[source]

Perform the Track QC speed check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • speed_limit (float) – Maximum allowable speed for an in situ drifting buoy (metres per second).

  • min_win_period (float) – Minimum period of time in days over which position is assessed for speed estimates (see description).

  • max_win_period (float) – Maximum period of time in days over which position is assessed for speed estimates (this should be greater than min_win_period and allow for some erratic temporal sampling e.g. min_win_period + 0.2 to allow for gaps of up to 0.2 - days in sampling).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if speed check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • speed_limit = 2.5

  • min_win_period = 0.8

  • max_win_perido = 1.8

marine_qc.do_new_speed_check(lons, lats, dates, speed_limit, min_win_period, ship_speed_limit, delta_d, delta_t, n_neighbours)[source]

Perform the new speed check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • speed_limit (float) – Maximum allowable speed for an in situ drifting buoy (metres per second).

  • min_win_period (float) – Minimum period of time in days over which position is assessed for speed estimates (see description).

  • ship_speed_limit (float) – Ship speed limit for the IQUAM track check.

  • delta_d (float) – The smallest increment in distance that can be resolved. For 0.01 degrees of lat-lon this is 1.11 km. Used in the IQUAM track check.

  • delta_t (float) – The smallest increment in time that can be resolved. For hourly data expressed as a float this is 0.01 hours. Used in the IQUAM track check.

  • n_neighbours (int) – Number of neighbours considered in the IQUAM track check.

Return type:

ndarray

Returns:

array-like of int, shape (n,) – Array containing the QC outcomes for the new speed check.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • speed_limit = 3.0

  • min_win_period = 0.375

And, for the IQUAM-specific parameters:

  • ship_speed_limit = 60.0

  • delta_d = 1.11

  • delta_t = 0.01

  • n_neighbours = 5

marine_qc.do_new_aground_check(lons, lats, dates, smooth_win, min_win_period)[source]

Perform the new aground check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • smooth_win (int) – Length of window (odd number) in datapoints used for smoothing lon/lat.

  • min_win_period (int) – Minimum period of time in days over which position is assessed for no movement (see description).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if new aground check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • smooth_win = 41

  • min_win_period = 8

marine_qc.do_sst_biased_check(lons, lats, dates, sst, ostia, ice, bgvar, n_eval, bias_lim, drif_intra, drif_inter, err_std_n, n_bad, background_err_lim)[source]

Perform the SST bias check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • sst (SequenceNumberType) – 1-dimensional array of sea surface temperatures in K.

  • ostia (SequenceNumberType) – 1-dimensional array of background field sea surface temperatures in K.

  • ice (SequenceNumberType) – 1-dimensional array of ice concentrations in the range 0.0 to 1.0.

  • bgvar (SequenceNumberType) – 1-dimensional array of background sea surface temperature fields variances in K^2.

  • n_eval (int) – The minimum number of drifter observations required to be assessed by the long-record check.

  • bias_lim (float) – Maximum allowable drifter-background bias, beyond which a record is considered biased (degC or K).

  • drif_intra (float) – Maximum random measurement uncertainty reasonably expected in drifter data (standard deviation, degC or K).

  • drif_inter (float) – Spread of biases expected in drifter data (standard deviation, degC or K).

  • err_std_n (float) – Number of standard deviations of combined background and drifter error, beyond which short-record data are deemed suspicious.

  • n_bad (int) – Minimum number of suspicious data points required for failure of short-record check.

  • background_err_lim (float) – Background error variance beyond which the SST background is deemed unreliable (degC squared or K squared).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if SST bias check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • n_eval = 30

  • bias_lim = 1.10

  • drif_intra = 1.0

  • drif_inter = 0.29

  • err_std_n = 3.0

  • n_bad = 2

  • background_err_lim = 0.3

marine_qc.do_sst_biased_noisy_short_check(lons, lats, dates, sst, ostia, ice, bgvar, n_eval, bias_lim, drif_intra, drif_inter, err_std_n, n_bad, background_err_lim)[source]

Perform the SST short check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • sst (SequenceNumberType) – 1-dimensional array of sea surface temperatures in K.

  • ostia (SequenceNumberType) – 1-dimensional array of background field sea surface temperatures in K.

  • ice (SequenceNumberType) – 1-dimensional array of ice concentrations in the range 0.0 to 1.0.

  • bgvar (SequenceNumberType) – 1-dimensional array of background sea surface temperature fields variances in K^2.

  • n_eval (int) – The minimum number of drifter observations required to be assessed by the long-record check.

  • bias_lim (float) – Maximum allowable drifter-background bias, beyond which a record is considered biased (degC or K).

  • drif_intra (float) – Maximum random measurement uncertainty reasonably expected in drifter data (standard deviation, degC or K).

  • drif_inter (float) – Spread of biases expected in drifter data (standard deviation, degC or K).

  • err_std_n (float) – Number of standard deviations of combined background and drifter error, beyond which short-record data are deemed suspicious.

  • n_bad (int) – Minimum number of suspicious data points required for failure of short-record check.

  • background_err_lim (float) – Background error variance beyond which the SST background is deemed unreliable (degC squared or K squared).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if SST short check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • n_eval = 30

  • bias_lim = 1.10

  • drif_intra = 1.0

  • drif_inter = 0.29

  • err_std_n = 3.0

  • n_bad = 2

  • background_err_lim = 0.3

marine_qc.do_sst_noisy_check(lons, lats, dates, sst, ostia, ice, bgvar, n_eval, bias_lim, drif_intra, drif_inter, err_std_n, n_bad, background_err_lim)[source]

Perform the SST noise check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • sst (SequenceNumberType) – 1-dimensional array of sea surface temperatures in K.

  • ostia (SequenceNumberType) – 1-dimensional array of background field sea surface temperatures in K.

  • ice (SequenceNumberType) – 1-dimensional array of ice concentrations in the range 0.0 to 1.0.

  • bgvar (SequenceNumberType) – 1-dimensional array of background sea surface temperature fields variances in K^2.

  • n_eval (int) – The minimum number of drifter observations required to be assessed by the long-record check.

  • bias_lim (float) – Maximum allowable drifter-background bias, beyond which a record is considered biased (degC or K).

  • drif_intra (float) – Maximum random measurement uncertainty reasonably expected in drifter data (standard deviation, degC or K).

  • drif_inter (float) – Spread of biases expected in drifter data (standard deviation, degC or K).

  • err_std_n (float) – Number of standard deviations of combined background and drifter error, beyond which short-record data are deemed suspicious.

  • n_bad (int) – Minimum number of suspicious data points required for failure of short-record check.

  • background_err_lim (float) – Background error variance beyond which the SST background is deemed unreliable (degC squared or K squared).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if SST noise check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • n_eval = 30

  • bias_lim = 1.10

  • drif_intra = 1.0

  • drif_inter = 0.29

  • err_std_n = 3.0

  • n_bad = 2

  • background_err_lim = 0.3

marine_qc.do_sst_end_tail_check(lons, lats, dates, sst, ostia, ice, bgvar, long_win_len, long_err_std_n, short_win_len, short_err_std_n, short_win_n_bad, drif_inter, drif_intra, background_err_lim)[source]

Perform the SST Start Tail Check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • sst (SequenceNumberType) – 1-dimensional array of sea surface temperatures in K.

  • ostia (SequenceNumberType) – 1-dimensional array of background field sea surface temperatures in K.

  • ice (SequenceNumberType) – 1-dimensional array of ice concentrations in the range 0.0 to 1.0.

  • bgvar (SequenceNumberType) – 1-dimensional array of background sea surface temperature fields variances in K^2.

  • long_win_len (int) – Length of window (in data-points) over which to make long tail-check (must be an odd number).

  • long_err_std_n (float) – Number of standard deviations of combined background and drifter bias error, beyond which data fail bias check.

  • short_win_len (int) – Length of window (in data-points) over which to make the short tail-check.

  • short_err_std_n (float) – Number of standard deviations of combined background and drifter error, beyond which data are deemed suspicious.

  • short_win_n_bad (int) – Minimum number of suspicious data points required for failure of short check window.

  • drif_inter (float) – Spread of biases expected in drifter data (standard deviation, degC or K).

  • drif_intra (float) – Maximum random measurement uncertainty reasonably expected in drifter data (standard deviation, degC or K).

  • background_err_lim (float) – Background error variance beyond which the SST background is deemed unreliable (degC squared).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if SST start tail check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • long_win_len = 121

  • long_err_std_n = 3.0

  • short_win_len = 30

  • short_err_std_n = 3.0

  • short_win_n_bad = 2

  • drif_inter = 0.29

  • drif_intra = 1.00

  • background_err_lim = 0.3

marine_qc.do_sst_start_tail_check(lons, lats, dates, sst, ostia, ice, bgvar, long_win_len, long_err_std_n, short_win_len, short_err_std_n, short_win_n_bad, drif_inter, drif_intra, background_err_lim)[source]

Perform the SST Start Tail Check.

Parameters:
  • lons (SequenceNumberType) – 1-dimensional longitude array in degrees.

  • lats (SequenceNumberType) – 1-dimensional latitude array in degrees.

  • dates (SequenceDatetimeType) – 1-dimensional date array.

  • sst (SequenceNumberType) – 1-dimensional array of sea surface temperatures in K.

  • ostia (SequenceNumberType) – 1-dimensional array of background field sea surface temperatures in K.

  • ice (SequenceNumberType) – 1-dimensional array of ice concentrations in the range 0.0 to 1.0.

  • bgvar (SequenceNumberType) – 1-dimensional array of background sea surface temperature fields variances in K^2.

  • long_win_len (int) – Length of window (in data-points) over which to make long tail-check (must be an odd number).

  • long_err_std_n (float) – Number of standard deviations of combined background and drifter bias error, beyond which data fail bias check.

  • short_win_len (int) – Length of window (in data-points) over which to make the short tail-check.

  • short_err_std_n (float) – Number of standard deviations of combined background and drifter error, beyond which data are deemed suspicious.

  • short_win_n_bad (int) – Minimum number of suspicious data points required for failure of short check window.

  • drif_inter (float) – Spread of biases expected in drifter data (standard deviation, degC or K).

  • drif_intra (float) – Maximum random measurement uncertainty reasonably expected in drifter data (standard deviation, degC or K).

  • background_err_lim (float) – Background error variance beyond which the SST background is deemed unreliable (degC squared).

Return type:

ndarray

Returns:

array-like of int, shape (n,) – 1-dimensional array containing QC flags. 1 if SST start tail check fails, 0 otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.

Notes

In previous versions, default values for the parameters were:

  • long_win_len = 121

  • long_err_std_n = 3.0

  • short_win_len = 30

  • short_err_std_n = 3.0

  • short_win_n_bad = 2

  • drif_inter = 0.29

  • drif_intra = 1.00

  • background_err_lim = 0.3