This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_cdd_5mm.py | |
| Global IMERG daily indices data extraction | |
| DESCRIPTION | |
| Input data for this script will use IMERG daily data generated by imerg_nc2tif.py | |
| This script can do Consecutive Dry Days (CDD) calculation with threshold 5mm of rainfall as a rainy | |
| PROCESS | |
| (i) Extract IMERG's daily rainfall with value greater/less than 5mm (threshold for a day categoried as rainy day) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_cdd_1mm.py | |
| Global IMERG daily indices data extraction | |
| DESCRIPTION | |
| Input data for this script will use IMERG daily data generated by imerg_nc2tif.py | |
| This script can do Consecutive Dry Days (CDD) calculation with threshold 1mm of rainfall as a rainy day | |
| PROCESS | |
| (i) Extract IMERG's daily rainfall with value greater/less than 1mm (threshold for a day categoried as rainy day) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # google plus level 2 polygons extracted from file previously compiled for MENA/global study | |
| # source https://grid.plus.codes/ | |
| setwd("D:/sm2/MENA/ge") | |
| reg <- "AFR" | |
| iso = "ETH" | |
| x <- as.list(c("sp","sf","rgdal","rgeos","raster","readxl","dplyr","data.table")) | |
| lapply(x, require, character.only = TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| """ | |
| NAME | |
| csvzonal_concat.py | |
| Concatenate CSV files by column, and use the date on filename as column name | |
| DESCRIPTION | |
| Input data for this script will use CSV result from dbf2csv translation | |
| Some notes: | |
| (i) All files required to follow the naming convention "_yyyymmdd.ext" | |
| (ii) ArcGIS Zonal Statistics as Table is use to generate DBF file based on a zone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_daily_indices_5mm.py | |
| Global IMERG daily indices data extraction | |
| DESCRIPTION | |
| Input data for this script will use IMERG Final or Late Run downloaded from NASA website | |
| This script can do: | |
| (i) Dry days | |
| (ii) Wet days |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_nc2tif.py | |
| Global IMERG daily nc4 translation to GeoTIFF. | |
| DESCRIPTION | |
| Input data for this script will use IMERG Final or Late Run downloaded from NASA website. | |
| This script can do translation from nc4 to GeoTIFF. | |
| REQUIREMENT | |
| ArcGIS must installed before using this script, as it required arcpy module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_daily2monthly.py | |
| Global IMERG daily to monthly | |
| DESCRIPTION | |
| Input data for this script will use IMERG daily data generated by imerg_nc2tif.py or other | |
| IMERG-based daily products. Example: daily wetdays to monthly sum, daily cdd to monthly max | |
| REQUIREMENT | |
| ArcGIS must installed before using this script, as it required arcpy module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_monthlystats.py | |
| Global IMERG monthly statistics data, long-term average, max, min and stdev | |
| DESCRIPTION | |
| Input data for this script will use IMERG monthly data generated by imerg_daily2monthly.py | |
| This script can do monthly statistics calculation (AVERAGE, MAXIMUM, MINIMUM and STD) | |
| REQUIREMENT | |
| ArcGIS must installed before using this script, as it required arcpy module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_daily2annual.py | |
| Global IMERG annual rainfall | |
| DESCRIPTION | |
| Input data for this script will use IMERG in GeoTIFF format | |
| This script can do annual cell statistics to get SUM or other stat: MEAN, MAX, MIN and STDEV | |
| REQUIREMENT | |
| ArcGIS must installed before using this script, as it required arcpy module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| imerg_daily_indices_1mm.py | |
| Global IMERG daily indices data extraction | |
| DESCRIPTION | |
| Input data for this script will use IMERG Final or Late Run downloaded from NASA website | |
| This script can do: | |
| (i) Dry days | |
| (ii) Wet days |