IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> Python知识库 -> 【SEBAL模型代码搬运】 -> 正文阅读

[Python知识库]【SEBAL模型代码搬运】

最近要开始学习SEBAL模型了,记录一下学习历程。今天在github上看到了,分享如下,感谢作者Rafael Tieppo:

参考文献与代码下载:

《SEBAL model by means GRASS and PYTHON》
在这里插入图片描述

SEBAL model by means GRASS and PYTHON

DOI

Motivation

Now days it is noticed several occurrences about water shortage in agriculture, decreasing yield crops and profits. The irrigation system is a resource to aid the farmers to manage the system production to achieve a reasonable yield. Among several variables for a irrigation management, there are two of them with a major importance, the crop coefficient (kc) and Reference crop evapotranspiration (ETo) (Gondim et al., 2005).

In the last decades the remote sensing techniques has been used to identify landscapes, soil classes, and water energy balance as well, providing conditions to analyze data in a regional scale. By means orbital sensors and algorithms to convert digital numbers to reflectance and radiation flux, remotesensing methods to predict the evapotranspiration is a important tool to handle the hydrological cycle (Bernardo et al., 2006).

The SEBAL (Surface Energy Balance Algorithm for Land) uses the surface energy balance to predict some hydrological features (evapotranspiration, water deficit, etc) and Its main creator is Professor Wim G. M. Bastiaanssen (Bastiaanssen et al., 1998). That method has been validated under several conditions for different locations ((Bastiaanssen, 2000),(Bastiaanssen et al., 2002), (Santos et al., 2010)).

There are several available algorithms to evapotranspiration prediction ((Wolff, 2016), (Cavalcante et al., 2016), (Hessels et al., 2017)). However is missing a specific code to run on python 3 and GRASS 74. Thus we aimed to implement SEBAL model for Landsat 8 iamges using the language Python version 3 (Rossum, 1995) and GRASS version 7.4 (Neteler et al., 2012).

Requirements

Make sure your system has Python Libraries:

  • math
  • numpy
  • os
  • grass_session
  • grass.script
  • osgeo

NOTE: About packages instalation

  • The packs math and os are standard in Python3
  • To install numpy, you may use:
    pip3 install numpy
  • To install grass_session and grass.script, you may use:
    pip3 install grass-session
  • osgeo is from gdal. Thus you may install gdal:
    • if you don't have gdal 1.11 already installed:
      sudo apt-get install gdal-bin python-gdal python3-gdal
    • if you want only gdal for python3:
      sudo apt-get install python3-gdal

How to use

  1. Download at Landsat 8 images (LS8 - OLI/TIRS)
  2. Reproject all the images (LS8 images) for the interested coordinate reference system (e.g. EPSG:32721)
  3. For all images remove null values
  4. Get Digital Elevation Model (DEM) from ASTER
  5. You must reproject the DEM file for the same coordinate reference system of interest, rename it as MDT_Sebal.TIF
  6. Create a GRASS Session with GRASS-GIS software. You need to assign GRASS location and GRASS Mapset. Note that all maps must have the same coordinate reference system (projection). For further information about GRASS you can check GRASS-GIS.
  7. Make sure that all files are in the same folder, SEBAL_v10.py inclusive.
  8. Launch a text editor file and open SEBAL_v10.py. Find the lines 67, 68, 69, you will find:
PERMANENT.open(gisdb='/home/rafatieppo/Documents/QGIS_SEBAL/20170904/',
               location='sirgas2000utm21s',
               create_opts='EPSG:31981')

Replace the text between quotes, e.g.:

PERMANENT.open(gisdb='path for YOUR files',
               location='YOUR folder location',
               create_opts='YOUR reference coordinate system')

after that, save and close it.

  1. If use Linux launch the Terminal, or if are Windows user launch DOS Prompt. Once you are in correct folder (that one with all your files) just run python SEBAL_v10.py, and insert the required values.

Notes

  • Tested on Ubuntu 16.04 LTS
  • Tested on Ubuntu 18.04 LTS

References

Bastiaanssen, W.G.M., 2000. SEBAL-based sensible and latent heat fluxes in the irrigated Gediz Basin, Turkey. Journal of Hydrology 229, 87–100. https://doi.org/https://doi.org/10.1016/S0022-1694(99)00202-4

Bastiaanssen, W.G.M., Ahmad, M.-u.-D., Chemin, Y., 2002. Satellite surveillance of evaporative depletion across the Indus Basin. Water Resources Research 38, 9–1–9–9. https://doi.org/10.1029/2001WR000386

Bastiaanssen, W.G.M., Menenti, M., Feddes, R.A., Holtslag, A.A.M., 1998. A remote sensing surface energy balance algorithm for land (SEBAL). 1. Formulation. Journal of Hydrology 212-213, 198–212. https://doi.org/https://doi.org/10.1016/S0022-1694(98)00253-4

Bernardo, S., Soares, A.A., Mantovani, E.C., 2006. Manual de irriga??o, 8th ed. UFV, Vi?osa.

Cavalcante, L.B., Inácio, A. da S., Barros, H.G., Jiménez, Nicácio, R.M., Coelho, S.M.S. da C., 2016. Cálculo do saldo de radia??o pelo algoritmo sebal na por??o do baixo-médio S?o Francisco, Brasil, utilizando um software de código livre. Revista Brasileira de Cartografia 1515–1529.

Gondim, R., Teixeira, A.d.S., Barbosa, F., 2005. Novo paradigma para a água e coeficientes de cultivos aplicados à gest?o de recursos hídricos em nível de bacia hidrográfica. Revista Item Irriga??o e Tecnologia 14–18.

Hessels, T., Opstal, J. van, Trambauer, P., Bastiaanssen, W., Smiej, M.F., Mohamed, Y., Er-Raji, A., 2017. pySEBAL_3.3.8.

Neteler, M., Bowman, M.H., Landa, M., Metz, M., 2012. GRASS GIS: a multi-purpose Open Source GIS. Environmental Modelling & Software 31, 124–130. https://doi.org/10.1016/j.envsoft.2011.11.014

Rossum, G. van, 1995. Python tutorial (No. CS-R9526). Centrum voor Wiskunde en Informatica (CWI), Amsterdam.

Santos, T.V. dos, Fontana, D.C., Alves, R.C.M., 2010. Avalia??o de fluxos de calor e evapotranspira??o pelo modelo SEBAL com uso de dados do sensor ASTER. Pesquisa Agropecuária Brasileira 45, 488–496. https://doi.org/10.1590/S0100-204X2010000500008

Wolff, W., 2016. wwolff7/SEBAL_GRASS. https://doi.org/10.5281/zenodo.167350

  Python知识库 最新文章
Python中String模块
【Python】 14-CVS文件操作
python的panda库读写文件
使用Nordic的nrf52840实现蓝牙DFU过程
【Python学习记录】numpy数组用法整理
Python学习笔记
python字符串和列表
python如何从txt文件中解析出有效的数据
Python编程从入门到实践自学/3.1-3.2
python变量
上一篇文章      下一篇文章      查看所有文章
加:2022-08-19 19:00:11  更:2022-08-19 19:01:34 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年12日历 -2024/12/26 15:17:46-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码
数据统计