[GRASS-dev] [GRASS GIS] #3469: i.atcorr: Sentinel-2 support broken on some systems
GRASS GIS
trac at osgeo.org
Thu Dec 21 00:57:09 PST 2017
#3469: i.atcorr: Sentinel-2 support broken on some systems
-------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.0
Component: Packaging | Version: unspecified
Keywords: i.atcorr | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
It seems that Sentinel-2 functions in i.atcorr are effectively broken in
some release packages and on some systems.
The following installations have been reported to only return NULL values
in output:
* Ubuntu 16.04 with GRASS 7.4.0RC1 from UbuntuGIS-experimental
* UBUNTU 14.04 with GRASS 7.4.0RC1 self compiled with gcc 5.4.1 (and
older)
* UBUNTU 14.04 with GRASS 7.5 self compiled with gcc 4.8
* Windows 8.1 with GRASS 7.4.0RC1 and 7.5 daily from OSGeo4W
However, the following systems produce reasonable output:
* UBUNTU 16.04.3 LTS with GRASS 7.4 and 7.5 self compiled with gcc 5.4.0
20160609 Ubuntu 5.4.0-6ubuntu1~16.04.5
* Fedora 27 with GRASS 7.4.0RC1 and 7.5 self compiled with gcc 7.2.1
20170915
Test case below, test data attached to the ticket.
{{{
r.in.gdal input=dem.tif output=dem –o -–v --o
r.in.gdal
input=S2A_OPER_PRD_MSIL1C_PDMC_20160907T044118_R008_V20160905T104022_20160905T104245.B08.tif
output=B08 -o -–v --o
g.region -p raster=B08 align=B08
i.atcorr -r input=B08 elevation=dem range=0,10000 output=test_atcorr
rescale=0,10000 parameters=p6s.txt -–v --o
}}}
relevant compiler flags are:
-g -Wall -Wextra -Wpedantic -Wshadow -Wno-sign-compare -fno-common
-fexceptions -Werror=implicit-function-declaration -Wp,-D_FORTIFY_SOURCE=2
-O3 -fno-fast-math
-fno-fast-math might be important
Finally, running i.atcorr through valgrind (on Fedora) gives lots of the
following warnings, that according to MarkusM should be investigated:
{{{
==14080== Conditional jump or move depends on uninitialised value(s)
==14080== at 0x42B18D: os(float, float, float, float, float, float (&)
[51][49], Gauss&, Altitude const&, GeomCond const&) (computations.cpp:831)
==14080== by 0x42E9E3: atmref(float, float, float, float, float,
OpticalAtmosProperties&, Gauss&, GeomCond const&, AerosolModel const&,
Altitude const&) (computations.cpp:1408)
==14080== by 0x42FCBC: discom(GeomCond const&, AtmosModel const&,
AerosolModel const&, AerosolConcentration const&, Altitude const&, IWave
const&) (computations.cpp:1654)
==14080== by 0x40C032: init_6S(char*) (6s.cpp:100)
==14080== by 0x405A3C: main (main.cpp:618)
...
later on
==14080== Conditional jump or move depends on uninitialised value(s)
==14080== at 0x42DED8: iso(float, float, float, float, float, float (&)
[3], Gauss&, Altitude const&) (computations.cpp:1262)
==14080== by 0x42F011: scatra(float, float, float, float, float,
OpticalAtmosProperties&, Gauss&, GeomCond const&, Altitude const&)
(computations.cpp:1578)
==14080== by 0x42FD08: discom(GeomCond const&, AtmosModel const&,
AerosolModel const&, AerosolConcentration const&, Altitude const&, IWave
const&) (computations.cpp:1659)
==14080== by 0x406882: pre_compute_h(float) (6s.cpp:148)
==14080== by 0x406372: process_raster (main.cpp:369)
==14080== by 0x406372: main (main.cpp:632)
...
}}}
For ML discussion see:
https://lists.osgeo.org/pipermail/grass-user/2017-December/077545.html
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3469>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list