i.atcorr(1)
π i.atcorr π
okay bestie, gather round, because this is the manual page for i.atcorr(1) from the GRASS GIS User's Manual and it's giving main character energy fr fr β¨
πΈ NAME πΈ
i.atcorr β does atmospheric correction using the 6S algorithm. And what's 6S, you ask? It's the Second Simulation of Satellite Signal in the Solar Spectrum, no cap π°οΈπ
π KEYWORDS π
imagery, atmospheric correction, radiometric conversion, radiance, reflectance, satellite
β¨ SYNOPSIS β¨
i.atcorr
i.atcorr --help
i.atcorr [-irab] input=name [range=min,max] [elevation=name]
[visibility=name] parameters=name output=name [rescale=min,max]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π¦ Flags
-iβ output the raster map as an integer, periodt-rβ treat the input raster map as reflectance (the default vibe is radiance, jsyk)-aβ the input is from an ETM+ image taken after July 1, 2000-bβ the input is from an ETM+ image taken before July 1, 2000--overwriteβ let output files overwrite existing files (yes, really, it means it)--helpβ prints the usage summary, iconic--verboseβ verbose module output, she's chatty--quietβ quiet module output, she's mysterious--uiβ force-launch the GUI dialog π
π Parameters
input=name[required] β name of the input raster maprange=min,maxβ input range. Default:0,255elevation=nameβ name of input elevation raster map (in m)visibility=nameβ name of input visibility raster map (in km)parameters=name[required] β name of input text file with the 6S parametersoutput=name[required] β name for the output raster maprescale=min,maxβ rescale the output raster map. Default:0,255
π DESCRIPTION π
So i.atcorr performs atmospheric correction on the input raster map using the 6S algorithm (Second Simulation of Satellite Signal in the Solar Spectrum). If you want the full algorithm lore, a detailed description lives at the Land Surface Reflectance Science Computing Facility website π
β οΈ Important, bestie: current region settings are ignored! The region gets adjusted to cover the input raster map before the atmospheric correction runs, and then the previous settings are restored afterwards. She does her own thing and puts it all back, we love a considerate queen π«Ά
If the -r flag is used, the input raster map is treated as reflectance. Otherwise, the input raster map is treated as radiance values, and it gets converted to reflectance at i.atcorr runtime. Either way, the output data are always reflectance. Always. Periodt. π
The satellite overpass time has to be specified in Greenwich Mean Time (GMT) β°
An example of the 6S parameters could be:
8 - geometrical conditions=Landsat ETM+
2 19 13.00 -47.410 -20.234 - month day hh.ddd longitude latitude ("hh.ddd" is in decimal hours GMT)
1 - atmospheric model=tropical
1 - aerosols model=continental
15 - visibility [km] (aerosol model concentration)
-0.600 - mean target elevation above sea level [km] (here 600 m asl)
-1000 - sensor height (here, sensor on board a satellite)
64 - 4th band of ETM+ Landsat 7
If the position is not available in longitude-latitude (WGS84), the m.proj conversion module can be used to reproject from a different reference system. Slay π§
π₯ 6S CODE PARAMETER CHOICES π₯
β A. Geometrical conditions β
okay so here's the big one, the whole menu of geometric condition codes. each one comes with a description AND what you gotta enter, so pay attention bestie:
1β meteosat observation β enter month,day,decimal hour (universal time-hh.ddd) n. of column,n. of line. (full scale 5000*2500)2β goes east observation β enter month,day,decimal hour (universal time-hh.ddd) n. of column,n. of line. (full scale 17000*12000)c3β goes west observation β enter month,day,decimal hour (universal time-hh.ddd) n. of column,n. of line. (full scale 17000*12000)4β avhrr (PM noaa) β enter month,day,decimal hour (universal time-hh.ddd) n. of column(1-2048),xlonan,hna give long.(xlonan) and overpass hour (hna) at the ascendant node at equator5β avhrr (AM noaa) β enter month,day,decimal hour (universal time-hh.ddd) n. of column(1-2048),xlonan,hna give long.(xlonan) and overpass hour (hna) at the ascendant node at equator6β hrv (spot) β enter month,day,hh.ddd,long.,lat. *7β tm (landsat) β enter month,day,hh.ddd,long.,lat. *8β etm+ (landsat7) β enter month,day,hh.ddd,long.,lat. *9β liss (IRS 1C) β enter month,day,hh.ddd,long.,lat. *10β aster β enter month,day,hh.ddd,long.,lat. *11β avnir β enter month,day,hh.ddd,long.,lat. *12β ikonos β enter month,day,hh.ddd,long.,lat. *13β RapidEye β enter month,day,hh.ddd,long.,lat. *14β VGT1 (SPOT4) β enter month,day,hh.ddd,long.,lat. *15β VGT2 (SPOT5) β enter month,day,hh.ddd,long.,lat. *16β WorldView 2 β enter month,day,hh.ddd,long.,lat. *17β QuickBird β enter month,day,hh.ddd,long.,lat. *18β LandSat 8 β enter month,day,hh.ddd,long.,lat. *19β Geoeye 1 β enter month,day,hh.ddd,long.,lat. *20β Spot6 β enter month,day,hh.ddd,long.,lat. *21β Spot7 β enter month,day,hh.ddd,long.,lat. *22β Pleiades1A β enter month,day,hh.ddd,long.,lat. *23β Pleiades1B β enter month,day,hh.ddd,long.,lat. *24β Worldview3 β enter month,day,hh.ddd,long.,lat. *25β Sentinel-2A β enter month,day,hh.ddd,long.,lat. *26β Sentinel-2B β enter month,day,hh.ddd,long.,lat. *27β PlanetScope 0c 0d β enter month,day,hh.ddd,long.,lat. *28β PlanetScope 0e β enter month,day,hh.ddd,long.,lat. *29β PlanetScope 0f 10 β enter month,day,hh.ddd,long.,lat. *30β Worldview4 β enter month,day,hh.ddd,long.,lat. *31β AVIRIS β enter month,day,hh.ddd,long.,lat. *32β Hyperion VNIR β enter month,day,hh.ddd,long.,lat. *33β Hyperion SWIR β enter month,day,hh.ddd,long.,lat. *
π NOTE: for HRV, TM, ETM+, LISS and ASTER experiments, longitude and latitude are the coordinates of the scene center. Latitude must be > 0 for northern hemisphere and < 0 for southern. Longitude must be > 0 for eastern hemisphere and < 0 for western. Don't mix it up bestie, she WILL notice π
π« B. Atmospheric model π«
and here's the atmospheric model menu, pick your vibe:
0β no gaseous absorption1β tropical2β midlatitude summer3β midlatitude winter4β subarctic summer5β subarctic winter6β us standard 627β define your own atmospheric model as a set of the following 5 parameters per each measurement:altitude [km],pressure [mb],temperature [k],h2o density [g/m3],o3 density [g/m3]. For example: there is one radiosonde measurement for each altitude of0-25kmat a step of1km, one measurement for each altitude of25-50kmat a step of5km, and two single measurements for altitudes70kmand100km. This makes34measurements. In that case, there are34*5values to input. π8β define your own atmospheric model providing values of the water vapor and ozone content:uw [g/cm2],uo3 [cm-atm]. The profile is taken fromus62. π«Ά
π C. Aerosols model π
okay bestie, here's the menu of aerosol vibes. pick your fighter:
0β no aerosols π«1β continental model π2β maritime model π3β urban model ποΈ4β shettle model for background desert aerosol ποΈ5β biomass burning π₯6β stratospheric model βοΈ7β define your own model β enter the volumic percentage of each component:c(1)= volumic % of dust-like,c(2)= volumic % of water-soluble,c(3)= volumic % of oceanic,c(4)= volumic % of soot. All values should be between0and1. β¨8β define your own model β size distribution function: Multimodal Log Normal (up to4modes). π¦9β define your own model β size distribution function: Modified gamma. π§10β define your own model β size distribution function: Junge Power-Law. π11β define your own model β Sun-photometer measurements,50values max, entered as:randd V / d (logr)whereris the radius[micron],Vis the volume,d V / d (logr)[cm3/cm2/micron]. Followed by:nrandnifor each wavelength wherenrandniare respectively the real and imaginary part of the refractive index. π
π D. Aerosol concentration model (visibility) π
If you have an estimate of the meteorological parameter visibility v, enter directly the value of v [km] (the aerosol optical depth (AOD) will be computed from a standard aerosol profile). β¨
If you have an estimate of aerosol optical depth, enter 0 for the visibility and in a following line enter the aerosol optical depth at 550nm (iaer means 'i' for input and 'aer' for aerosol), for example:
0 - visibility
0.112 - aerosol optical depth at 550 nm
NOTE: ifiaeris0, enter-1for visibility. π
NOTE: if a visibility map is provided, these parameters are ignored. π
π E. Target altitude (xps), sensor platform (xpp) π
Target altitude (xps, in negative [km]): xps >= 0 means the target is at the sea level.
otherwise xps expresses the altitude of the target (e.g., mean elevation) in [km], given as negative value.
Sensor platform (xpp, in negative [km] or -1000):
xpp = -1000means that the sensor is on board a satellite. π°οΈxpp = 0means that the sensor is at the ground level.-100 < xpp < 0defines the altitude of the sensor expressed in[km]; this altitude is given relative to the target altitude as negative value.
For aircraft simulations only (xpp is neither equal to 0 nor equal to -1000):
puw(water vapor content between the aircraft and the surface)po3(ozone content between the aircraft and the surface)taerp(the aerosol optical thickness at550nmbetween the aircraft and the surface)
If these data are not available, enter negative values for all of them. puw, po3 will then be interpolated from the us62 standard profile according to the values at the ground level; taerp will be computed according to a 2 km exponential profile for aerosol. βοΈ
πΈ F. Sensor band πΈ
There are two possibilities: either define your own spectral conditions (codes -2, -1, 0, or 1) or choose a code indicating the band of one of the pre-defined satellites. π
Define your own spectral conditions: Note that "wlinf" and "wlsup" refer to the limits of the wavelength range defined by the user for a given simulation. Specifically:
wlinf: This represents the lower wavelength limit (or minimum wavelength) of the spectral band for which the simulation is being performed.wlsup: This represents the upper wavelength limit (or maximum wavelength) of the spectral band for the simulation.-2β Enterwlinf,wlsup. The filter function will be equal to1over the whole band (asiwave=0) but step by step output will be printed. β¨-1β Enterwl(monochr. cond, gaseous absorption is included). π0β Enterwlinf,wlsup. The filter function will be equal to1over the whole band. π1β Enterwlinf,wlsupand user's filter functions (lambda)by step of0.0025 micrometer. π
Pre-defined satellite bands:
2β meteosat vis band (0.350-1.110)3β goes east band vis (0.490-0.900)4β goes west band vis (0.490-0.900)5β avhrr (noaa6) band 1 (0.550-0.750)6β avhrr (noaa6) band 2 (0.690-1.120)7β avhrr (noaa7) band 1 (0.500-0.800)8β avhrr (noaa7) band 2 (0.640-1.170)9β avhrr (noaa8) band 1 (0.540-1.010)10β avhrr (noaa8) band 2 (0.680-1.120)11β avhrr (noaa9) band 1 (0.530-0.810)12β avhrr (noaa9) band 1 (0.680-1.170)13β avhrr (noaa10) band 1 (0.530-0.780)14β avhrr (noaa10) band 2 (0.600-1.190)15β avhrr (noaa11) band 1 (0.540-0.820)16β avhrr (noaa11) band 2 (0.600-1.120)17β hrv1 (spot1) band 1 (0.470-0.650)18β hrv1 (spot1) band 2 (0.600-0.720)19β hrv1 (spot1) band 3 (0.730-0.930)20β hrv1 (spot1) band pan (0.470-0.790)21β hrv2 (spot1) band 1 (0.470-0.650)22β hrv2 (spot1) band 2 (0.590-0.730)23β hrv2 (spot1) band 3 (0.740-0.940)24β hrv2 (spot1) band pan (0.470-0.790)25β tm (landsat5) band 1 (0.430-0.560)26β tm (landsat5) band 2 (0.500-0.650)27β tm (landsat5) band 3 (0.580-0.740)28β tm (landsat5) band 4 (0.730-0.950)29β tm (landsat5) band 5 (1.5025-1.890)30β tm (landsat5) band 7 (1.950-2.410)31β mss (landsat5) band 1 (0.475-0.640)32β mss (landsat5) band 2 (0.580-0.750)33β mss (landsat5) band 3 (0.655-0.855)34β mss (landsat5) band 4 (0.785-1.100)35β MAS (ER2) band 1 (0.5025-0.5875)36β MAS (ER2) band 2 (0.6075-0.7000)
okay bestie we're back and we're deep in the band list now β number 37 and it's not stopping until 150. the way this list is long? iconic. no cap, every single band is here. let's go π β¨
MAS (ER2) band 3 (0.8300-0.9125)β vibe check passed, periodt πMAS (ER2) band 4 (0.9000-0.9975)β another MAS banger, we love to see it β¨MAS (ER2) band 5 (1.8200-1.9575)β okay this one's giving 1.82 to 1.9575, no cap πΈMAS (ER2) band 6 (2.0950-2.1925)β MAS band 6, lowkey iconic πMAS (ER2) band 7 (3.5800-3.8700)β last MAS one, and it's 3.58 to 3.87, slay π¦MODIS band 1 (0.6100-0.6850)β MODIS has entered the chat, band 1 periodt πMODIS band 2 (0.8200-0.9025)β band 2, we're obsessed β¨MODIS band 3 (0.4500-0.4825)β MODIS band 3, main character energy πMODIS band 4 (0.5400-0.5700)β band 4, no cap π₯MODIS band 5 (1.2150-1.2700)β MODIS band 5, fr fr πMODIS band 6 (1.6000-1.6650)β band 6, iykyk πΏMODIS band 7 (2.0575-2.1825)β last MODIS, and it's rainbow-worthy πavhrr (noaa12) band 1 (0.500-1.000)β avhrr noaa12 band 1, okay bestie πavhrr (noaa12) band 2 (0.650-1.120)β noaa12 band 2, slay β¨avhrr (noaa14) band 1 (0.500-1.110)β noaa14 band 1, we love a sequel πavhrr (noaa14) band 2 (0.680-1.100)β noaa14 band 2, periodt πΈPOLDER band 1 (0.4125-0.4775)β POLDER band 1, iconic π¦POLDER band 2 (non polar) (0.4100-0.5225)β POLDER band 2 non polar, no cap πPOLDER band 3 (non polar) (0.5325-0.5950)β band 3 non polar, ate πPOLDER band 4 P1 (0.6300-0.7025)β POLDER band 4 P1, obsessed πPOLDER band 5 (non polar) (0.7450-0.7800)β band 5 non polar, fire π₯POLDER band 6 (non polar) (0.7000-0.8300)β band 6 non polar, blue vibes πPOLDER band 7 P1 (0.8100-0.9200)β POLDER band 7 P1, green flag πΏPOLDER band 8 (non polar) (0.8650-0.9400)β last POLDER, rainbow moment πetm+ (landsat7) band 1 blue (435nm - 517nm)β etm+ landsat7 band 1 blue, bestie πetm+ (landsat7) band 2 green (508nm - 617nm)β band 2 green, slay β¨etm+ (landsat7) band 3 red (625nm - 702nm)β band 3 red, iconic πetm+ (landsat7) band 4 NIR (753nm - 910nm)β band 4 NIR, lowkey obsessed πΈetm+ (landsat7) band 5 SWIR (1520nm - 1785nm)β band 5 SWIR, no cap π¦etm+ (landsat7) band 7 SWIR (2028nm - 2375nm)β band 7 SWIR, periodt πetm+ (landsat7) band 8 PAN (505nm - 917nm)β band 8 PAN, main character energy πliss (IRC 1C) band 2 (0.502-0.620)β liss IRC 1C band 2, ate πliss (IRC 1C) band 3 (0.612-0.700)β band 3, fire π₯liss (IRC 1C) band 4 (0.752-0.880)β band 4, blue vibes πliss (IRC 1C) band 5 (1.452-1.760)β band 5, green flag πΏaster band 1 (0.480-0.645)β aster band 1, rainbow πaster band 2 (0.588-0.733)β aster band 2, slay πaster band 3N (0.723-0.913)β band 3N, iconic β¨aster band 4 (1.530-1.750)β band 4, we love to see it πaster band 5 (2.103-2.285)β band 5, no cap πΈaster band 6 (2.105-2.298)β band 6, periodt π¦aster band 7 (2.200-2.393)β band 7, fr fr πaster band 8 (2.248-2.475)β band 8, iykyk πaster band 9 (2.295-2.538)β last aster, ate πavnir band 1 (408nm - 517nm)β avnir band 1, fire π₯avnir band 2 (503nm - 612nm)β band 2, blue πavnir band 3 (583nm - 717nm)β band 3, green flag πΏavnir band 4 (735nm - 922nm)β band 4, rainbow πIkonos Green band (408nm - 642nm)β Ikonos Green, slay πIkonos Red band (448nm - 715nm)β Ikonos Red, iconic β¨Ikonos NIR band (575nm - 787nm)β Ikonos NIR, no cap πRapidEye Blue band (440nm - 512nm)β RapidEye Blue, obsessed πΈRapidEye Green band (515nm - 592nm)β RapidEye Green, periodt π¦RapidEye Red band (628nm - 687nm)β RapidEye Red, ate πRapidEye Red edge band (685nm - 735nm)β Red edge, main character energy πRapidEye NIR band (750nm - 860nm)β RapidEye NIR, fr fr πVGT1 (SPOT4) band 0 (420nm - 497nm)β VGT1 SPOT4 band 0, fire π₯VGT1 (SPOT4) band 2 (603nm - 747nm)β band 2, blue vibes πVGT1 (SPOT4) band 3 (740nm - 942nm)β band 3, green flag πΏVGT1 (SPOT4) MIR band (1540nm - 1777nm)β MIR band, rainbow πVGT2 (SPOT5) band 0 (423nm - 492nm)β VGT2 SPOT5 band 0, slay πVGT2 (SPOT5) band 2 (600nm - 737nm)β band 2, iconic β¨VGT2 (SPOT5) band 3 (745nm - 945nm)β band 3, no cap πVGT2 (SPOT5) MIR band (1523nm - 1757nm)β MIR band, obsessed πΈWorldView2 Panchromatic band (448nm - 812nm)β WorldView2 Pan, periodt π¦WorldView2 Coastal Blue band (395nm - 457nm)β Coastal Blue, ate πWorldView2 Blue band (440nm - 517nm)β Blue band, main character πWorldView2 Green band (503nm - 587nm)β Green band, fr fr πWorldView2 Yellow band (583nm - 632nm)β Yellow band, fire π₯WorldView2 Red band (623nm - 695nm)β Red band, blue? iconic πWorldView2 Red edge band (698nm - 750nm)β Red edge, green flag πΏWorldView2 NIR1 band (760nm - 905nm)β NIR1, rainbow πWorldView2 NIR2 band (853nm - 1047nm)β NIR2, slay πQuickBird Panchromatic band (385nm - 1060nm)β QuickBird Pan, iconic β¨QuickBird Blue band (420nm - 585nm)β QuickBird Blue, no cap πQuickBird Green band (448nm - 682nm)β Green, obsessed πΈQuickBird Red band (560nm - 747nm)β Red, periodt π¦QuickBird NIR1 band (650nm - 935nm)β NIR1, ate πLandsat 8 Coastal aerosol band (433nm - 455nm)β Landsat 8 Coastal aerosol, main character πLandsat 8 Blue band (448nm - 515nm)β Blue, fr fr πLandsat 8 Green band (525nm - 595nm)β Green, fire π₯Landsat 8 Red band (633nm - 677nm)β Red, blue vibes πLandsat 8 Panchromatic band (498nm - 682nm)β Panchromatic, green flag πΏLandsat 8 NIR band (845nm - 885nm)β NIR, rainbow πLandsat 8 Cirrus band (1355nm - 1390nm)β Cirrus, slay πLandsat 8 SWIR1 band (1540nm - 1672nm)β SWIR1, iconic β¨Landsat 8 SWIR2 band (2073nm - 2322nm)β SWIR2, no cap πGeoEye 1 Panchromatic band (448nm - 812nm)β GeoEye 1 Pan, obsessed πΈGeoEye 1 Blue band (443nm - 525nm)β Blue, periodt π¦GeoEye 1 Green band (503nm - 587nm)β Green, ate πGeoEye 1 Red band (653nm - 697nm)β Red, main character πGeoEye 1 NIR band (770nm - 932nm)β NIR, fr fr πSpot6 Blue band (440nm - 532nm)β Spot6 Blue, fire π₯Spot6 Green band (515nm - 600nm)β Green, blue vibes πSpot6 Red band (610nm - 710nm)β Red, green flag πΏSpot6 NIR band (738nm - 897nm)β NIR, rainbow πSpot6 Pan band (438nm - 760nm)β Pan, slay πSpot7 Blue band (445nm - 532nm)β Spot7 Blue, iconic β¨Spot7 Green band (525nm - 607nm)β Green, no cap πSpot7 Red band (610nm - 727nm)β Red, obsessed πΈSpot7 NIR band (745nm - 902nm)β NIR, periodt π¦Spot7 Pan band (443nm - 760nm)β Pan, ate πPleiades1A Blue band (433nm - 560nm)β Pleiades1A Blue, main character πPleiades1A Green band (500nm - 617nm)β Green, fr fr πPleiades1A Red band (590nm - 722nm)β Red, fire π₯Pleiades1A NIR band (740nm - 945nm)β NIR, blue vibes πPleiades1A Pan band (460nm - 845nm)β Pan, green flag πΏPleiades1B Blue band 438nm - 560nm)β Pleiades1B Blue, note the missing paren, still iconic πPleiades1B Green band (498nm - 615nm)β Green, slay πPleiades1B Red band (608nm - 727nm)β Red, iconic β¨Pleiades1B NIR band (750nm - 945nm)β NIR, no cap πPleiades1B Pan band (460nm - 845nm)β Pan, obsessed πΈWorldview3 Pan band (445nm - 812nm)β Worldview3 Pan, periodt π¦Worldview3 Coastal blue band (395nm - 455nm)β last one bestie, Coastal blue, ate π
...and the band-code list just keeps going, because of course it does π
. Codes 151 through 208 are the Worldview3 / Sentinel-2 / PlanetScope crew, then AVIRIS and Hyperion roll in with the big sprawling ranges. Wherever you see a lonely . sitting in the code column, that's the page being like "β¦and every step in between, bestie" β it's a range, not a typo π¦
151β Worldview3 Blue band (443nm - 517nm)152β Worldview3 Green band (508nm - 587nm)153β Worldview3 Yellow band (580nm - 630nm)154β Worldview3 Red band (625nm - 697nm)155β Worldview3 Red edge band (698nm - 752nm)156β Worldview3 NIR1 band (760nm - 902nm)157β Worldview3 NIR2 band (855nm - 1042nm)158β Worldview3 SWIR1 band (1178nm - 1242nm)159β Worldview3 SWIR2 band (1545nm - 1600nm)160β Worldview3 SWIR3 band (1633nm - 1687nm)161β Worldview3 SWIR4 band (1698nm - 1762nm)162β Worldview3 SWIR5 band (2133nm - 2195nm)163β Worldview3 SWIR6 band (2170nm - 2235nm)164β Worldview3 SWIR7 band (2225nm - 2295nm)165β Worldview3 SWIR8 band (2283nm - 2377nm)166β Sentinel2A Coastal blue band B1 (430nm - 455nm)167β Sentinel2A Blue band B2 (440nm - 530nm)168β Sentinel2A Green band B3 (540nm - 580nm)169β Sentinel2A Red band B4 (648nm - 682nm)170β Sentinel2A Red edge band B5 (695nm - 712nm)171β Sentinel2A Red edge band B6 (733nm - 747nm)172β Sentinel2A Red edge band B7 (770nm - 795nm)173β Sentinel2A NIR band B8 (775nm - 905nm)174β Sentinel2A Red edge band B8A (850nm - 880nm)175β Sentinel2A Water vapour band B9 (933nm - 957nm)176β Sentinel2A SWIR Cirrus band B10 (1355nm - 1392nm)177β Sentinel2A SWIR band B11 (1558nm - 1667nm)178β Sentinel2A SWIR band B12 (2088nm - 2315nm)179β Sentinel2B Coastal blue band B1 (430nm - 455nm)180β Sentinel2B Blue band B2 (440nm - 530nm)181β Sentinel2B Green band B3 (538nm - 580nm)182β Sentinel2B Red band B4 (648nm - 682nm)183β Sentinel2B Red edge band B5 (695nm - 712nm)184β Sentinel2B Red edge band B6 (730nm - 747nm)185β Sentinel2B Red edge band B7 (768nm - 792nm)186β Sentinel2B NIR band B8 (778nm - 905nm)187β Sentinel2B Red edge band B8A (850nm - 877nm)188β Sentinel2B Water vapour band B9 (930nm - 955nm)189β Sentinel2B SWIR Cirrus band B10 (1358nm - 1397nm)190β Sentinel2B SWIR band B11 (1555nm - 1667nm)191β Sentinel2B SWIR band B12 (2075nm - 2300nm)192β PlanetScope 0c 0d Blue band B1 (440nm - 570nm)193β PlanetScope 0c 0d Green band B2 (450nm - 690nm)194β PlanetScope 0c 0d Red band B3 (460nm - 700nm)195β PlanetScope 0c 0d NIR band B4 (770nm - 880nm)196β PlanetScope 0e Blue band B1 (430nm - 700nm)197β PlanetScope 0e Green band B2 (450nm - 700nm)198β PlanetScope 0e Red band B3 (460nm - 700nm)199β PlanetScope 0e NIR band B4 (760nm - 880nm)200β PlanetScope 0f 10 Blue band B1 (450nm - 680nm)201β PlanetScope 0f 10 Green band B2 (450nm - 680nm)202β PlanetScope 0f 10 Red band B3 (450nm - 680nm)203β PlanetScope 0f 10 NIR band B4 (760nm - 870nm)204β Worldview4 Pan band (424nm - 842nm)205β Worldview4 Blue band (416nm - 567nm)206β Worldview4 Green band (488nm - 626nm)207β Worldview4 Red band (639nm - 711nm)208β Worldview4 NIR1 band (732nm - 962nm)209β AVIRIS b1 band (365nm)210β AVIRIS b2 band (375nm).β AVIRIS b. band (+10nm)431β AVIRIS b223 band (2486nm)432β AVIRIS b224 band (2496nm)433β Hyperion VNIR b8 band (427nm)434β Hyperion VNIR b9 band (437.16326nm).β Hyperion VNIR b. band (+10.16326nm)480β Hyperion VNIR b56 band (914.83648nm)481β Hyperion VNIR b57 band (924.99974nm)482β Hyperion SWIR b77 band (912nm)483β Hyperion SWIR b78 band (922.0884nm).β Hyperion SWIR b. band (+10.0884nm)627β Hyperion SWIR b223 band (2384.9064nm)628β Hyperion SWIR b224 band (2394.9948nm)
β¨ EXAMPLES β¨
π°οΈ Atmospheric correction of a Sentinel-2 band π°οΈ
Okay so this example is literally the whole vibe: doing atmospheric correction on a Sentinel-2 scene in the North Carolina project. Let's go π«Ά
Let's assume the Sentinel-2 L1C scene S2A_OPER_PRD_MSIL1C_PDMC_20161029T092602_R054_V20161028T155402_20161028T155402 was downloaded and imported with region cropping (peep r.import for that) into the PERMANENT mapset of the North Carolina project. The computational region got set to the extent of the elevation map in the North Carolina dataset. And now? We've got 13 individual bands (B01-B12) and we want the atmospheric correction applied to all of them. The steps below get done to each band separately β one at a time, no shortcuts bestie.
π Create the parameters file for i.atcorr
First thing first: we make a file holding the 6S parameters for one specific scene and band. To build that 6S file we need to gather up the following intel π
- geometrical conditions,
- month, day, decimal hours in GMT, decimal longitude and latitude of measurement,
- atmospheric model,
- aerosol model,
- visibility or aerosol optical depth,
- mean target elevation above sea level,
- sensor height and,
- sensor band.
yes bestie, the original page says "moth" where it means "month" π¦ we all know what they meant, moving on
1. Geometrical conditions
For Sentinel-2A the geometrical conditions take the value 25, and for Sentinel-2B the geometrical conditions value is 26 (See table A). Our scene comes from the Sentinel-2A mission β you can tell because the file name begins with S2A_....
2. Day, time, longitude and latitude of measurement
The day and time of the measurement are hiding in the filename (i.e., the second datum in the file name, format YYYYMMDDTHHMMSS), and they're also written down in the metadata file that ships inside the downloaded scene (the file with the .xml extension). Our sample scene was taken on October 28th (20161028) at 15:54:02 (155402). Heads up: the time has to be given as decimal hours in Greenwich Mean Time (GMT). Lucky for us the time in the scene name is in GMT, so we can convert it to decimal hours like this: 15 + 54/60 + 2/3600 = 15.901.
Longitude and latitude refer to the centre of the computational region (which can totally be smaller than the scene), and they have to be in WGS84 decimal coordinates. To grab the coordinates of the centre we can run:
g.region -bg
The longitude and latitude of the centre land in ll_clon and ll_clat. In our case, ll_clon=-78.691 and ll_clat=35.749.
3. Atmospheric model
We get to pick between all the atmospheric models listed at the beginning of this manual. For North Carolina we can choose 2 β midlatitude summer π
4. Aerosol model
Same deal, we choose between all the aerosol models defined at the beginning of this manual. For North Carolina we can choose 1 β continental model β¨
5. Visibility or Aerosol Optical Depth
For Sentinel-2 scenes the visibility isn't measured, so instead we have to estimate the aerosol optical depth, e.g. from AERONET. With a bit of luck you'll find a station near your location that measured the Aerosol Optical Depth at 500 nm at the exact same time the scene was taken π In our case, on 28th October 2016, the EPA-Res_Triangle_Pk station measured AOD = 0.07 (approximately).
6. Mean target elevation above sea level
Mean target elevation above sea level means the mean elevation of the computational region. You can estimate it from the digital elevation model, e.g. by running:
r.univar -g elevation
The mean elevation lands in mean. In our case, mean=110. In the 6S file it will be displayed in [-km], i.e., -0.110.
- Sensor height β bestie, the sensor is literally up on a satellite, so this value is just
-1000. That's the whole vibe. π°οΈ - Sensor band β the full lineup of satellite bands lives in table F (peep it up above βοΈ). For Sentinel-2A the band numbers run
166to178, and for Sentinel-2B they run179to191. Slay.
Okay so here's what the 6S file would actually look like for Band 02 of our scene π. To use it in the i.atcorr module we can just save it as a text file, for example params_B02.txt.
25
10 28 15.901 -78.691 35.749
2
1
0
0.07
-0.110
-1000
167
Compute atmospheric correction β¨
Next step, we run i.atcorr for the selected band B02 of our Sentinel 2 scene. We gotta specify these parameters:
input= the raster band we're processing,parameters= path to the 6S file we just made (we could also type the values in directly, no cap),output= the name for the output corrected raster band,range= from1to theQUANTIFICATION_VALUEstored in the metadata file. It's10000for both Sentinel-2A and Sentinel-2B π―rescale= the output range of values for the corrected bands. This one's up to you, bestie β like0-255,0-1,1-10000, whatever fits your vibe.
And if the data is available, you can also specify:
elevation= raster of digital elevation model,visibility= raster of visibility model.
So finally, here's how the command looks to apply atmospheric correction to band B02 πΈ:
i.atcorr input=B02 parameters=params_B02.txt output=B02.atcorr range=1,10000 rescale=0,255 elevation=elevation
To apply atmospheric correction to the rest of the bands, literally only the last line in the 6S parameters file (i.e., the sensor band) needs to change π. Every other parameter stays the same.
Figure: Sentinel-2A Band 02 with applied atmospheric correction (histogram equalization grayscale color scheme)
Atmospheric correction of a Landsat-7 band π
This example is also based on the North Carolina sample dataset (GMT -5 hours). First we set the computational region to the satellite map, e.g. band 4:
g.region raster=lsat7_2002_40 -p
It's important to verify the available metadata for the sun position, because it has to be defined for the atmospheric correction βοΈ. One option is to check the satellite overpass time with sun position as reported in the metadata file (file copy; North Carolina sample dataset). In the case of the North Carolina sample dataset, these values have been stored for each channel and can be retrieved with:
r.info lsat7_2002_40
In this case, we have: SUN_AZIMUTH = 120.8810347, SUN_ELEVATION = 64.7730999.
If the sun position metadata are unavailable, we can also calculate them from the overpass time as follows (r.sunmask uses SOLPOS):
r.sunmask -s elev=elevation out=dummy year=2002 month=5 day=24 hour=10 min=42 sec=7 timezone=-5
# .. reports: sun azimuth: 121.342461, sun angle above horz.(refraction corrected): 65.396652
If the overpass time is unknown, use the NASA LaRC Satellite Overpass Predictor.
Convert digital numbers (DN) to radiance at top-of-atmosphere (TOA) π¦
For Landsat and ASTER, the conversion can be conveniently done with i.landsat.toar or i.aster.toar, respectively π
.
In case of different satellites, the conversion of DN (digital number = pixel values) to radiance at top-of-atmosphere (TOA) can also be done manually, using e.g. the formula:
# formula depends on satellite sensor, see respective metadata
LΞ» = ((LMAXΞ» - LMINΞ»)/(QCALMAX-QCALMIN)) * (QCAL-QCALMIN) + LMINΞ»
where,
LΞ»= Spectral Radiance at the sensor's aperture in Watt/(meter squared * ster * Β΅m), the apparent radiance as seen by the satellite sensor;QCAL= the quantized calibrated pixel value in DN;LMINΞ»= the spectral radiance that is scaled toQCALMINin watts/(meter squared * ster * Β΅m);LMAXΞ»= the spectral radiance that is scaled toQCALMAXin watts/(meter squared * ster * Β΅m);QCALMIN= the minimum quantized calibrated pixel value (corresponding toLMINΞ») in DN;QCALMAX= the maximum quantized calibrated pixel value (corresponding toLMAXΞ») in DN=255.
LMINΞ» and LMAXΞ» are the radiances related to the minimal and maximal DN value, and they are reported in the metadata file of each image π«Ά. High gain or low gain is also reported in the metadata file of each satellite image. For Landsat ETM+, the minimal DN value (QCALMIN) is 1 (see Landsat handbook, chapter 11), and the maximal DN value (QCALMAX) is 255. QCAL is the DN value for every separate pixel in the Landsat image.
We extract the coefficients and apply them in order to obtain the radiance map:
CHAN=4
r.info lsat7_2002_${CHAN}0 -h | tr β\nβ β β | sed βs+ ++gβ | tr β:β β\nβ | grep "LMIN_BAND${CHAN}\|LMAX_BAND${CHAN}"
LMAX_BAND4=241.100,p016r035_7x20020524.met
LMIN_BAND4=-5.100,p016r035_7x20020524.met
QCALMAX_BAND4=255.0,p016r035_7x20020524.met
QCALMIN_BAND4=1.0,p016r035_7x20020524.met
Conversion to radiance (this calculation is done for band 4, for the other bands, the numbers will need to be replaced with their related values):
r.mapcalc "lsat7_2002_40_rad = ((241.1 - (-5.1)) / (255.0 - 1.0)) * (lsat7_2002_40 - 1.0) + (-5.1)"
Again, the r.mapcalc calculation is only needed when working with satellite data other than Landsat or ASTER.
Create the parameters file for i.atcorr π
The underlying 6S model is parametrized through a control file, indicated with the parameters option. This is a text file defining geometrical and atmospherical conditions of the satellite overpass β¨. Here we create a control file icnd_lsat4.txt for band 4 (NIR), based on metadata. For the overpass time, we need to define decimal hours:
10:42:07 NC local time = 10.70 decimal hours (decimal minutes: 42 * 100 / 60) which is 15.70 GMT.
8 - geometrical conditions=Landsat ETM+
5 24 15.70 -78.691 35.749 - month day hh.ddd longitude latitude ("hh.ddd" is in GMT decimal hours)
2 - atmospheric model=midlatitude summer
1 - aerosols model=continental
50 - visibility [km] (aerosol model concentration)
-0.110 - mean target elevation above sea level [km]
-1000 - sensor on board a satellite
64 - 4th band of ETM+ Landsat 7
Finally, run the atmospheric correction (-r for reflectance input map; -a for date > July 2000):
i.atcorr -r -a lsat7_2002_40_rad elevation=elevation parameters=icnd_lsat4.txt output=lsat7_2002_40_atcorr
Note that the altitude value from 'icnd_lsat4.txt' file is read at the beginning to compute the initial transform. Therefore, it is necessary to provide a value that might be the mean value of the elevation model (r.univar elevation). For the atmospheric correction per se, the elevation values from the raster map are used π
Note that the process is computationally intensive π. Note also, that i.atcorr reports solar elevation angle above horizon rather than solar zenith angle.
π REMAINING DOCUMENTATION ISSUES π
The influence and importance of the visibility value or map should be explained, also how to obtain an estimate for either visibility or aerosol optical depth at 550nm. (Yeah bestie, this part is still a TODO π« )
π REFERENCES π
- Vermote, E.F., Tanre, D., Deuze, J.L., Herman, M., and Morcrette, J.J., 1997, Second simulation of the satellite signal in the solar spectrum, 6S: An overview., IEEE Trans. Geosc. and Remote Sens. 35(3):675-686.
- 6S Manual: PDF1, PDF2, and PDF3
- RapidEye sensors have been provided by RapidEye AG, Germany
- Barsi, J.A., Markham, B.L. and Pedelty, J.A., 2011, The operational land imager: spectral response and spectral uniformity., Proc. SPIE 8153, 81530G; doi:10.1117/12.895438
π SEE ALSO π
GRASS Wiki page about Atmospheric correction
i.aster.toar, i.colors.enhance, i.landsat.toar, r.info, r.mapcalc, r.univar
π AUTHORS π
Original version of the program for GRASS 5: Christo Zietsman, 13422863(at)sun.ac.za
Code clean-up and port to GRASS 6.3, 15.12.2006: Yann Chemin, ychemin(at)gmail.com
Documentation clean-up + IRS LISS sensor addition 5/2009: Markus Neteler, FEM, Italy
ASTER sensor addition 7/2009: Michael Perdue, Canada
AVNIR, IKONOS sensors addition 7/2010: Daniel Victoria, Anne Ghisla
RapidEye sensors addition 11/2010: Peter LΓΆwe, Anne Ghisla
VGT1 and VGT2 sensors addition from 6SV-1.1 sources, addition 07/2011: Alfredo Alessandrini, Anne Ghisla
Added Landsat 8 from NASA sources, addition 05/2014: Nikolaos Ves
Geoeye1 addition 7/2015: Marco Vizzari
Worldview3 addition 8/2016: Markus Neteler, mundialis.de, Germany
Sentinel-2A addition 12/2016: Markus Neteler, mundialis.de, Germany
Sentinel-2B addition 1/2018: Stefan Blumentrath, Zofie Cimburova, Norwegian Institute for Nature Research, NINA, Oslo, Norway
Worldview4 addition 12/2018: Markus Neteler, mundialis.de, Germany
AVIRIS/Hyperion addition 11/2023: Yann Chemin, SOPHIA Engineering, FR
π» SOURCE CODE π»
Available at: i.atcorr source code (history)
Accessed: Saturday Jan 17 05:41:49 2026
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
And that's a wrap, bestie!! π This whole thing came from the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and we snagged it on Saturday Jan 17 05:41:49 2026 β version GRASS 8.4.2, page i.atcorr(1). Obsessed. Periodt. π
β¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms