<div dir="ltr"><div>Dear Moritz,</div><div><br></div><div>According to <a href="https://earth.esa.int/web/sentinel/user-guides/sentinel-2-msi/product-types">https://earth.esa.int/web/sentinel/user-guides/sentinel-2-msi/product-types</a> , the L1C product I am using already is in top of atmosphere reflectance, so this should not be the problem (?). </div><div>I tried running i.atcorr both with and without the -r flag.</div><div><br></div><div>Zofie</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 18, 2017 at 3:35 PM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 18/12/17 13:14, Žofie Cimburová wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
Now the 6S parameters are complete, but the output map contains only NULLs, no matter what combinations of input parameters and flags I use. Have anyone encountered the same issue? (Info below.)<br>
</blockquote>
<br></span>
In the i.atcorr man page it says:<br>
<br>
"If flag -r is used, the input raster data are treated as reflectance. Otherwise, the input raster data are treated as radiance values"<br>
<br>
IIUC, your data is still in DN. You might want to try to transform this into radiance values before sending it into i.atcorr.<br>
<br>
Moritz<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
Thanks again.<br>
Zofie<br>
<br>
------------------------------<wbr>----------<br>
Version:<br>
g.version -g<br>
version=7.4.0RC1<br>
date=2017<br>
revision=exported<br>
build_date=2017-11-18<br>
build_platform=x86_64-pc-linux<wbr>-gnu<br>
build_off_t_size=8<br>
<br>
------------------------------<wbr>----------<br>
Region:<br>
g.region -p<br>
projection: 1 (UTM)<br>
zone:       33<br>
datum:      etrs89<br>
ellipsoid:  grs80<br>
north:      6653695<br>
south:      6643685<br>
west:       256495<br>
east:       266505<br>
nsres:      10<br>
ewres:      10<br>
rows:       1001<br>
cols:       1001<br>
cells:      1002001<br>
<br>
------------------------------<wbr>----------<br>
Input data: Sentinel2 L1C product B02 (tried with B01 too)<br>
</div></div><a href="http://r.info" rel="noreferrer" target="_blank">r.info</a> <<a href="http://r.info" rel="noreferrer" target="_blank">http://r.info</a>> map=test_B02@p_Sentinel4Nature<wbr>_S2_Oslo<span class=""><br>
  +---------------------------<wbr>------------------------------<wbr>-------------------+<br>
  | Map:      test_B02@p_Sentinel4Nat  Date: Wed Dec  6 12:06:39 2017<br>
  | Mapset:   p_Sentinel4Nature_S2_Oslo      Login of Creator: stefan.blumentr<br>
  | Location: ETRS_33N<br>
  | DataBase: /data/grass<br>
  | Title:    S2A_OPER_PRD_MSIL1C_PDMC_20160<wbr>907T044118_R008_V20160905T1040<wbr>22_2<br>
  | Timestamp: none<br>
  |---------------------------<wbr>------------------------------<wbr>-------------------|<br>
  |<br>
  |   Type of Map:  raster               Number of Categories: 0<br>
  |   Data Type:    CELL<br>
  |   Rows:         1001<br>
  |   Columns:      1001<br>
  |   Total Cells:  1002001<br>
  |        Projection: UTM (zone 33)<br>
  |            N:    6653695    S:    6643685   Res:    10<br>
  |            E:     266505    W:     256495   Res:    10<br>
  |   Range of data:    min = 1  max = 28000<br>
  |<br>
  |   Data Description:<br>
  |    generated by r.in.gdal<br>
  +---------------------------<wbr>------------------------------<wbr>-------------------+<br>
<br>
------------------------------<wbr>----------<br>
6s file:<br></span>
25- geometrical conditions=Sentinel-2A<br>
9 5 10.6728 10.73413 59.90647- month day hh.ddd longitude latitude<span class=""><br>
4 - atmospheric model=subarctic summer<br>
3- aerosol model=urban<br></span>
50- visibility [km] (aerosol model concentration) (this is estimated, I also tried with AOD specified)<br>
-0.055- mean target elevation above sea level [km]<br>
-1000- sensor height<br>
166- Sentinel2A Blue band B2 (440nm - 535nm)<br>
<br>
------------------------------<wbr>----------<br>
Command:<br>
i.atcorr input=test_B02@p_Sentinel4Natu<wbr>re_S2_Oslo range=1,28000 elevation=dem_10m_25833@p_Sent<wbr>inel4Nature_S2_Oslo parameters=/home/<a href="http://NINA.NO/zofie.cimburova/Sentinel4Nature/DATA/6s.txt" rel="noreferrer" target="_blank">NINA.NO/zofie<wbr>.cimburova/Sentinel4Nature/<wbr>DATA/6s.txt</a> <<a href="http://NINA.NO/zofie.cimburova/Sentinel4Nature/DATA/6s.txt" rel="noreferrer" target="_blank">http://NINA.NO/zofie.cimburov<wbr>a/Sentinel4Nature/DATA/6s.txt</a>> output=test_B02_atcorr<span class=""><br>
 >Atmospheric correction...<br>
 >Atmospheric correction complete.<br>
