Replies: 2 comments
-
What do you want it to look like? You are making a list of 12 there, so the first dimension sounds right - and 480 is 12x40? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This looks like a bug but it seems unlikely. It should be concatenating over a new dimension named |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This question is based on one I asked yesterday: #5119. Apologies for double posting in this forum.
But now I am wondering if it's possible to append an xarray data set?
I have monthly data set in dimensions (time, depth, y, and x). and I am hoping to regroup the data into months (Jan - Dec), # of years in that month, depth, y, and x. Apologies in advance for not having reproducible data... just think of this data set as monthly time steps and spatial coordinates:
In my case, I have 480 monthly data points, which would equal for 12 months, there would be 40 years.
I tried:
which outputs the right thing, where for each month there's 40 time points per month (January - December):
However, I tried using
xr.concat
to try and put the new xarray dataframenew_ds
into "one dataframe":combined = xr.concat(new_ds,dim='test')
but now it outputs a xarray frame as shape: 12, 480, z, y, and x. Instead of what
new_ds
does.Is the issue with my iterating and appending or with the concatetanation?
Beta Was this translation helpful? Give feedback.
All reactions