0

i am new in this field and i need a small help. i just want to know that, what is the best way to append multiple data arrays in a variable of a xarray dataset? each data array has a different time and value but has the same x,y coordinates same as dataset. i tried ds[variable_name] = da but it works only for the first data array . i want to create a function that gets data arrays and put them into one variable of the dataset and updating the time dimension of the dataset. thanks for your help

1 Answer 1

1

The best way for doing that is first to convert data arrays to datasets separately then merge datasets together (using xr.merge). Hope it helps the others.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.