Skip to content

Convert gives unexpected results with python embedding in Grid-Stat #2214

Discussion options

You must be logged in to vote

Good news, I found the bug in src/libcode/vx_data2d_python/data2d_python.cc.

MET runs the python script once and stores the result in a DataPlane object. Future calls to retrieve data from that python script just serve up the data it reads the first time. The bug is that the conversion and censoring logic are being applied to that stored version. And Grid-Stat calls that python script twice, once to get the grid definition and once to get the data. So the conversion function was being applied to that stored version 2 times.

The fix is to leave the data read from the python script as-is. Apply the conversion and censoring logic to a copy of the DataPlane object rather than modifying it in …

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@CPKalb
Comment options

CPKalb Jun 13, 2023
Collaborator Author

Comment options

You must be logged in to vote
8 replies
@CPKalb
Comment options

CPKalb Jun 14, 2023
Collaborator Author

@JohnHalleyGotway
Comment options

@CPKalb
Comment options

CPKalb Jun 14, 2023
Collaborator Author

@JohnHalleyGotway
Comment options

Answer selected by CPKalb
@JohnHalleyGotway
Comment options

@CPKalb
Comment options

CPKalb Jun 14, 2023
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment