Applied-GeoSolutions / gips

Geospatial Image Processing System
GNU General Public License v3.0
17 stars 5 forks source link

Sentinel2 fetch from GS failing #496

Closed sullamenashe closed 6 years ago

sullamenashe commented 6 years ago

We are using gips_fetch to pull Sentinel2 data from google storage. We are running the same command both from an AWS spot instance and from a GCP Kubernetes cluster. We are processing the data for specific tiles using a shapefile that has the tile boundaries. I show below the original call of the gips_fetch from the GCP cluster. Note the parts that say "ERROR 1: Stream too short." It seems to fail on inconsistent bands - in other words if I run this a second time it will fail on different bands and sometimes will get through an entire image (there are 5 images in this tile) without failing. The same fetch command on an AWS spot instance seems to be giving fewer errors but is slower and is showing the same behavior.

**root@tl-octopus-k8s-worker-deployment-6b7946cdbd-ncnbt:/usr/local/octopus# gips_export sentinel2 -p ref -d 2018-06-12 -s /archive/vector/conus_ard_grid.shp -w "h=24 and v=9" -v4 --outdir /mnt/storage/tmp --notld --res 30 30 --fetch**
GIPS Data Export (v0.12.0-dev)
Retrieving inventory for site conus_ard_grid-471 for date range 2018-06-12 - 2018-06-12 (days 1-366)
Found complete L1CGS asset for (17SKD, 2018-06-12 00:00:00)
Found complete L1CGS asset for (17SKD, 2018-06-12 00:00:00)
Found complete L1CGS asset for (17TKE, 2018-06-12 00:00:00)
Found complete L1CGS asset for (17TKE, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16TGK, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16TGK, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16SGH, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16SGH, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16SGJ, 2018-06-12 00:00:00)
Found complete L1CGS asset for (16SGJ, 2018-06-12 00:00:00)
S2A_MSIL1C_20180612T162901_N0206_R083_T17SKD_20180612T200930.SAFE_gs.json -> /archive/sentinel2/tiles/17SKD/2018163/S2A_MSIL1C_20180612T162901_N0206_R083_T17SKD_20180612T200930.SAFE_gs.json
1 files (1 links) from /archive/sentinel2/stage/S2A_MSIL1C_20180612T162901_N0206_R083_T17SKD_20180612T200930.SAFE_gs.json added to archive in 0:00:00.000589
S2A_MSIL1C_20180612T162901_N0206_R083_T16SGH_20180612T200930.SAFE_gs.json -> /archive/sentinel2/tiles/16SGH/2018163/S2A_MSIL1C_20180612T162901_N0206_R083_T16SGH_20180612T200930.SAFE_gs.json
1 files (1 links) from /archive/sentinel2/stage/S2A_MSIL1C_20180612T162901_N0206_R083_T16SGH_20180612T200930.SAFE_gs.json added to archive in 0:00:00.000668
S2A_MSIL1C_20180612T162901_N0206_R083_T17TKE_20180612T200930.SAFE_gs.json -> /archive/sentinel2/tiles/17TKE/2018163/S2A_MSIL1C_20180612T162901_N0206_R083_T17TKE_20180612T200930.SAFE_gs.json
1 files (1 links) from /archive/sentinel2/stage/S2A_MSIL1C_20180612T162901_N0206_R083_T17TKE_20180612T200930.SAFE_gs.json added to archive in 0:00:00.000535
S2A_MSIL1C_20180612T162901_N0206_R083_T16SGJ_20180612T200930.SAFE_gs.json -> /archive/sentinel2/tiles/16SGJ/2018163/S2A_MSIL1C_20180612T162901_N0206_R083_T16SGJ_20180612T200930.SAFE_gs.json
1 files (1 links) from /archive/sentinel2/stage/S2A_MSIL1C_20180612T162901_N0206_R083_T16SGJ_20180612T200930.SAFE_gs.json added to archive in 0:00:00.000492
S2A_MSIL1C_20180612T162901_N0206_R083_T16TGK_20180612T200930.SAFE_gs.json -> /archive/sentinel2/tiles/16TGK/2018163/S2A_MSIL1C_20180612T162901_N0206_R083_T16TGK_20180612T200930.SAFE_gs.json
1 files (1 links) from /archive/sentinel2/stage/S2A_MSIL1C_20180612T162901_N0206_R083_T16TGK_20180612T200930.SAFE_gs.json added to archive in 0:00:00.000475
Processing [ref] on 1 dates (5 files)
0:00:00.000018:  Starting processing for this temporal-spatial unit
0:00:00.000165:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:19.612940:  Finished VRT for ref-toa image
0:01:19.613082:  Starting reversion to TOA radiance.
0:01:24.484834:  TOA radiance reversion factor for BLUE (band 1): 0.567658150808
0:01:24.484946:  TOA radiance reversion factor for GREEN (band 2): 0.528124960137
0:01:24.485003:  TOA radiance reversion factor for RED (band 3): 0.437987663294
0:01:24.485079:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.412665333806
0:01:24.485140:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.372972828548
0:01:24.485211:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.336611446477
0:01:24.485269:  TOA radiance reversion factor for NIR (band 7): 0.301721551868
0:01:24.485319:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.276720748183
0:01:24.485369:  TOA radiance reversion factor for SWIR1 (band 9): 0.0711383081547
0:01:24.485426:  TOA radiance reversion factor for SWIR2 (band 10): 0.0246937610252
0:01:24.485501:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
MOD08_D3.A2018163.061.2018166192543.hdf -> /archive/aod/tiles/2018/163/MOD08_D3.A2018163.061.2018166192543.hdf
1 files (1 links) from /archive/aod/stage added to archive in 0:00:00.000873
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (95,48)-(97,50) in 0.00221333 seconds
lta[]: read (95,48)-(97,50) in 3.6821e-05 seconds
lta[]: read (95,48)-(97,50) in 2.63e-06 seconds
AOD: LTA-Daily = 0.099034, 0.0891021
AOD: Source = Weighted estimate using MODIS LTA values Value = 0.0990339864356
  Band        T      Lu      Ld
  BLUE:    0.993   24.57  219.70
 GREEN:    0.966   13.54  211.53
   RED:    0.977    6.65  189.31
