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
Empty NetCDF file was created #143
Comments
Seems to work on my end... |
I tried on Windows 7 & CentOS 6.5 I will retry with the lastest version. |
Some major changes have been merged into develop branch the past few days. Ingesting process is a bit different now. Check out http://agdc-v2.readthedocs.io/en/develop/. Alternatively you could get the stable branch, but the next stable release will include the changes |
Thanks. I try this new version. I have a question : When I Ioad a product definition, why some informations are not indexed ? Like measurements and there spectral_definition. Finally, the Datacube work for my sentinel data 👍 |
Good to hear you got it working! Not sure what you mean by not all of the information being indexed... Could you add a code example so we can try to reproduce? |
That looks really strange... The definitions that are missing would be significantly larger than the ones that are there. Are you sure it's not a SQL client display issue? What happens if you run: from datacube import Datacube
print Datacube().list_measurements() |
You are right ! It's a bug with PgAdmin. The command display all data ! |
I tried to play with the API, so I look the Notebooks. First, I stored Landsat 5 product definition and dataset (provided here). I loaded my DataCube fondig : dc = datacube.Datacube(config='./datacube.conf', app='dc-example')
>>> Datacube<index=Index<db=PostgresDb<engine=Engine(postgresql://datacube:***@localhost:5432/datacube) Then, I loaded a prduct : dc.load(product='ls5_nbar_albers') But an error has occurred : /home_local/pmousset/agdc-v2-develop/datacube/storage/storage.py in wheres_my_band(self, src, time)
176 dist = float('+inf')
177 for i in range(1, src.count+1):
--> 178 v = float(src.tags(i)['NETCDF_DIM_time'])
179 if abs(sec_since_1970 - v) < dist:
180 idx = i
KeyError: 'NETCDF_DIM_time' I also tried with Sentinel-2 data. Issue is the same. DataCube Version : version 0+unknown |
Could be a gdal version issue... could you run: Also if you can find the created netcdf files and do: |
|
This file looks ok. In If you enable logging by: import logging
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO) There should be more info printed out. It should point to the actual file that fails |
It returns this issue:
|
Maybe it's import rasterio
print rasterio.__version__
with rasterio.open('file://NetCDF:/data/LS5_TM_NBAR/LS5_TM_NBAR_3577_15_-40_19920323231413000000.nc:blue') as ds:
print ds.tags(1) Any way you could upload the .nc file as well? |
print rasterio.__version__ Version : 0.36.0 with rasterio.open('file://NetCDF:/data/LS5_TM_NBAR/LS5_TM_NBAR_3577_15_-40_19920323231413000000.nc:blue') as ds:
print ds.tags(1)
<ipython-input-83-3047d970ccb8> in <module>()
1 import rasterio
2 with rasterio.open('file://NetCDF:/data/LS5_TM_NBAR/LS5_TM_NBAR_3577_15_-40_19920323231413000000.nc:blue') as ds:
----> 3 print(ds.tag(1))
AttributeError: 'rasterio._io.RasterReader' object has no attribute 'tag' The .nc file : ls5.zip |
the last line should be I get this when I run it:
|
Oops, I read too fast ! Me, I get this : {'NETCDF_DIMENSION_time': '701392453', |
Somehow your version has For now I've commited a workaround for that issue |
Thank you ! I'll try soon. |
Ok it looks like a change from gdal 1.9 to gdal 1.10. import rasterio
print(rasterio.__gdal_version__) when you get a chance. |
I have 1.9.2 version |
On the server, there are gdal 1.9.2 and gdal 2.0.0 . |
I tried to ingest a granule from Sentinel-2.
Configuration :
The file creation is performed without problems. But, when I read bands containing in the NetCDF file (read each band as array), all value are -999 (due to my nodata configuration).
I have verified that the file is not corrupt and values in JP2 files aren't empty.
Thanks
The text was updated successfully, but these errors were encountered: