From Sentinel 2 TOA to LAI
Project description
Feng Yin
Department of Geography, UCL
ucfafyi@ucl.ac.uk
Here, we use SIAC to do the atmospheric correction of Sentinel 2 TOA reflectance, then use inverse emulator to retrieve LAI from surface recflectance. These code will automatically download Sentinel 2 TOA reflectance data from Copernicus Open Access Hub and do atmospheric correction with SIAC and give per pixel LAI value at 20 meters resolution.
Requirements:
- A NASA Earthdata username and password and can be applied here.
- A Copernicus Open Access Hub username and password and can be applied here
Installation:
- Directly from github to get the most up to date version of it:
pip install https://github.com/MarcYin/S2_TOA_TO_LAI/archive/master.zip
- Using PyPI (This one is generally related to release)
pip install S2-TOA-TO-LAI
- Using anaconda from anaconda for 'better' package managements
conda install -c f0xy -c conda-forge s2-toa-to-lai
To save your time for installing GDAL:
conda uninstall gdal libgdal
conda update --all -c conda-forge
conda install -c conda-forge gdal>2.1,<2.4
Usage
- Using Sentinel 2 tiles directly:
from S2_TOA_TO_LAI import TOA2LAI_S2
TOA2LAI_S2(tiles = ['50SMG'], start='2018-01-02', end='2018-01-03')
- Using LatLon (Lat first then Lon) and this can be a 2D list of latlon:
from S2_TOA_TO_LAI import TOA2LAI_S2
TOA2LAI_S2(latlon = '35.4, 56.2', start='2018-01-02', end='2018-01-03')
- Using polygon from string(s) or (a) vector file(s):
from S2_TOA_TO_LAI import TOA2LAI_S2
aoi = 'POLYGON((115.79984234354565 39.41267418434987,115.81853363330639 39.41267418434987,115.81853363330639 39.42542974293974,115.79984234354565 39.42542974293974,115.79984234354565 39.41267418434987))' # or a vector file
TOA2LAI_S2(aoi = aoi, start='2018-01-02', end='2018-01-03')
You can also specify cloud_cover
but this may lead to losing of S2 observations due to a bad cloud mask from L1C data
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
S2_TOA_TO_LAI-2.0.0.tar.gz
(133.6 kB
view details)
File details
Details for the file S2_TOA_TO_LAI-2.0.0.tar.gz
.
File metadata
- Download URL: S2_TOA_TO_LAI-2.0.0.tar.gz
- Upload date:
- Size: 133.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1.post20200802 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbf2a5b939904fa09d8e0bd17efb544ecaac95833ce0a89a51b371893dae90e3 |
|
MD5 | 1bbb5d2e88dca6181fb239476ed9e568 |
|
BLAKE2b-256 | 7854f82f1d4f562922b7d21940b31ba7bbec4cf3b525ffc619f91395c26b6742 |