REDEDGE1:    0.965    5.10  173.43
REDEDGE2:    0.963    4.06  161.95
REDEDGE3:    0.991    3.23  157.78
   NIR:    0.945    2.23  129.64
REDEDGE4:    0.999    1.99  133.19
 SWIR1:    0.978    0.09   33.06
 SWIR2:    0.945    0.01   10.62
Ran atmospheric model in 0:00:13.830443
0:01:38.540862:  Starting on standard product processing
0:01:38.541217:  Starting ref processing
17TKE_2018163_ref-toa[BLUE]: Processing in 2 chunks
17TKE_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 17.5637 seconds
17TKE_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
17TKE_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 7.94395 seconds
17TKE_2018163_ref-toa[GREEN]: Processing in 2 chunks
17TKE_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 17.0675 seconds
17TKE_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
ERROR 1: Stream too short

ERROR 1: opj_get_decoded_tile() failed
ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (528) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (528) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (609) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (609) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-1883546344) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-1883546344) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-2) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-2) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (619563265) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (619563265) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (9453536) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (9453536) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (23) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (23) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-1883546312) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17TKE_20180612T162901_B03.jp2, band 1: Illegal nBlockXOff value (-1883546312) in GDALRasterBand::GetLockedBlockRef()

runtime error
Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T17TKE_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

0:02:30.744725:  Finished ref processing
0:02:30.744790:  Completed standard product processing
0:02:30.744912:  Processing complete for this spatial-temporal unit
0:00:00.000031:  Starting processing for this temporal-spatial unit
0:00:00.000184:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:21.115332:  Finished VRT for ref-toa image
0:01:21.115484:  Starting reversion to TOA radiance.
0:01:26.457095:  TOA radiance reversion factor for BLUE (band 1): 0.570374984025
0:01:26.457226:  TOA radiance reversion factor for GREEN (band 2): 0.530652586019
0:01:26.457269:  TOA radiance reversion factor for RED (band 3): 0.44008388869
0:01:26.457302:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.414640365583
0:01:26.457333:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.374757890505
0:01:26.457359:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.338222481495
0:01:26.457383:  TOA radiance reversion factor for NIR (band 7): 0.30316560254
0:01:26.457406:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.278045144071
0:01:26.457429:  TOA radiance reversion factor for SWIR1 (band 9): 0.0714787787677
0:01:26.457451:  TOA radiance reversion factor for SWIR2 (band 10): 0.0248119462924
0:01:26.457489:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
No files found; nothing to archive.
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (95,49)-(97,51) in 0.00197136 seconds
lta[]: read (95,49)-(97,51) in 3.9347e-05 seconds
lta[]: read (95,49)-(97,51) in 2.348e-06 seconds
AOD: LTA-Daily = 0.0908945, 0.070848
AOD: Source = Weighted estimate using MODIS LTA values Value = 0.0908945228255
  Band        T      Lu      Ld
  BLUE:    0.993   24.43  229.55
 GREEN:    0.966   13.40  220.93
   RED:    0.977    6.51  197.12
REDEDGE1:    0.965    4.99  180.48
REDEDGE2:    0.963    3.96  168.41
REDEDGE3:    0.991    3.14  163.78
   NIR:    0.945    2.16  134.66
REDEDGE4:    0.999    1.92  138.10
 SWIR1:    0.978    0.08   34.21
 SWIR2:    0.945    0.01   11.01
Ran atmospheric model in 0:00:11.905532
0:01:38.580187:  Starting on standard product processing
0:01:38.580387:  Starting ref processing
17SKD_2018163_ref-toa[BLUE]: Processing in 2 chunks
17SKD_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 16.9903 seconds
17SKD_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 7.09596 seconds
17SKD_2018163_ref-toa[GREEN]: Processing in 2 chunks
17SKD_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 13.985 seconds
17SKD_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[GREEN]: read (0,3055)-(5489,5489) in 7.45195 seconds
17SKD_2018163_ref-toa[RED]: Processing in 2 chunks
17SKD_2018163_ref-toa[RED]: read (0,0)-(5489,3054) in 14.8475 seconds
17SKD_2018163_S2A_ref[RED]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[RED]: read (0,3055)-(5489,5489) in 7.34943 seconds
17SKD_2018163_ref-toa[REDEDGE1]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE1]: read (0,0)-(5489,3054) in 13.9878 seconds
17SKD_2018163_S2A_ref[REDEDGE1]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE1]: read (0,3055)-(5489,5489) in 1.6972 seconds
17SKD_2018163_ref-toa[REDEDGE2]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE2]: read (0,0)-(5489,3054) in 13.5075 seconds
17SKD_2018163_S2A_ref[REDEDGE2]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE2]: read (0,3055)-(5489,5489) in 7.06243 seconds
17SKD_2018163_ref-toa[REDEDGE3]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE3]: read (0,0)-(5489,3054) in 13.6912 seconds
17SKD_2018163_S2A_ref[REDEDGE3]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE3]: read (0,3055)-(5489,5489) in 1.6425 seconds
17SKD_2018163_ref-toa[NIR]: Processing in 2 chunks
17SKD_2018163_ref-toa[NIR]: read (0,0)-(5489,3054) in 14.5535 seconds
17SKD_2018163_S2A_ref[NIR]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[NIR]: read (0,3055)-(5489,5489) in 11.3578 seconds
17SKD_2018163_ref-toa[REDEDGE4]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE4]: read (0,0)-(5489,3054) in 9.00181 seconds
17SKD_2018163_S2A_ref[REDEDGE4]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE4]: read (0,3055)-(5489,5489) in 7.01442 seconds
17SKD_2018163_ref-toa[SWIR1]: Processing in 2 chunks
17SKD_2018163_ref-toa[SWIR1]: read (0,0)-(5489,3054) in 8.62198 seconds
17SKD_2018163_S2A_ref[SWIR1]: Writing (0.0001x + 0)
ERROR 1: Stream too short

ERROR 1: opj_get_decoded_tile() failed
ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (3360) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (3360) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (336) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (336) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (353) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (353) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (19) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (19) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T17SKD_20180612T162901_B11.jp2, band 1: Illegal nBlockXOff value (-1) in GDALRasterBand::GetLockedBlockRef()

runtime error
Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T17SKD_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

0:04:35.638276:  Finished ref processing
0:04:35.638335:  Completed standard product processing
0:04:35.638442:  Processing complete for this spatial-temporal unit
0:00:00.000063:  Starting processing for this temporal-spatial unit
0:00:00.000215:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:36.691746:  Finished VRT for ref-toa image
0:01:36.691926:  Starting reversion to TOA radiance.
0:01:42.454061:  TOA radiance reversion factor for BLUE (band 1): 0.56744190953
0:01:42.454225:  TOA radiance reversion factor for GREEN (band 2): 0.527923778464
0:01:42.454276:  TOA radiance reversion factor for RED (band 3): 0.43782081814
0:01:42.454319:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.412508134832
0:01:42.454355:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.372830749867
0:01:42.454387:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.336483219147
0:01:42.454427:  TOA radiance reversion factor for NIR (band 7): 0.301606615345
0:01:42.454453:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.27661533536
0:01:42.454479:  TOA radiance reversion factor for SWIR1 (band 9): 0.0711112090307
0:01:42.454520:  TOA radiance reversion factor for SWIR2 (band 10): 0.0246843542891
0:01:42.454574:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
No files found; nothing to archive.
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (94,48)-(96,50) in 0.00202222 seconds
lta[]: read (94,48)-(96,50) in 4.5512e-05 seconds
lta[]: read (94,48)-(96,50) in 2.543e-06 seconds
AOD: LTA-Daily = 0.105261, 0.114586
AOD: Source = Weighted estimate using MODIS LTA values Value = 0.105261108283
  Band        T      Lu      Ld
  BLUE:    0.993   24.80  218.55
 GREEN:    0.967   13.71  210.49
   RED:    0.977    6.77  188.48
REDEDGE1:    0.965    5.20  172.75
REDEDGE2:    0.963    4.14  161.36
REDEDGE3:    0.991    3.31  157.24
   NIR:    0.945    2.29  129.21
REDEDGE4:    0.999    2.04  132.77
 SWIR1:    0.978    0.09   32.99
 SWIR2:    0.945    0.01   10.60
