Skip to content

Commit

Permalink
Temporarily remove support for cases when nbit is 0 in Template 5.2/7…
Browse files Browse the repository at this point in the history
….2 support
  • Loading branch information
noritada committed Nov 6, 2023
1 parent ee6584d commit 30cba06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
14 changes: 7 additions & 7 deletions cli/tests/cli/commands/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ test_operation_with_data_with_nan_values_as_little_endian! {
"-l",
utils::testdata::flat_binary::noaa_ndfd_critfireo_0_le()?
),
(
decoding_complex_packing_without_spatial_differencing_as_little_endian_when_nbit_is_zero,
utils::testdata::grib2::noaa_ndfd_critfireo()?,
"1.0",
"-l",
utils::testdata::flat_binary::noaa_ndfd_critfireo_1_le()?
),
// (
// decoding_complex_packing_without_spatial_differencing_as_little_endian_when_nbit_is_zero,
// utils::testdata::grib2::noaa_ndfd_critfireo()?,
// "1.0",
// "-l",
// utils::testdata::flat_binary::noaa_ndfd_critfireo_1_le()?
// ),
(
decoding_complex_packing_with_missing_value_management_as_little_endian,
utils::testdata::grib2::noaa_ndfd_minrh()?,
Expand Down
1 change: 1 addition & 0 deletions cli/tests/cli/utils/testdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ pub(crate) mod flat_binary {
unxz_as_bytes(testdata_dir().join("gen").join("ds.critfireo.bin.0.xz"))
}

#[allow(dead_code)]
pub(crate) fn noaa_ndfd_critfireo_1_le() -> Result<Vec<u8>, io::Error> {
unxz_as_bytes(testdata_dir().join("gen").join("ds.critfireo.bin.1.xz"))
}
Expand Down
6 changes: 2 additions & 4 deletions src/decoders/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ pub(crate) fn decode_without_spdiff(
let complex_param = ComplexPackingParam::from_buf(&sect5_data[16..42]);

if simple_param.nbit == 0 {
let decoder = SimplePackingDecodeIteratorWrapper::FixedValue(FixedValueIterator::new(
simple_param.ref_val,
target.num_points_encoded,
return Err(GribError::DecodeError(
DecodeError::ComplexPackingDecodeError(ComplexPackingDecodeError::NotSupported),
));
return Ok(decoder);
};

if complex_param.group_splitting_method_used != 1
Expand Down

0 comments on commit 30cba06

Please sign in to comment.