diff --git a/src/goes_abi_converter_mod.f90 b/src/goes_abi_converter_mod.f90 index 415390d0..f01447f1 100644 --- a/src/goes_abi_converter_mod.f90 +++ b/src/goes_abi_converter_mod.f90 @@ -105,7 +105,10 @@ subroutine write_iodav3_netcdf(fname, nlocs, nchans, missing_r, missing_i, & call check(netcdfAddGroup(ncid, 'MetaData')) call check(netcdfAddDim(ncid, 'nlocs', nlocs, nlocs_dimid)) + call check(netcdfAddVar(ncid, 'nlocs', NF90_INT, 1, ['nlocs'])) + call check(netcdfAddDim(ncid, 'nchans', nchans, nchans_dimid)) + call check(netcdfAddVar(ncid, 'nchans', NF90_INT, 1, ['nchans'])) ! Define variables call check(netcdfAddVar(ncid, "brightness_temperature", NF90_REAL, 2, ['nlocs ', 'nchans'], 'ObsValue', fillValue=missing_r)) diff --git a/test/validation/data/goes_abi/write_ioda_v3/reference/write_goes_abi_ioda_v3.nc b/test/validation/data/goes_abi/write_ioda_v3/reference/write_goes_abi_ioda_v3.nc index b47855c9..8d26ab46 100644 Binary files a/test/validation/data/goes_abi/write_ioda_v3/reference/write_goes_abi_ioda_v3.nc and b/test/validation/data/goes_abi/write_ioda_v3/reference/write_goes_abi_ioda_v3.nc differ diff --git a/test/validation/test_goes_abi.py b/test/validation/test_goes_abi.py index b2dd40f1..1af9ff80 100644 --- a/test/validation/test_goes_abi.py +++ b/test/validation/test_goes_abi.py @@ -1,3 +1,5 @@ +from numpy.ma.core import masked_equal + from test_utils.utils import extract_structure, format_netcdf_assert_msg import pytest @@ -110,7 +112,7 @@ def test_data_match(goes_abi_file_pair): test = test_struct[group][varname] if np.issubdtype(ref["dtype"], np.number): - assert np.allclose(ref["data"], test["data"], rtol=1e-5, atol=1e-6), format_netcdf_assert_msg( + assert np.ma.allclose(ref["data"], test["data"], rtol=1e-5, atol=1e-6, masked_equal=True), format_netcdf_assert_msg( output_file.name, group, varname, "Numerical data mismatch", ref["data"], test["data"] ) elif np.issubdtype(ref["dtype"], np.str_):