[GRASS-user] i.atcorr: Returns empty raster

Hello all,

I am using i.atcorr module of GRASS 7.0.4 release. I compiled the release, as I wanted to add the Sentinel-2 sensor. So far, I was successful in compiling the release. However, when I run atcorr, I get an empty raster file. I have included the reports from r.info, i.atcorr and the parameters below:

r.info output of the image

(Wed Mar 16 16:38:39 2016)
r.info map=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT
±---------------------------------------------------------------------------+
| Map: S2A_OPER_MSI_L1C_TL_EPA__2016 Date: Wed Mar 16 16:29:33 2016 |
| Mapset: PERMANENT Login of Creator: abheeman |
| Location: munich |
| DataBase: /media/abheeman/data/grassdata |
| Title: ( S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02 ) |

Timestamp: none
Type of Map: raster Number of Categories: 0
Data Type: CELL
Rows: 10980
Columns: 10980
Total Cells: 120560400
Projection: UTM (zone 32)
N: 5200020 S: 5090220 Res: 10
E: 709800 W: 600000 Res: 10
Range of data: min = 0 max = 23562
Data Description:
generated by r.in.gdal
Comments:
r.in.gdal -e input="/media/abheeman/data/grassdata/S2A_OPER_PRD_MSIL\
1C_PDMC_20160315T115050_R065_V20150826T102655_20150826T102655.SAFE/G\
RANULE/S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_N02.0\
1/IMG_DATA/S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B\
02.jp2" output="S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32\
TPS_B02" memory=300 offset=0
±---------------------------------------------------------------------------+
(Wed Mar 16 16:38:39 2016) Command finished (0 sec)

i.atcorr verbose return

(Wed Mar 16 16:39:48 2016)
i.atcorr -i -r --overwrite --verbose input=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT range=0,10000 parameters=/media/abheeman/data/grassdata/conf output=munich_test_atcorr

  • ****************************** 6s version 4.2b

  • geometrical conditions identity

  • Sentinel 2 observation
  • month: 8 day: 26
  • solar zenith angle: 39.16 deg solar azimuthal angle: 161.21 deg
  • view zenith angle: 0.00 deg view azimuthal angle:0.00 deg
  • scattering angle: 140.84 deg azimuthal angle difference: 161.21 deg
  • atmospheric model description

  • atmospheric model identity :
  • tropical (uh2o=4.12g/cm2,uo3=.247cm-atm)
  • aerosols type identity :
  • Continental aerosols model
  • optical condition identity :
  • visibility : 13.00 km opt. thick. 550nm: 0.3516
  • spectral condition

  • sentinel_2 band1
  • value of filter function :
  • wl inf= 0.300 mic wl sup= 2.600mic
  • target type

  • homogeneous ground
  • constant reflectance over the spectra 0.000
  • target elevation description

  • ground pressure [mb] 954.77
  • ground altitude [km] 0.520
  • gaseous content at target level:
  • uh2o= 3.227 g/cm2 uo3= 0.246 cm-atm
  • atmospheric correction activated

Atmospheric correction…
Atmospheric correction complete.
(Wed Mar 16 16:39:59 2016) Command finished (10 sec)

Parameters used

20 - geometrical conditions=Sentinel-2

08 26 10.48 11.353693 48.200905 - month day hh.ddd longitude latitude (“hh.ddd” is in decimal hours GMT)

1 - atmospheric mode=tropical

1 - aerosols model=continental

13 - visibility [km] (aerosol model concentration)

-0.520 - mean target elevation above sea level [km] (here 600m asl)

-786 - sensor height (here, sensor on board a satellite)

129 - 1nd band of Sentinel-2A

Note
Before I invest more time in finding process to derive correct AOT and chose appropriate atmospheric model, I wanted to give it a try with fake parameters. As far as I understand, with fake parameter there should be some short of false atmospheric correction. Therefore, there are false values for atmospheric mode, aerosol model and visibility just for test purpose.
From r.info, maximum value seems to be 23562. But the value in sentinel bands can range only between 0-10000 currently, which brings to the assumption that it probably could be noise. Will it affect the result?

