Dimension error with open_mdsdataset
Closed this issue · 5 comments
Hi all, I'm having a similar problem to issue #316. I'm trying to open ECCO-Darwin output stored on PODAAC. However, I'm getting an error regarding data dimensions.
ds = open_mdsdataset('/Users/lily/OneDrive/ECCO-Darwin', ignore_unknown_vars="True", default_dtype="float32")
ValueError: dimensions ('j_g', 'i_g') must have the same length as the number of data dimensions, ndim=3
I would appreciate any help or insight - this is my first time working with MITgcm output and I'm excited to approach some fun questions!
Hi @lily-dove, I think adding the argument geometry="llc"
should do the trick
Also you may need to specify nx=270
as well. I can't remember if that's necessary or what resolution ECCO DARWIN uses
Hi @lily-dove, I think adding the argument
geometry="llc"
should do the trick
Thanks @timothyas - the error changes to read: "AssertionError: (50, 13, 270, 270) ['face', 'j_g', 'i_g']". Any thoughts? Still seems like a dimension error. I also added nx=270, but I'm pretty sure that's already defined in the grid meta files.
Very strange. Could you list the files in the directory you're trying to read?
Hi all! Using MITgcm for very different questions now, but I figured out a potential cause of this and wanted to update.
Investigating led me to issue 283, and I realized I was trying to use xmitgcm on multi-threaded output. Solution was to re-run the model using singleCpuIo=.TRUE. in data. Didn't slow down my simulation, although it is quite a small domain.