Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dimension error with open_mdsdataset #319

Closed
lily-dove opened this issue Feb 28, 2023 · 5 comments
Closed

Dimension error with open_mdsdataset #319

lily-dove opened this issue Feb 28, 2023 · 5 comments

Comments

@lily-dove
Copy link

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!

@timothyas
Copy link
Member

Hi @lily-dove, I think adding the argument geometry="llc" should do the trick

@timothyas
Copy link
Member

Also you may need to specify nx=270 as well. I can't remember if that's necessary or what resolution ECCO DARWIN uses

@lily-dove
Copy link
Author

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.

@timothyas
Copy link
Member

Very strange. Could you list the files in the directory you're trying to read?

@lily-dove
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants