-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Local test failure in test_ecmwf_macc.py::test_read_ecmwf_macc
#1609
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
Comments
It seems the error happens in the selection of the data in the variable pvlib-python/pvlib/tests/iotools/test_ecmwf_macc.py Lines 70 to 73 in 5b05914
Which has the following output:
Only the two middle values (9 am and 12 pm) should have been selected. However, somehow the values before and after are also included, and thus the comparison error happens (as 4 values are compared to 2 values). |
I've tracked it down to this change in cftime 1.6.0: Unidata/cftime#273 The difference, as @AdamRJensen notes, is that the behavior of pvlib-python/pvlib/iotools/ecmwf_macc.py Lines 296 to 299 in 55e0577
I'm not sure what is best for us to do. Switching to |
I doubt anyone really uses this function... it doesn't really seem so from the search results. I could be convinced to remove it. @mikofski are you still using this function? What was the use case? I imagine that MERRA-2 or ERA5 would be better sources of data these days. MACC Reanalysis also seems rather outdated based on this link:
|
I am with removing it. I used it to retrieve AOD and precipitable water from the CAMS McClear model, but I agree I think it has been archived. Those dates are correct, so it is over 10 years old by now. (Although I think our Linke turbidity data from SoDa is also that old or older.) |
Describe the bug
@mdeceglie and I observe
pvlib/tests/iotools/test_ecmwf_macc.py::test_read_ecmwf_macc
to fail locally withValueError: operands could not be broadcast together with shapes (4,) (2,)
.To Reproduce
Steps to reproduce the behavior:
conda create -n ecmwf39 python=3.9
conda activate ecmwf39
pip install pvlib[all]
pytest pvlib\tests\iotools\test_ecmwf_macc.py
pytest output
Expected behavior
I expect tests to pass. I also expect local test results to be consistent with CI test results.
Versions:
pvlib.__version__
: 0.9.3pandas.__version__
: 1.5.2Additional context
The test failure is with
netCDF4==1.6.2
from PyPI. Reinstalling it in the environment created above but from conda-forge (pip uninstall netCDF4; conda install -c conda-forge netCDF4
) results in the test being skipped. At least in my Windows environment, this is because of some incompatibility betweenh5py
andnetCDF4
causingimport h5py, netCDF4
to raiseImportError
butimport netCDF4
to be fine.The text was updated successfully, but these errors were encountered: