def test_spatial_smoothing_xesmf_reduce_spatial_dims_CESM(fosi_3d): """Test whether spatial dimsizes are properly reduced.""" da = fosi_3d step = 0.1 actual = spatial_smoothing_xesmf(da, d_lon_lat_kws={'lat': step}) # test whether upsampled assert actual['lon'].size >= da.nlon.size assert actual['lat'].size >= da.nlat.size
def test_spatial_smoothing_xesmf_reduce_spatial_dims_MPI_curv(pm_da_control3d): """Test whether spatial dimsizes are properly reduced.""" da = pm_da_control3d step = 5 actual = spatial_smoothing_xesmf(da, d_lon_lat_kws={'lon': step}) expected_lat_size = 180 // step assert actual['lon'].size < da.lon.size assert actual['lat'].size == expected_lat_size
def test_spatial_smoothing_xesmf_reduce_spatial_dims_CESM( reconstruction_ds_3d_full, ): """Test whether spatial dimsizes are properly reduced.""" da = reconstruction_ds_3d_full step = 0.1 actual = spatial_smoothing_xesmf(da, d_lon_lat_kws={"lat": step}) # test whether upsampled assert actual["lon"].size >= da.nlon.size assert actual["lat"].size >= da.nlat.size
def test_spatial_smoothing_xesmf_reduce_spatial_dims_MPI_curv( PM_da_control_3d_full, ): """Test whether spatial dimsizes are properly reduced.""" da = PM_da_control_3d_full step = 5 actual = spatial_smoothing_xesmf(da, d_lon_lat_kws={"lon": step}) expected_lat_size = 180 // step assert actual["lon"].size < da.lon.size assert actual["lat"].size == expected_lat_size