Closed dharanidharan12 closed 5 years ago
Probably your version of NOAA OilLibrary is outdated.
Please update both OpenDrift and OilLibrary to the latest versions, to ensure compatibility.
Note that OilLibrary needs to be recompiled with python setup.py remake_oil_db
after updating the code.
Dear authors, When testing the oillibrary, i have the problems: FAIL: test_dispersion (main.TestOil) Traceback (most recent call last): File "C:/opendrift-master/tests/test_oillibrary.py", line 92, in test_dispersion fraction_dispersed) AssertionError: 0.09339651 != 0.068167008 within 7 places
====================================================================== FAIL: test_droplet_distribution (main.TestOil) Traceback (most recent call last): File "C:/opendrift-master/tests/test_oillibrary.py", line 130, in test_droplet_distribution self.assertAlmostEqual(d.mean(), 0.00006904389) AssertionError: 5.763371939835245e-05 != 6.904389e-05 within 7 places
Would you please to help me?
Maybe you have an old version of either software? You may check version numbers by:
>>> import opendrift
>>> opendrift.__version
'1.0.3'
>>> import oil_library
>>> oil_library.__version__
'1.0.6'
These are the latest versions, which should work well together.
I have these version. I don't know why ???
Is this the only test which fails?
Can you paste here the full output you get when running the test test_oillibrary.py ? (or send the complete output from testall by email to knutfd@met.no)
This is the output when I run the test test_oillibrary.py:
runfile('C:/opendrift-master/tests/test_oillibrary.py', wdir='C:/opendrift-master/tests') No display found. Using non-interactive Agg backend c:\opendrift-master\opendrift\models\basemodel.py:42: UserWarning: This call to matplotlib.use() has no effect because the backend has already been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.
The backend was originally set to u'Qt4Agg' by the following code:
File "C:\WinPython27\python-2.7.13.amd64\lib\site-packages\spyder\utils\ipython\start_kernel.py", line 268, in
matplotlib.use('agg') C:\WinPython27\python-2.7.13.amd64\lib\site-packages\scipy\optimize\minpack.py:785: OptimizeWarning: Covariance of the parameters could not be estimated category=OptimizeWarning) Dispersion fraction 0.000000 for SMORBUKK KONDENSAT and wind speed 3.000000 FDispersion fraction 0.093397 for SMORBUKK KONDENSAT and wind speed 8.000000 TIMING: (8.96s) main.TestOil.test_dispersion FTIMING: (0.56s) main.TestOil.test_droplet_distribution .TIMING: (0.72s) main.TestOil.test_no_dispersion *GENERIC MEDIUM CRUDE 0.18113588361019167 .AASGARD BLEND, STATOIL 0.5357305057872878 TIMING: (0.91s) main.TestOil.test_oils
Traceback (most recent call last): File "C:/opendrift-master/tests/test_oillibrary.py", line 92, in test_dispersion fraction_dispersed) AssertionError: 0.09339651 != 0.068167008 within 7 places
Traceback (most recent call last): File "C:/opendrift-master/tests/test_oillibrary.py", line 130, in test_droplet_distribution self.assertAlmostEqual(d.mean(), 0.00006904389) AssertionError: 5.763371939835245e-05 != 6.904389e-05 within 7 places
Ran 4 tests in 11.180s
FAILED (failures=2)
I also have the same problem with the test_stranding.py. So from testall I have: Output of testall.docx
Hope you can find out what happened.
In Openoil3D: Getting Error: 'OilProps' object has no attribute 'oil_water_surface_tension' Why I am getting this issue. Please Help to Resolve the error.. Thanks in Advance!!!