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

Need better error messages in python interpreter #2965

Closed
sgpearse opened this issue Jan 10, 2022 · 1 comment · Fixed by #2967
Closed

Need better error messages in python interpreter #2965

sgpearse opened this issue Jan 10, 2022 · 1 comment · Fixed by #2967

Comments

@sgpearse
Copy link
Collaborator

To reproduce:

  1. Import any MayControl file (IE - /glade/p/cisl/vast/vapor/data/Source/CM1/Orf/24Maycontrol/24Maycontrol.04000.000000.nc)
  2. Create a new Python script with inputs uinterp, vinterp, and winterp
  3. Create an output variable named 'foo'
  4. Test/execute the following script:

from vapor_utils import * foo=CurlFinDiff(uinterp, vinterp, winterp, 10000.,10000.,1000.)

Error:

Failed to read variable "foo" at time step (0), and
refinement level (-1) and level-of-detail (-1)
Failed to read region from variable/timestep/level/lod (foo, 0, -1, -1)
Variable foo not produced by script
Vapor 3.5.0.8aef7cce6
OS: Mac OS X 11.6.0
@sgpearse sgpearse added the Bug label Jan 10, 2022
@clyne
Copy link
Collaborator

clyne commented Jan 11, 2022

CurlFinDiff() returns a tuple of ndarrays (the components of the curl), not a single array. This is documented as part of the 'calling sequence'. Hence, your script doesn't produce the required output variable, 'foo', of type ndarray/float32.

Nevertheless, I will try to improve the error message generated, and change this to a usability issue.

@clyne clyne added Usability and removed Bug labels Jan 11, 2022
@clyne clyne changed the title vapor_utils.py - CurlFinDiff Error Need better error messages in python interpreter Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants