[GRASS-user] i.atcorr returning empty raster and not respecting input parameters [WAS: i.atcorr - segfault on OSX]

Carlos Grohmann carlos.grohmann at gmail.com
Mon Mar 21 07:40:58 PDT 2016


Thanks Daniel!

That was really dumb of not double-checking the input parameters..

Now another problem: the resulting image is empty! r.info returns "min =
nan  max = nan".

I tried with radiance and reflectance as inputs. One thing that I realized
is that, even though I'm not setting it to rescale the output range, it's
doing it:

 |   Comments:
   |
 |    i.atcorr --overwrite --verbose -r input="ast_18560.01.toa_reflectanc\
  |
 |    e at lateritas" range=0,255 elevation="srtm_xingu_3sec at lateritas" param\
  |
 |    eters="/Volumes/MacintoshHD2/Dropbox/USP/projetosPesquisa/Xingu_late\
  |
 |    ritas/aster/params6s_ast_18560.txt" output="ast_18560.01.toa_reflect\
  |
 |    ance_atcorr_6s" rescale=0,255

Here I didn't set neither range nor rescale (left them blank), but
apparently the command is not respecting my choices. bug detected?

After this I tried setting the input range and rescale options, but without
success. Still an empty raster...

best

Carlos





On Mon, Mar 21, 2016 at 8:54 AM, Daniel Victoria <daniel.victoria at gmail.com>
wrote:

> Carlos,
>
> The aerosol model is the 4th line in the parameter file. You have set the
> aerosol model to 15. But in the i.atcor manual, the values range from 0 to
> 11. Could that be the problem? i.atcor issues an unknown aerosol model
> warning and assumes you are trying to enter aerosol models by hand. Hence
> it sets your visibility to -0.1 (ground altitude) and other parameters
> wrong.
>
> Cheers
> Daniel
>
>
>
>
> On Fri, Mar 18, 2016 at 4:49 PM, Carlos Grohmann <
> carlos.grohmann at gmail.com> wrote:
>
>> Hi all.
>>
>> I'm trying to run some atmospheric correction of ASTER images. First I
>> calculated radiance and reflectance (with my own script, not
>> i.aster.toar).  I've tried with radiance and reflectance as input, but both
>> end up in a segfault.. the parameters file has this content:
>>
>> 10
>> 6 22 13.99 -51.931 -3.355
>> 1
>> 15
>> -0.100
>> -1000
>> 72
>>
>>
>> and this is the call to i.atcorr and the error:
>> (region is defined to the raster)
>>
>>  i.atcorr --overwrite --verbose input=ast_18560.01.radiance
>> elevation=srtm_xingu_3sec parameters=params6s_ast_18560.txt
>> output=ast_18560.01.radiance_atcorr
>>
>> WARNING: Unknown aerosol model!
>>  wavelength  less  than  0.25  micron:
>>  let's take s(l)=s(0.25)
>>
>>
>>
>> * ****************************** 6s version 4.2b
>> ****************************** *
>> *                        geometrical conditions identity
>>        *
>> *                        -------------------------------
>>        *
>> *                        ASTER    observation
>>       *
>> *
>>       *
>> *    month: 6 day: 22
>>      *
>> *    solar zenith angle:   34.61 deg  solar azimuthal angle:       38.12
>> deg   *
>> *    view zenith angle:     0.00 deg  view azimuthal angle:         0.00
>> deg   *
>> *    scattering angle:    145.39 deg  azimuthal angle difference:  38.12
>> deg   *
>> *
>>       *
>> *                        atmospheric model description
>>        *
>> *                        -----------------------------
>>        *
>> *            atmospheric model identity :
>>       *
>> *                tropical            (uh2o=4.12g/cm2,uo3=.247cm-atm)
>>        *
>> *
>>       *
>> *            aerosols type identity :
>>       *
>> *                 user defined aerosols model
>>       *
>> *
>>       *
>> *            optical condition identity :
>>       *
>> *                 visibility :   -0.10 km  opt. thick. 550nm :   0.0000
>>     *
>> *
>>       *
>> *                        spectral condition
>>       *
>> *                        ------------------
>>       *
>> *
>>       *
>> *                        target type
>>        *
>> *                        -----------
>>        *
>> *            homogeneous ground
>>       *
>> *              constant reflectance over the spectra     0.000
>>       *
>> *
>>       *
>> *                        target elevation description
>>       *
>> *                        ----------------------------
>>       *
>> *            ground pressure  [mb]          0.00
>>       *
>> *            ground altitude  [km]       99.990
>>      *
>> *                 gaseous content at target level:
>>        *
>> *                 uh2o=    0.000 g/cm2        uo3=    0.000 cm-atm
>>       *
>> *
>>       *
>> *                        plane simulation description
>>       *
>> *                        ----------------------------
>>       *
>> *            plane  pressure          [mb]      0.00
>>       *
>> *            plane  altitude absolute [km] 396884967424.000
>>      *
>> *                 atmosphere under plane description:
>>       *
>> *                 ozone content                0.000
>>       *
>> *                 h2o   content                0.000
>>       *
>> *                aerosol opt. thick. 550nm     0.000
>>       *
>> *
>>       *
>> *                         atmospheric correction activated
>>        *
>> *                         --------------------------------
>>        *
>> Atmospheric correction...
>> Segmentation fault: 11
>>
>>
>> I've tried with 7.0.2 and 6.0.4 versions, both end up in the same error.
>>
>> If I try to run it from a python script I a bit more information:
>>
>> grass.run_command('i.atcorr', input=ast_band,
>> elevation='srtm_xingu_3sec', parameters=fname,
>> output=ast_band+'_atcorr_6s', verbose=True)
>> WARNING: Unknown aerosol model!
>> WARNING: Unsupported iwave value: 809775095
>>  wavelength  less  than  0.25  micron:
>>  let's take s(l)=s(0.25)
>>
>>
>>
>> * ****************************** 6s version 4.2b
>> ****************************** *
>> *                        geometrical conditions identity
>>        *
>> *                        -------------------------------
>>        *
>> *                        ASTER    observation
>>       *
>> *
>>       *
>> *    month: 6 day: 22
>>      *
>> *    solar zenith angle:   34.65 deg  solar azimuthal angle:       38.18
>> deg   *
>> *    view zenith angle:     0.00 deg  view azimuthal angle:         0.00
>> deg   *
>> *    scattering angle:    145.35 deg  azimuthal angle difference:  38.18
>> deg   *
>> *
>>       *
>> *                        atmospheric model description
>>        *
>> *                        -----------------------------
>>        *
>> *            atmospheric model identity :
>>       *
>> *                tropical            (uh2o=4.12g/cm2,uo3=.247cm-atm)
>>        *
>> *
>>       *
>> *            aerosols type identity :
>>       *
>> *                 user defined aerosols model
>>       *
>> *
>>       *
>> *            optical condition identity :
>>       *
>> *                 visibility :   -0.10 km  opt. thick. 550nm :   0.0000
>>     *
>> *
>>       *
>> *                        spectral condition
>>       *
>> *                        ------------------
>>       *
>> *           Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File
>> "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/script/core.py",
>> line 394, in run_command
>>     return handle_errors(returncode, returncode, args, kwargs)
>>   File
>> "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/script/core.py",
>> line 312, in handle_errors
>>     returncode=returncode)
>>   File
>> "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/exceptions/__init__.py",
>> line 68, in __init__
>>     msg = _("Module run %s %s ended with error") % (module, code)
>> TypeError: 'str' object is not callable
>>
>>
>> any help is appreciated
>>
>> Carlos
>> --
>> Prof. Carlos Henrique Grohmann
>> Institute of Energy and Environment - Univ. of São Paulo, Brazil
>> - Digital Terrain Analysis | GIS | Remote Sensing -
>>
>> http://carlosgrohmann.com
>> http://orcid.org/0000-0001-5073-5572
>> ________________
>> Can’t stop the signal.
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>


-- 
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160321/51e080d4/attachment-0001.html>


More information about the grass-user mailing list