Ran atmospheric model in 0:00:12.145279
0:01:54.820266:  Starting on standard product processing
0:01:54.820457:  Starting ref processing
16TGK_2018163_ref-toa[BLUE]: Processing in 2 chunks
16TGK_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 19.2815 seconds
16TGK_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 8.70154 seconds
16TGK_2018163_ref-toa[GREEN]: Processing in 2 chunks
16TGK_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 17.47 seconds
16TGK_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[GREEN]: read (0,3055)-(5489,5489) in 8.97621 seconds
16TGK_2018163_ref-toa[RED]: Processing in 2 chunks
16TGK_2018163_ref-toa[RED]: read (0,0)-(5489,3054) in 16.6735 seconds
16TGK_2018163_S2A_ref[RED]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[RED]: read (0,3055)-(5489,5489) in 8.36411 seconds
16TGK_2018163_ref-toa[REDEDGE1]: Processing in 2 chunks
16TGK_2018163_ref-toa[REDEDGE1]: read (0,0)-(5489,3054) in 12.4731 seconds
16TGK_2018163_S2A_ref[REDEDGE1]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[REDEDGE1]: read (0,3055)-(5489,5489) in 4.85429 seconds
16TGK_2018163_ref-toa[REDEDGE2]: Processing in 2 chunks
16TGK_2018163_ref-toa[REDEDGE2]: read (0,0)-(5489,3054) in 12.5341 seconds
16TGK_2018163_S2A_ref[REDEDGE2]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[REDEDGE2]: read (0,3055)-(5489,5489) in 4.94637 seconds
16TGK_2018163_ref-toa[REDEDGE3]: Processing in 2 chunks
16TGK_2018163_ref-toa[REDEDGE3]: read (0,0)-(5489,3054) in 12.5244 seconds
16TGK_2018163_S2A_ref[REDEDGE3]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[REDEDGE3]: read (0,3055)-(5489,5489) in 9.77923 seconds
16TGK_2018163_ref-toa[NIR]: Processing in 2 chunks
16TGK_2018163_ref-toa[NIR]: read (0,0)-(5489,3054) in 17.1248 seconds
16TGK_2018163_S2A_ref[NIR]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[NIR]: read (0,3055)-(5489,5489) in 8.45636 seconds
16TGK_2018163_ref-toa[REDEDGE4]: Processing in 2 chunks
16TGK_2018163_ref-toa[REDEDGE4]: read (0,0)-(5489,3054) in 12.5582 seconds
16TGK_2018163_S2A_ref[REDEDGE4]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[REDEDGE4]: read (0,3055)-(5489,5489) in 7.61957 seconds
16TGK_2018163_ref-toa[SWIR1]: Processing in 2 chunks
16TGK_2018163_ref-toa[SWIR1]: read (0,0)-(5489,3054) in 14.6244 seconds
16TGK_2018163_S2A_ref[SWIR1]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[SWIR1]: read (0,3055)-(5489,5489) in 4.85448 seconds
16TGK_2018163_ref-toa[SWIR2]: Processing in 2 chunks
16TGK_2018163_ref-toa[SWIR2]: read (0,0)-(5489,3054) in 12.6526 seconds
16TGK_2018163_S2A_ref[SWIR2]: Writing (0.0001x + 0)
16TGK_2018163_ref-toa[SWIR2]: read (0,3055)-(5489,5489) in 4.8615 seconds
0:05:42.423346:  Finished ref processing
0:05:42.584908:  Completed standard product processing
0:05:42.597463:  Processing complete for this spatial-temporal unit
0:00:00.000022:  Starting processing for this temporal-spatial unit
0:00:00.000155:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:25.313579:  Finished VRT for ref-toa image
0:01:25.313722:  Starting reversion to TOA radiance.
0:01:31.096242:  TOA radiance reversion factor for BLUE (band 1): 0.570026932691
0:01:31.096380:  TOA radiance reversion factor for GREEN (band 2): 0.530328773886
0:01:31.096418:  TOA radiance reversion factor for RED (band 3): 0.439815342929
0:01:31.096457:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.41438734584
0:01:31.096492:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.374529207643
0:01:31.096524:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.338016093086
0:01:31.096559:  TOA radiance reversion factor for NIR (band 7): 0.302980606362
0:01:31.096592:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.277875476772
0:01:31.096625:  TOA radiance reversion factor for SWIR1 (band 9): 0.0714351613494
0:01:31.096673:  TOA radiance reversion factor for SWIR2 (band 10): 0.0247968056722
0:01:31.096722:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
No files found; nothing to archive.
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (94,49)-(96,51) in 0.00195803 seconds
lta[]: read (94,49)-(96,51) in 4.3725e-05 seconds
lta[]: read (94,49)-(96,51) in 2.642e-06 seconds
AOD: LTA-Daily = 0.0881588, 0.0615685
AOD: Source = Weighted estimate using MODIS LTA values Value = 0.0881588170499
  Band        T      Lu      Ld
  BLUE:    0.993   24.39  229.60
 GREEN:    0.966   13.34  220.95
   RED:    0.977    6.46  197.12
REDEDGE1:    0.965    4.94  180.44
REDEDGE2:    0.963    3.91  168.35
REDEDGE3:    0.991    3.10  163.73
   NIR:    0.945    2.13  134.60
REDEDGE4:    0.999    1.89  138.04
 SWIR1:    0.978    0.08   34.18
 SWIR2:    0.945    0.01   11.00