<br>
(I am not sure about the range parameter, tried with 0,255 too. The DEM contains no NULLs. Also tried running with -r and -a flags.)<br>
<br>
------------------------------<wbr>----------<br>
Output:<br>
</span><a href="http://r.info" rel="noreferrer" target="_blank">r.info</a> <<a href="http://r.info" rel="noreferrer" target="_blank">http://r.info</a>> map=test_B02_atcorr@p_Sentinel<wbr>4Nature_S2_Oslo<span class=""><br>
  +---------------------------<wbr>------------------------------<wbr>-------------------+<br>
  | Map:      test_B02_atcorr@p_Sentinel4N  Date: Mon Dec 18 13:10:14 2017<br>
  | Mapset:   p_Sentinel4Nature_S2_Oslo      Login of Creator: zofie.cimburova<br>
  | Location: ETRS_33N<br>
  | DataBase: /data/grass<br>
  | Title:    test_B02_atcorr2<br>
  | Timestamp: none<br>
  |---------------------------<wbr>------------------------------<wbr>-------------------|<br>
  |<br>
  |   Type of Map:  raster               Number of Categories: 0<br>
  |   Data Type:    FCELL<br>
  |   Rows:         1001<br>
  |   Columns:      1001<br>
  |   Total Cells:  1002001<br>
  |        Projection: UTM (zone 33)<br>
  |            N:    6653695    S:    6643685   Res:    10<br>
  |            E:     266505    W:     256495   Res:    10<br>
  |   Range of data:    min = -nan  max = -nan<br>
  |<br>
  |   Data Description:<br>
  |    generated by i.atcorr<br>
  |<br>
  |   Comments:<br>
  |    i.atcorr input="test_B02@p_Sentinel4Nat<wbr>ure_S2_Oslo" range=1,28\<br>
  |    000 elevation="dem_10m_25833@p_Sen<wbr>tinel4Nature_S2_Oslo" para\<br></span>
  |    meters="/home/<a href="http://NINA.NO/zofie.cimburova/Sentinel4Nature/DATA/6s.txt" rel="noreferrer" target="_blank">NINA.NO/zofie.ci<wbr>mburova/Sentinel4Nature/DATA/<wbr>6s.txt</a> <<a href="http://NINA.NO/zofie.cimburova/Sentinel4Nature/DATA/6s.txt" rel="noreferrer" target="_blank">http://NINA.NO/zofie.cimburov<wbr>a/Sentinel4Nature/DATA/6s.txt</a>><wbr>" o\<br>
  |    utput="test_B02_atcorr2" rescale=0,255<br>
  |<br>
  +---------------------------<wbr>------------------------------<wbr>-------------------+<span class=""><br>
<br>
<br>
<br>
On Fri, Dec 15, 2017 at 5:12 PM, Žofie Cimburová <<a href="mailto:zoficimburova@gmail.com" target="_blank">zoficimburova@gmail.com</a> <mailto:<a href="mailto:zoficimburova@gmail.com" target="_blank">zoficimburova@gmail.co<wbr>m</a>>> wrote:<br>
<br>
    Dear Markus,<br>
    thanks for your reply, this is exactly what I need to know!<br>
<br>
    Best, Zofie<br>
<br>
    On Fri, Dec 15, 2017 at 5:09 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a><br></span><span class="">
    <mailto:<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>>> wrote:<br>
<br>
<br>
        On Dec 15, 2017 3:54 PM, "Žofie Cimburová"<br></span><span class="">
        <<a href="mailto:zoficimburova@gmail.com" target="_blank">zoficimburova@gmail.com</a> <mailto:<a href="mailto:zoficimburova@gmail.com" target="_blank">zoficimburova@gmail.co<wbr>m</a>>> wrote:<br>
        ><br>
        > Dear all,<br>
        > I am trying to use i.atcorr (GRASS 7.4) to apply atmospheric corrections for Sentinel 2 data. The documentation provides a great help, but there are two points I am not sure about -         ><br>
        > - I don't need the atmospheric correction to be applied to the whole scene, so I only imported a small clip of the scene to GRASS. What longitude and latitude shall I then specify in the 6S parameters?<br>
<br>
        I'd use the center coordinates of the clipped area.<br>
<br>
        > Or is it necessary to apply the corrections to the entire scene?<br>
<br>
        No since it is a pixel based algorithm.<br>
<br>
        > - How can I estimate the value of visibility (aerosol model concentration)? <br>
        There are AERONET data online somewhere which might be the best<br>
        choice.<br>
<br>
        Markus<br>
<br>
<br>
<br>
<br>
<br></span><span class="">
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/grass-user</a><br>
<br>
</span></blockquote>
<br>
<br>
</blockquote></div><br></div>