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

Update _visual class to align with latest pyearth syntax #214

Open
mgcooper opened this issue May 5, 2024 · 1 comment
Open

Update _visual class to align with latest pyearth syntax #214

mgcooper opened this issue May 5, 2024 · 1 comment

Comments

@mgcooper
Copy link
Contributor

mgcooper commented May 5, 2024

Description:
The _visual class appears to be using outdated syntax when importing and calling functions from pyearth. Specifically, the map_vector_polygon_data function requires two leading positional arguments, but the implementation in the _visual class provides only one positional argument during function calls (sFilename_in).

I assume this is left over syntax from the embedded version of pyearth which is now an external dependency. I have the latest pyearth installed in my environment, so _visual is importing from that.

Error Encountered: TypeError: map_vector_polygon_data() missing 1 required positional argument: 'sFilename_in'

Note: the trace says sFilename_in is missing, but that's because the call from _visual is passing sFilename_in and the latest version of map_vector_polygon_data interprets this as the leading iFiletype_in argument.

I ran into this when patching up run_simulation_mpas.py, where the final mesh and flowline are plotted near the end.

We should probably make an effort to align pyflowline with the latest pyearth library syntax in general.

@changliao1025
Copy link
Owner

The pyearth has some advanced visualization features, and we need to be careful with how to make them more stable.

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