import xarray as xr import numpy as np ds = xr.open_dataset(path_file) new_lon = np.arange(0,360,0.25) #to regrid all 0.25° new_lat = np.arange(90,-90.25,-0.25) dsi = ds.interp(lat = new_lat, lon = new_lon)