Re: i.atcorr with Sentinel2

Markus Metz <[email protected]>
Newsgroups gmane.comp.gis.grass.user
Message-ID <CAG+h=FFWQpG=jJwR5NhJuDe6Od5yeBrWWiB4g8P538dZgMoGPw@mail.gmail.com>
Adding to the confusion. I used

On Wed, Dec 20, 2017 at 5:41 PM, Moritz Lennert <
[email protected]> wrote:
>
> On 19/12/17 15:24, Stefan Blumentrath wrote:
>>
>>
>> In case someone would be willing to test my data (which I would be very
grateful for), you can get it directly here:
>>
>> dem: http://www.filedropper.com/dem_1
>>
>> S2 band 8:
http://www.filedropper.com/s2aoperprdmsil1cpdmc20160907t044118r008v20160905t10402220160905t104245b08
>>
>> 62 params: http://www.filedropper.com/p6s

with latest 7.4 and 7.5, command is

i.atcorr in=b08 range=1,28001 elevation=dem parameters=p6s.txt
out=b08_atcorr

and I get reasonable results:

r.info -r b08_atcorr_g74
min=0.003231863
max=255

r.info -r b08_atcorr_g75
min=0.003231863
max=255

my OS is Fedora 27 with compiler gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)

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

running i.atcorr through valgrind, I get lots of warnings like

==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)
...

IMHO, these valgrind warnings need to be investigated.

Markus M

>>
>
> Just a very quick test, in 7.4 RC1, using
>
> i.atcorr in=b08 range=1,28001 elevation=dem
parameters=BROL/STEFAN/p6s.txt out=b08_atcorr
>
> gives
>
> r.info -r b08_atcorr
> min=-nan
> max=-nan
>
> So I can confirm that there seems to be a problem.
> Don't have much time to do more testing.
>
> A bug report with example data would probably be warranted.
>
> Moritz
>
> _______________________________________________
> grass-user mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.