-
Notifications
You must be signed in to change notification settings - Fork 33
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
PrePARE issues #332
Comments
Hi Karl, regarding point 2 of your issue, I already add the following fix on my PrePARE instance (be part of my next PR):
|
For the point 1, do you mean it should be: If yes, I will include this change in my PR. |
Yes, that was my suggestion. The intent is to make sure file_value is the same (or almost the same) as table_value. Note that the code shown above is preceded by a test for a special case. We could also eliminate the test for the case when file_value is 0. by writing it:
This would require file_value to be equal to table_value when table_value=0., and when not, the two would be required to very nearly be the same (i.e., to within 0.001%). The approximate condition will allow for truncation errors. These truncation errors should be avoidable, so perhaps we should raise a warning when exact equivalence is not found. What do you think? |
closed by mistake, but the original fix has been submitted as a pull request by @glevava |
Might use my equation that eliminates the if test for 0. |
To be more general (e.g., for cases where the table_value<0), we need another abs function in the test:
|
@doutriaux1 this is done, not sure why @taylor13 reopened it. The climatology was merged but guillaume changed a couple of line that need to be merged again and all tests need to be run. |
I haven't rechecked, but last time I looked the correct if-test specified in #332 (comment) had not been implemented. That's why I reopened. |
In #332 (comment) , the < symbol should be replaced with symbol for less than or equal to. Thanks, @doutriaux1 , for catching the error. with this change the test will be passed even if both the fill value and table value are 0.0 |
I reviewed the python PrePARE code and noticed the following potential problems:
which is preceded by a test to trap the case of file_value=0.
This test is not rigid enough because, for example, a file_value = table_value/100. will satisfy the test even though we want the table_value and file_value to be the same. The expression on the left side of the if test comparison should be inside an absolute value function.
The text was updated successfully, but these errors were encountered: