From below script:
ds = gdal.Open('../SPI/mar/orig_geotiff/mar_cli_chirps_precip_month1_198101.tif') # Data location
a = ds.ReadAsArray()
nlat,nlon = np.shape(a)
b = ds.GetGeoTransform() #bbox, interval
lon = np.arange(nlon)*b[1]+b[0]| import sys | |
| import numpy as np | |
| import arcpy | |
| import datetime | |
| arcpy.env.overwriteOutput = True | |
| # ---- You need to specify the folder where the tif files reside ---- | |
| src_flder = r"Y:\3days\2017" # just change the year | |
| out_flder = r"Y:\3days\2017_output" # make a result folder to put stuff |
From below script:
ds = gdal.Open('../SPI/mar/orig_geotiff/mar_cli_chirps_precip_month1_198101.tif') # Data location
a = ds.ReadAsArray()
nlat,nlon = np.shape(a)
b = ds.GetGeoTransform() #bbox, interval
lon = np.arange(nlon)*b[1]+b[0]| """ | |
| NAME | |
| download_era5_agromet.py | |
| DESCRIPTION | |
| Download ERA5 Agrometeorological Indicators and save as 1 month data in 1 netCDF file. | |
| REQUIREMENT | |
| You must registered as CDS Copernicus user, and access your profile to get UID and Api Key | |
| You need to install `cdsapi` python package | |
| EXAMPLES | |
| python download_era5_agromet.py |
| # -*- coding: utf-8 -*- | |
| """ | |
| NAME | |
| chirps_dekad_update.py | |
| Update Global CHIRPS's dekad collection in a folder, gunzip, rename and compress | |
| DESCRIPTION | |
| This script will do: | |
| 1. Check the exisiting file in the Dekad folder, match the date `..._YYYY.MM.D.tif` | |
| with collection files in BASE_URL | |
| 2. If the file exist in the Dekad folder, then skipped, proceed to next date. |