Ran atmospheric model in 0:00:12.037521
0:01:43.354320:  Starting on standard product processing
0:01:43.354540:  Starting ref processing
16SGJ_2018163_ref-toa[BLUE]: Processing in 2 chunks
16SGJ_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 16.5029 seconds
16SGJ_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
16SGJ_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 6.97222 seconds
16SGJ_2018163_ref-toa[GREEN]: Processing in 2 chunks
16SGJ_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 16.0061 seconds
16SGJ_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
16SGJ_2018163_ref-toa[GREEN]: read (0,3055)-(5489,5489) in 6.87329 seconds
16SGJ_2018163_ref-toa[RED]: Processing in 2 chunks
16SGJ_2018163_ref-toa[RED]: read (0,0)-(5489,3054) in 15.2636 seconds
16SGJ_2018163_S2A_ref[RED]: Writing (0.0001x + 0)
16SGJ_2018163_ref-toa[RED]: read (0,3055)-(5489,5489) in 6.96763 seconds
16SGJ_2018163_ref-toa[REDEDGE1]: Processing in 2 chunks
ERROR 1: Stream too short

ERROR 1: opj_get_decoded_tile() failed
ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1952542835) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1952542835) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (796157294) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (796157294) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1886680168) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1886680168) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1835362403) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1835362403) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1735288176) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1735288176) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1731163237) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1731163237) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (825110830) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (825110830) in GDALRasterBand::GetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1701603686) in GDALRasterBand::TryGetLockedBlockRef()

ERROR 5: T16SGJ_20180612T162901_B05.jp2, band 1: Illegal nBlockXOff value (1701603686) in GDALRasterBand::GetLockedBlockRef()

runtime error
Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T16SGJ_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

0:03:02.268825:  Finished ref processing
0:03:02.268906:  Completed standard product processing
0:03:02.269040:  Processing complete for this spatial-temporal unit
0:00:00.000027:  Starting processing for this temporal-spatial unit
0:00:00.000173:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:19.080243:  Finished VRT for ref-toa image
0:01:19.080401:  Starting reversion to TOA radiance.
0:01:24.717720:  TOA radiance reversion factor for BLUE (band 1): 0.572477105036
0:01:24.717859:  TOA radiance reversion factor for GREEN (band 2): 0.532608309853
0:01:24.717909:  TOA radiance reversion factor for RED (band 3): 0.441705820954
0:01:24.717969:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.416168525564
0:01:24.717995:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.376139063343
0:01:24.718025:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.339469002827
0:01:24.718059:  TOA radiance reversion factor for NIR (band 7): 0.304282921498
0:01:24.718093:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.279069881403
0:01:24.718149:  TOA radiance reversion factor for SWIR1 (band 9): 0.071742214309
0:01:24.718204:  TOA radiance reversion factor for SWIR2 (band 10): 0.0249033908948
0:01:24.718275:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
No files found; nothing to archive.
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (94,50)-(96,52) in 0.00188528 seconds
AOD: Source = MODIS (MOD08_D3) spatial average Value = 0.221
  Band        T      Lu      Ld
  BLUE:    0.993   29.34  218.68
 GREEN:    0.966   17.27  211.82
   RED:    0.977    9.28  190.35
REDEDGE1:    0.965    7.28  175.84
REDEDGE2:    0.963    5.93  165.00
REDEDGE3:    0.991    4.92  160.65
   NIR:    0.945    3.45  132.61
REDEDGE4:    0.999    3.20  135.97
 SWIR1:    0.978    0.17   34.39
 SWIR2:    0.945    0.03   11.09
Ran atmospheric model in 0:00:12.392111
0:01:37.333456:  Starting on standard product processing
0:01:37.333612:  Starting ref processing
16SGH_2018163_ref-toa[BLUE]: Processing in 2 chunks
16SGH_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 11.0071 seconds
16SGH_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 6.99664 seconds
16SGH_2018163_ref-toa[GREEN]: Processing in 2 chunks
16SGH_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 13.6046 seconds
16SGH_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[GREEN]: read (0,3055)-(5489,5489) in 6.83316 seconds
16SGH_2018163_ref-toa[RED]: Processing in 2 chunks
16SGH_2018163_ref-toa[RED]: read (0,0)-(5489,3054) in 9.31129 seconds
16SGH_2018163_S2A_ref[RED]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[RED]: read (0,3055)-(5489,5489) in 6.92235 seconds
16SGH_2018163_ref-toa[REDEDGE1]: Processing in 2 chunks
16SGH_2018163_ref-toa[REDEDGE1]: read (0,0)-(5489,3054) in 13.3451 seconds
16SGH_2018163_S2A_ref[REDEDGE1]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[REDEDGE1]: read (0,3055)-(5489,5489) in 6.99103 seconds
16SGH_2018163_ref-toa[REDEDGE2]: Processing in 2 chunks
16SGH_2018163_ref-toa[REDEDGE2]: read (0,0)-(5489,3054) in 8.5337 seconds
16SGH_2018163_S2A_ref[REDEDGE2]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[REDEDGE2]: read (0,3055)-(5489,5489) in 6.90269 seconds
16SGH_2018163_ref-toa[REDEDGE3]: Processing in 2 chunks
16SGH_2018163_ref-toa[REDEDGE3]: read (0,0)-(5489,3054) in 14.024 seconds
16SGH_2018163_S2A_ref[REDEDGE3]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[REDEDGE3]: read (0,3055)-(5489,5489) in 6.99827 seconds
16SGH_2018163_ref-toa[NIR]: Processing in 2 chunks
16SGH_2018163_ref-toa[NIR]: read (0,0)-(5489,3054) in 9.38962 seconds
16SGH_2018163_S2A_ref[NIR]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[NIR]: read (0,3055)-(5489,5489) in 7.30166 seconds
16SGH_2018163_ref-toa[REDEDGE4]: Processing in 2 chunks
16SGH_2018163_ref-toa[REDEDGE4]: read (0,0)-(5489,3054) in 13.157 seconds
16SGH_2018163_S2A_ref[REDEDGE4]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[REDEDGE4]: read (0,3055)-(5489,5489) in 1.75361 seconds
16SGH_2018163_ref-toa[SWIR1]: Processing in 2 chunks
16SGH_2018163_ref-toa[SWIR1]: read (0,0)-(5489,3054) in 13.9876 seconds
16SGH_2018163_S2A_ref[SWIR1]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[SWIR1]: read (0,3055)-(5489,5489) in 2.01798 seconds
16SGH_2018163_ref-toa[SWIR2]: Processing in 2 chunks
16SGH_2018163_ref-toa[SWIR2]: read (0,0)-(5489,3054) in 8.60479 seconds
16SGH_2018163_S2A_ref[SWIR2]: Writing (0.0001x + 0)
16SGH_2018163_ref-toa[SWIR2]: read (0,3055)-(5489,5489) in 7.13142 seconds
0:04:38.783037:  Finished ref processing
0:04:38.865613:  Completed standard product processing
0:04:38.878840:  Processing complete for this spatial-temporal unit
Processing completed in 0:20:30.639838
Creating mosaic project /mnt/storage/tmp/471
  Dates: 1 dates (2018-06-12 - 2018-06-12)
  Products: ref