Some general questions:

  1. For 6s parameter, it take geographic coordinate (I guess EPSG:4326) as input. So, I was wondering if we also have transform the coordinate system of the image to the same?
  2. In my system, it took 10 seconds to process one image. But, I am not sure if the processing time will remain same when the process outputs non-empty file. My image size is 10980x10980 pixels. What is general processing time it generally takes, for may be single Landsat-8 image ?
  3. Regarding the raster with empty output, does anybody have experienced such behavior recently? The discussions I searched mostly date back to the time when Landsat-8 was not supported.

If it helps, I am running grass in the computer with Ubuntu 14.04 system, with 8 cores,16 gb ram and Intel Core i7-4790.

Regards,
Abhishek

On 16/03/16 17:09, Abhishek Manandhar wrote:

Hello all,
I am using i.atcorr module of GRASS 7.0.4 release. I compiled the
release, as I wanted to add the Sentinel-2 sensor. So far, I was
successful in compiling the release. However, when I run atcorr, I get
an empty raster file. I have included the reports from r.info
<http://r.info>, i.atcorr and the parameters below:

*r.info <http://r.info> output of the image*

    (Wed Mar 16 16:38:39 2016)
    r.info <http://r.info>
    map=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT
      +----------------------------------------------------------------------------+

My first reflex would be to check your computational region settings with g.region -p and check whether they correspond to your image. Otherwise, run somthing like

g.region rast=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT

before i.attcor.

Moritz

Yes, I checked the computational region and it corresponds to the image. However, I tried the “g.region raster=” command to set computational region and ran i.atcorr again. Unfortunately, it didn’t work out.

···

On Thu, Mar 17, 2016 at 10:53 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 16/03/16 17:09, Abhishek Manandhar wrote:

Hello all,
I am using i.atcorr module of GRASS 7.0.4 release. I compiled the
release, as I wanted to add the Sentinel-2 sensor. So far, I was
successful in compiling the release. However, when I run atcorr, I get
an empty raster file. I have included the reports from r.info
<http://r.info>, i.atcorr and the parameters below:

r.info <http://r.info> output of the image

(Wed Mar 16 16:38:39 2016)
r.info <http://r.info>
map=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT
±---------------------------------------------------------------------------+

My first reflex would be to check your computational region settings with g.region -p and check whether they correspond to your image. Otherwise, run somthing like

g.region rast=S2A_OPER_MSI_L1C_TL_EPA__20160315T065417_A000920_T32TPS_B02@PERMANENT

before i.attcor.

Moritz

Missed the list

···

On Thu, Mar 17, 2016 at 12:36 PM, Sajid Pareeth <spareeth@gmail.com> wrote:

On Thu, Mar 17, 2016 at 12:12 PM, Abhishek Manandhar <abhishek.adams@gmail.com> wrote:

Hi,
Thanks for your reply.

-Empty raster file have NULL pixels. But when I remove “-i” flag the pixels are -nan. On both cases, the univar command returns nothing. Can you assume, why it is happening?

Usually it happens when the region is not proper. Check your mapset projection and that of the data.

Please post “g.region -p”

-Sentinel 2A data are captured in 12 bit but later converted to reflectance (0-1) and is converted to integer with quantification value 10000 (which used to be 1000 before). So the value ranges from 0-10000 at current state.

I am not sure about this. I think quantification is done while converting from level 1C to level 2A in their toolbox - SNAP. Do you have any source for this info?

I have a similar sentinel band 2 (March) with data ranging from 0 to 22132 but histogram shows the absurd high values are only single pixels and I dont know why they exists. 99 percent of the pixels are below 1500. If the quantification is done with 10000, i would expect much higher values spread over my histogram.

to check the histogram:

d.mon wx0

d.histogram S2A…B02

On Mar 16, 2016 5:09 PM, “Abhishek Manandhar” <abhishek.adams@gmail.com> wrote:

Hello all,
I am using i.atcorr module of GRASS 7.0.4 release. I compiled the release, as I wanted to add the Sentinel-2 sensor. So far, I was successful in compiling the release.

Could you please send a diff of the changes?

And, in order to analyze the range of the bands, please use the r.univar with -e for extended statistics. The high value you got may just be a single weird pixel… So the quantiles will give us a better idea.

Markus