I have three xarray datasets, LATITUDE, LONGITUDE, WIND SPEED all having the same x,y dimensions. I want to assign the LATITUDE and LONGITUDE datasets as coordinates of WIND SPEED at each point in the x,y frame, so that the variable WIND SPEED has dimensions like this: WIND SPEED(LATITUDE, LONGITUDE).
How should I proceed? The input data is the output of a gridded weather model in Netcdf format. I have done some calculations from the input and I want to assign the coordinates to the outputs of the calculations(WIND SPEED). Later I want to do spatial interpolation with with nearest neighbor method, so that I can get a value at any lat,lon within the dataset. Latitude XArray Sample after importing:
array([[21.821693, 21.821693, 21.821693, ..., 21.821693, 21.821693,
21.821693],
......................................................
[30.20221 , 30.20221 , 30.20221 , ..., 30.20221 , 30.20221 ,
30.20221 ]], dtype=float32)
Wind Speed Xarray:
array([[8.725852, 8.758366, 8.728758, ..., nan, nan, nan],
[8.502903, 8.563703, 8.574378, ..., nan, nan, nan],
........]] dtype=float32)