-
Notifications
You must be signed in to change notification settings - Fork 143
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
fieldset time dimension #453
Comments
I indeed expect that the problem is related to your time dimension. Could you copy the header of your netcdf file here, so that we can have a look? By the way, is there a reason that you use |
Actually I tried first without full_load and then with, and also with specified indices but i got the same error. |
OK, thanks. Nothing immediately jumps out as an obvious problem. |
After having explored the netcdf file you sent me, I think I have a fix. It's in a branch at https://github.com/OceanParcels/parcels/compare/fix-mitgcm-time-dimension Could you try run with this branch, and see if that fixes the error for you? |
Hi, sorry for the late reply. Currently I'm out of city for a meeting, I'll look into it as soon as I get back. |
This branch has now become a PR (see #460) and I've also cleaned the code a bit. You will now have to explicitly add
Can you please check whether this now works for you? |
Hello
I'm just a new user trying to read my model outputs from a netcdf file with following:
variables={'U': 'UVEL', 'V' :'VVEL', 'W':'WVEL'}
dimensions['U']={'time':'T','depth':'diag_levels','lat':'Y','lon':'Xp1'}
dimensions['V']={'time':'T','depth':'diag_levels','lat':'Yp1','lon':'X'}
dimensions['W']={'time':'T','depth':'diag_levels','lat':'Y','lon':'X'}
fset = FieldSet.from_netcdf(filenames, variables, dimensions,full_load=True)
however I'm getting this error:
field.pyc in from_netcdf(cls, filenames, variable, dimensions, indices, grid, mesh, allow_time_extrapolation, time_periodic, full_load, dimension_filename, **kwargs)
221 data[ti:ti+len(tslice), 0, :, :] = filebuffer.data[:, :, :]
222 else:
--> 223 data[ti:ti+len(tslice), :, :, :] = filebuffer.data[:, :, :, :]
224 ti += len(tslice)
225 else:
ValueError: could not broadcast input array from shape (583,50,200,176) into shape (1,50,200,176)
T is the unlimited dimension so it's a masked array. could this be causing the problem?
The text was updated successfully, but these errors were encountered: