Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the viirs EDR tests for newer xarray #2774

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions satpy/tests/reader_tests/test_viirs_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def _create_surf_refl_variables() -> dict[str, xr.DataArray]:
"valid_min": -180.0, "valid_max": 180.0}
lat_attrs = {"standard_name": "latitude", "units": "degrees_north", "_FillValue": -999.9,
"valid_min": -90.0, "valid_max": 90.0}
sr_attrs = {"units": "unitless", "_FillValue": -9999, "scale_factor": 0.0001, "add_offset": 0.0}
sr_attrs = {"units": "unitless", "_FillValue": -9999,
"scale_factor": np.float32(0.0001), "add_offset": np.float32(0.0)}

i_data = np.random.random_sample((I_ROWS, I_COLS)).astype(np.float32)
m_data = np.random.random_sample((M_ROWS, M_COLS)).astype(np.float32)
Expand Down Expand Up @@ -257,7 +258,8 @@ def _create_continuous_variables(var_names: Iterable[str]) -> dict[str, xr.DataA

lon_attrs = {"standard_name": "longitude", "units": "degrees_east", "_FillValue": -999.9}
lat_attrs = {"standard_name": "latitude", "units": "degrees_north", "_FillValue": -999.9}
cont_attrs = {"units": "Kelvin", "_FillValue": -9999, "scale_factor": 0.0001, "add_offset": 0.0}
cont_attrs = {"units": "Kelvin", "_FillValue": -9999,
"scale_factor": np.float32(0.0001), "add_offset": np.float32(0.0)}

m_data = np.random.random_sample((M_ROWS, M_COLS)).astype(np.float32)
data_arrs = {
Expand Down
Loading