Error mosaicking /mnt/storage/tmp/471/2018163_S2A_ref.tif. Did you forget to specify a resolution (`--res x x`)?:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/tiles.py", line 100, in mosaic
    filenames = [self.tiles[t].filenames[(sensor, product)] for t in self.tiles]
KeyError: ('S2A', 'ref')

2018-06-12: created project files for 5 tiles in 0:00:00.000548
Completed mosaic project in 0:00:00.000686
No matching files in inventory
Fatal: 4 error(s) occurred:
Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T17TKE_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T17SKD_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

Error creating product ref for S2A_MSIL1C_20180612T162901_N0206_R083_T16SGJ_20180612T200930.SAFE_gs.json:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/data/sentinel2/sentinel2.py", line 1462, in process
    source_image[i].Process(output_image[i])
  File "/usr/local/lib/python2.7/dist-packages/gippy/algorithms.py", line 3870, in Process
    return _algorithms.GeoRaster_Process(self, *args)
RuntimeError: error reading

Error mosaicking /mnt/storage/tmp/471/2018163_S2A_ref.tif. Did you forget to specify a resolution (`--res x x`)?:
Traceback (most recent call last):
  File "/gips/gips/utils.py", line 586, in cli_error_handler
    yield
  File "/gips/gips/tiles.py", line 100, in mosaic
    filenames = [self.tiles[t].filenames[(sensor, product)] for t in self.tiles]
KeyError: ('S2A', 'ref')
sullamenashe commented 6 years ago

Another thing to note is that if I run the exact same command on the exact same node that gave me an error but with fetching from the default source (ESA), the fetch runs all the way through without an error.

ircwaves commented 6 years ago

I've not been able to duplicate this error locally. I will check on an instance.

bhbraswell commented 6 years ago

We suspect, but aren't sure yet, that this apparent error may be due to there being no valid pixels in the requested domain (an ARD tile).

image 2

When run locally, the export runs to completion but the files contain all zeros as you would expect (if you knew that the requested are contained no data).

ircwaves commented 6 years ago

I doubt that it is related to valid pix. All of the work prior to mosaicking is done on the source tiles, and hence has no relation to the geometry of the request. Here is the test I ran locally. I only added --%tile to save processing many scenes since the fundamental error that set off the harmonics of errors was in producing the ref product for a scene:

 (venv) icooke@rio:~/src/gips$ gips_export sentinel2 --fetch  --%tile 50 -d 2018-06-12 -s /titan/data/vector/ARD/conus_ard_grid.shp -w "h=24 and v=9" -v4 --outdir /tmp --notld --res 30 30 -p ref
