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

Add more verbose error message(s) to explain how to rectify dimension order problems #549

Open
monocongo opened this issue May 29, 2024 · 0 comments

Comments

@monocongo
Copy link
Owner

Is your feature request related to a problem? Please describe.
When the input dataset has variables with dimensions not in the expected order (lat, lon, time) the current behavior is to give an error message that is informative but not prescriptive of a solution:

ValueError: Invalid dimensions for variable 'ppt': ('time', 'lat', 'lon')

Describe the solution you'd like
We should augment this error message with verbiage that indicates how the data can be fixed, i.e. by re-ordering the dimensions using NCO or other tools. For example:

Please use NCO or other NetCDF manipulation tools to re-order the dimensions for the variable as (lat, lon, time). 
For example, using the NCO `ncpdq` operator, like so: `ncpdq -a lat,lon,time in.nc out.nc`

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Issue #548 is a good example of why this is needed.

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

1 participant