Closed corviday closed 7 years ago
It looks possible that the low-level data access code is mixing up the latitude axis. Here are the respective masks for this operation.
Investigating...
Fix going in this branch.
TravisCI runs seem happy, but I have a weird issue where the test suite segfaults on my workstation.
(env36) hiebert@pcic-2004:~/code/climate-explorer-backend$ py.test -v --tb=short -k get_array -k prism_pr_small -k metro_van ce/tests
================================================================= test session starts ==================================================================
platform linux -- Python 3.6.1+, pytest-3.1.3, py-1.4.34, pluggy-0.4.0 -- /home/hiebert/code/climate-explorer-backend/env36/bin/python3.6
cachedir: .cache
rootdir: /home/hiebert/code/climate-explorer-backend, inifile: pytest.ini
collected 88 items
ce/tests/test_api.py::test_stats[metro_van_10] PASSED
ce/tests/test_api.py::test_timeseries[metro_van_10-file0-tasmax] PASSED
ce/tests/test_api.py::test_timeseries_speed[metro_van_10-file0-tasmax] PASSED
ce/tests/test_api.py::test_timeseries_speed[metro_van_10-file4-tasmin] PASSED
ce/tests/test_geo.py::test_clip_speed[metro_van_10-/home/hiebert/code/climate-explorer-backend/ce/tests/data/cgcm.nc] PASSED
ce/tests/test_geo.py::test_clip_speed[metro_van_10-/home/hiebert/code/climate-explorer-backend/ce/tests/data/anuspline_na.nc] PASSED
ce/tests/test_util.py::test_get_array[metro_van_10-cgcm3] PASSED
ce/tests/test_util.py::test_get_array[metro_van_10-cgcm-tmin] PASSED
ce/tests/test_util.py::test_get_array[metro_van_10-prism_pr_small] Segmentation fault (core dumped)
May be related to this rasterio
issue?
This bug is intermittent and hard to reproduce, but sometimes passing an area polygon as a parameter to the API results in all-zeroes data. It affects multiple data files and data sets.
Here's a link to an example API call demonstrating the error. )
The results of that call are:
The same area parameter passed to a call to a different id - tasmax instead of tasmin) also returns all zeroes:
Giving this area as a parameter to the third and final data file in the test collection has the same result).
No error message is generated by these API calls.
There's reasonably good evidence that the values are not zero in the files themselves, in that the ncWMS maps created from the same file show colour variation over the affected polygon.
Passing the same area parameter to an identical copy of the climate explorer backend running against a different metadata database and different data files does not reproduce the error):