GIPS Data Export (v0.12.0-dev)
Retrieving inventory for site conus_ard_grid-471 for date range 2018-06-12 - 2018-06-12 (days 1-366)
Processing [ref] on 1 dates (1 files)
0:00:00.000027:  Starting processing for this temporal-spatial unit
0:00:00.000239:  Start VRT for ref-toa image
0...10...20...30...40...50...60...70...80...90...100 - done.
0:01:27.635320:  Finished VRT for ref-toa image
0:01:27.635526:  Starting reversion to TOA radiance.
0:01:34.222814:  TOA radiance reversion factor for BLUE (band 1): 0.570374984025
0:01:34.222993:  TOA radiance reversion factor for GREEN (band 2): 0.530652586019
0:01:34.223046:  TOA radiance reversion factor for RED (band 3): 0.44008388869
0:01:34.223097:  TOA radiance reversion factor for REDEDGE1 (band 4): 0.414640365583
0:01:34.223136:  TOA radiance reversion factor for REDEDGE2 (band 5): 0.374757890505
0:01:34.223185:  TOA radiance reversion factor for REDEDGE3 (band 6): 0.338222481495
0:01:34.223232:  TOA radiance reversion factor for NIR (band 7): 0.30316560254
0:01:34.223268:  TOA radiance reversion factor for REDEDGE4 (band 8): 0.278045144071
0:01:34.223314:  TOA radiance reversion factor for SWIR1 (band 9): 0.0714787787677
0:01:34.223360:  TOA radiance reversion factor for SWIR2 (band 10): 0.0248119462924
0:01:34.223432:  Computing atmospheric corrections for surface reflectance
Generating atmospheric correction object.
Running atmospheric model (6S)
Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
MOD08_D3.A2018163.061.2018166192543.hdf -> /data2/aod6/tiles/2018/163/MOD08_D3.A2018163.061.2018166192543.hdf
1 files (1 links) from /data2/aod6/stage added to archive in 0:00:00.011310
MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean]: read (95,49)-(97,51) in 0.00380235 seconds
lta[]: read (95,49)-(97,51) in 0.000122812 seconds
lta[]: read (95,49)-(97,51) in 4.049e-06 seconds
AOD: LTA-Daily = 0.0908945, 0.070848
AOD: Source = Weighted estimate using MODIS LTA values Value = 0.0908945228255
  Band        T      Lu      Ld
  BLUE:    0.993   35.15  506.84
 GREEN:    0.966   18.88  486.03
   RED:    0.977    8.57  415.94
REDEDGE1:    0.965    6.44  381.53
REDEDGE2:    0.963    5.03  354.37
REDEDGE3:    0.991    3.88  334.83
   NIR:    0.945    2.68  280.63
REDEDGE4:    0.999    2.31  278.23
 SWIR1:    0.978    0.11   68.68
 SWIR2:    0.945    0.01   22.62
Ran atmospheric model in 0:00:21.875784
0:01:56.388670:  Starting on standard product processing
0:01:56.389002:  Starting ref processing
17SKD_2018163_ref-toa[BLUE]: Processing in 2 chunks
17SKD_2018163_ref-toa[BLUE]: read (0,0)-(5489,3054) in 26.2489 seconds
17SKD_2018163_S2A_ref[BLUE]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[BLUE]: read (0,3055)-(5489,5489) in 16.877 seconds
17SKD_2018163_ref-toa[GREEN]: Processing in 2 chunks
17SKD_2018163_ref-toa[GREEN]: read (0,0)-(5489,3054) in 23.824 seconds
17SKD_2018163_S2A_ref[GREEN]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[GREEN]: read (0,3055)-(5489,5489) in 16.6263 seconds
17SKD_2018163_ref-toa[RED]: Processing in 2 chunks
17SKD_2018163_ref-toa[RED]: read (0,0)-(5489,3054) in 26.3742 seconds
17SKD_2018163_S2A_ref[RED]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[RED]: read (0,3055)-(5489,5489) in 16.7657 seconds
17SKD_2018163_ref-toa[REDEDGE1]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE1]: read (0,0)-(5489,3054) in 11.683 seconds
17SKD_2018163_S2A_ref[REDEDGE1]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE1]: read (0,3055)-(5489,5489) in 5.17684 seconds
17SKD_2018163_ref-toa[REDEDGE2]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE2]: read (0,0)-(5489,3054) in 13.0566 seconds
17SKD_2018163_S2A_ref[REDEDGE2]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE2]: read (0,3055)-(5489,5489) in 5.03282 seconds
17SKD_2018163_ref-toa[REDEDGE3]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE3]: read (0,0)-(5489,3054) in 12.0621 seconds
17SKD_2018163_S2A_ref[REDEDGE3]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE3]: read (0,3055)-(5489,5489) in 5.38139 seconds
17SKD_2018163_ref-toa[NIR]: Processing in 2 chunks
17SKD_2018163_ref-toa[NIR]: read (0,0)-(5489,3054) in 25.435 seconds
17SKD_2018163_S2A_ref[NIR]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[NIR]: read (0,3055)-(5489,5489) in 16.651 seconds
17SKD_2018163_ref-toa[REDEDGE4]: Processing in 2 chunks
17SKD_2018163_ref-toa[REDEDGE4]: read (0,0)-(5489,3054) in 12.1904 seconds
17SKD_2018163_S2A_ref[REDEDGE4]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[REDEDGE4]: read (0,3055)-(5489,5489) in 5.03619 seconds
17SKD_2018163_ref-toa[SWIR1]: Processing in 2 chunks
17SKD_2018163_ref-toa[SWIR1]: read (0,0)-(5489,3054) in 12.2587 seconds
17SKD_2018163_S2A_ref[SWIR1]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[SWIR1]: read (0,3055)-(5489,5489) in 4.40203 seconds
17SKD_2018163_ref-toa[SWIR2]: Processing in 2 chunks
17SKD_2018163_ref-toa[SWIR2]: read (0,0)-(5489,3054) in 12.2233 seconds
17SKD_2018163_S2A_ref[SWIR2]: Writing (0.0001x + 0)
17SKD_2018163_ref-toa[SWIR2]: read (0,3055)-(5489,5489) in 4.38355 seconds
0:06:34.783671:  Finished ref processing
0:06:35.155304:  Completed standard product processing
0:06:35.252181:  Processing complete for this spatial-temporal unit
Processing completed in 0:06:35.259536
Creating mosaic project /tmp/471
  Dates: 1 dates (2018-06-12 - 2018-06-12)
  Products: ref
