<div dir="ltr"><div><div><br><br>On Thu, Dec 21, 2017 at 8:18 AM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>><br>> Thanks Markus,<br>><br>> As a next try I updated my gcc and g++ to 5.4.1 (on Ubuntu 14.04) and I applied your compiler flags, Markus.<br>> Unfortunately, I still get only NULL cells in i.atcorr output…<br>><br>> Will try to test more recent OS (Ubuntu 16) and maybe get a Fedora live system…<br><br></div>i.atcorr should produce identical results on all supported systems. These differences are a mystery to me. For a start, compiler warnings could be solved and the valgrind warnings need to be checked.<br><br></div>Markus M<br><div><div><br>><br>> Cheers<br>> Stefan<br>><br>> From: Markus Metz [mailto:<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>]<br>> Sent: onsdag 20. desember 2017 22.52<br>> To: Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>><br>> Cc: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>>; Sajid Pareeth <<a href="mailto:spareeth@gmail.com">spareeth@gmail.com</a>>; GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>><br>> Adding to the confusion. I used<br>><br>> On Wed, Dec 20, 2017 at 5:41 PM, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a><mailto:<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>>> wrote:<br>> ><br>> > On 19/12/17 15:24, Stefan Blumentrath wrote:<br>> >><br>> >><br>> >> In case someone would be willing to test my data (which I would be very grateful for), you can get it directly here:<br>> >><br>> >> dem: <a href="http://www.filedropper.com/dem_1">http://www.filedropper.com/dem_1</a><br>> >><br>> >> S2 band 8: <a href="http://www.filedropper.com/s2aoperprdmsil1cpdmc20160907t044118r008v20160905t10402220160905t104245b08">http://www.filedropper.com/s2aoperprdmsil1cpdmc20160907t044118r008v20160905t10402220160905t104245b08</a><br>> >><br>> >> 62 params: <a href="http://www.filedropper.com/p6s">http://www.filedropper.com/p6s</a><br>> with latest 7.4 and 7.5, command is<br>><br>> i.atcorr in=b08 range=1,28001 elevation=dem parameters=p6s.txt out=b08_atcorr<br>><br>> and I get reasonable results:<br>><br>> <a href="http://r.info">r.info</a><<a href="http://r.info">http://r.info</a>> -r b08_atcorr_g74<br>> min=0.003231863<br>> max=255<br>><br>> <a href="http://r.info">r.info</a><<a href="http://r.info">http://r.info</a>> -r b08_atcorr_g75<br>> min=0.003231863<br>> max=255<br>> my OS is Fedora 27 with compiler gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)<br>> relevant compiler flags are<br>> -g -Wall -Wextra -Wpedantic -Wshadow -Wno-sign-compare -fno-common -fexceptions -Werror=implicit-function-declaration -Wp,-D_FORTIFY_SOURCE=2 -O3 -fno-fast-math<br>><br>> -fno-fast-math might be important<br>><br>> running i.atcorr through valgrind, I get lots of warnings like<br>><br>> ==14080== Conditional jump or move depends on uninitialised value(s)<br>> ==14080==    at 0x42B18D: os(float, float, float, float, float, float (&) [51][49], Gauss&, Altitude const&, GeomCond const&) (computations.cpp:831)<br>> ==14080==    by 0x42E9E3: atmref(float, float, float, float, float, OpticalAtmosProperties&, Gauss&, GeomCond const&, AerosolModel const&, Altitude const&) (computations.cpp:1408)<br>> ==14080==    by 0x42FCBC: discom(GeomCond const&, AtmosModel const&, AerosolModel const&, AerosolConcentration const&, Altitude const&, IWave const&) (computations.cpp:1654)<br>> ==14080==    by 0x40C032: init_6S(char*) (6s.cpp:100)<br>> ==14080==    by 0x405A3C: main (main.cpp:618)<br>> ...<br>> later on<br>><br>> ==14080== Conditional jump or move depends on uninitialised value(s)<br>> ==14080==    at 0x42DED8: iso(float, float, float, float, float, float (&) [3], Gauss&, Altitude const&) (computations.cpp:1262)<br>> ==14080==    by 0x42F011: scatra(float, float, float, float, float, OpticalAtmosProperties&, Gauss&, GeomCond const&, Altitude const&) (computations.cpp:1578)<br>> ==14080==    by 0x42FD08: discom(GeomCond const&, AtmosModel const&, AerosolModel const&, AerosolConcentration const&, Altitude const&, IWave const&) (computations.cpp:1659)<br>> ==14080==    by 0x406882: pre_compute_h(float) (6s.cpp:148)<br>> ==14080==    by 0x406372: process_raster (main.cpp:369)<br>> ==14080==    by 0x406372: main (main.cpp:632)<br>> ...<br>> IMHO, these valgrind warnings need to be investigated.<br>> Markus M<br>><br>> >><br>> ><br>> > Just a very quick test, in 7.4 RC1, using<br>> ><br>> > i.atcorr in=b08 range=1,28001 elevation=dem parameters=BROL/STEFAN/p6s.txt out=b08_atcorr<br>> ><br>> > gives<br>> ><br>> > <a href="http://r.info">r.info</a><<a href="http://r.info">http://r.info</a>> -r b08_atcorr<br>> > min=-nan<br>> > max=-nan<br>> ><br>> > So I can confirm that there seems to be a problem.<br>> > Don't have much time to do more testing.<br>> ><br>> > A bug report with example data would probably be warranted.<br>> ><br>> > Moritz<br>> ><br>> > _______________________________________________<br>> > grass-user mailing list<br>> > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><mailto:<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div></div>