GIPPY: CookieCutter (1 files) - /tmp/471/mosaicfZCfyX/2018163_S2A_ref.tif
17SKD_2018163_S2A_ref warping into 2018163_S2A_ref 0...10...20...30...40...50...60...70...80...90...100 - done.
2018-06-12: created project files for 1 tiles in 0:00:12.411108
Completed mosaic project in 0:00:12.669752
/tmp/471/2018163_S2A_ref.tif
/tmp/471/2018163_S2A_ndti-toa.tif
    DATE     Coverage  Product  
2018        
    163     ndti-toa  ref  
sullamenashe commented 6 years ago

An update from me is that I got the command to work fine with a tile with valid data in it. For example this case works: gips_export sentinel2 -p ref -d 2018-06-12 -s /archive/vector/conus_ard_grid.shp -w "h=14 and v=10" -v4 --outdir /mnt/storage/tmp --notld --res 30 30 --fetch So this seems to confirm that the first tile I tested on was problematic.

ircwaves commented 6 years ago

Actually, I was able to reproduce your error on AWS in a fresh setup that didn't have the ancillary AOD-composites files in place. And that's the only way that this error would get noisy enough to be caught. Here's what the error looks like in the case where you have emplaced the composites in their home:

     [clip]
    Running atmospheric model (6S)
    Retrieving inventory for site tiles for date range 2018-06-12 - 2018-06-12 (days 1-366)
    No files found; nothing to archive.
--> Unrecognizable file: HDF4_EOS:EOS_GRID:"/archive/aod/tiles/2018/163/MOD08_D3.A2018163.061.2018166192543.hdf":mod08:Aerosol_Optical_Depth_Land_Ocean_Mean
    MOD08_D3.A2018163.061.2018166192543[Aerosol Optical Thickness at 0.55 microns for both Ocean     (best) and Land (corrected): Mean]: read (94,48)-(96,50) in 0.00182403 seconds
    lta[]: read (94,48)-(96,50) in 2.9126e-05 seconds
    lta[]: read (94,48)-(96,50) in 2.829e-06 seconds
    AOD: LTA-Daily = 0.105261, 0.114586
    AOD: Source = Weighted estimate using MODIS LTA values Value = 0.105261108283
    [clip]

This behavior has been historically desirable, But may be different for NRT processing.

I think the long(er) term fix is to look at other AOD sources that have lower latency, or to use LTA(D) values, and have a reproc job that comes through and reprocesses data as "real" AOD estimates become available.

ircwaves commented 6 years ago

Oh, and I just reproduced the stream to short error. I'd suggest trying to run with the following change. I flushed my instance's archive, applied the change, and re-ran w/o issue. Hopefully it is just an intermittent issue when using the /vsicurl_streaming access. If this does eliminate that error, then I would attribute it to GIPS not really operating in a "streaming" mode. I was going to change that line anyway, for that reason.

diff --git a/gips/data/core.py b/gips/data/core.py
index b2fdbaa..5b8884e 100644
--- a/gips/data/core.py
+++ b/gips/data/core.py
@@ -85,7 +85,7 @@ class GoogleStorageMixin(object):
         return cls._gs_object_url_base.format(cls.gs_bucket_name)

     @classmethod
-    def gs_vsi_prefix(cls, streaming=True):
+    def gs_vsi_prefix(cls, streaming=False):
         """Generate the first part of a VSI path for gdal."""
         vsi_magic_string = '/vsicurl_streaming/' if streaming else '/vsicurl/'
         return vsi_magic_string + cls.gs_object_url_base()

Then (of course) I run into error writing dirty block AKA disk full because ref images are huge.

sullamenashe commented 6 years ago

Good news - I have implemented this fix in my forked version of GIPS and it seemed to have fixed my problem. I am going to close the issue.

bhbraswell commented 6 years ago

I think the long(er) term fix is to look at other AOD sources that have lower latency, or to use LTA(D) values, and have a reproc job that comes through and reprocesses data as "real" AOD estimates become available.

Is there currently a gips way to update the LTA composites? I see in the aod driver an exception with "Composite processing is currently broken')".

I've never actually run this so I am not sure how it is invoked.

ircwaves commented 6 years ago

The composites appear to have been made once (or twice), and then never updated. Then when I found this, I went to update the code to match the architectural changes in GIPS, and ran out of time. Definitely would be worth updating.