Skip to content

Instantly share code, notes, and snippets.

View guiattard's full-sized avatar

Guillaume Attard guiattard

View GitHub Profile
# We build our kriging model:
ok = OrdinaryKriging(V, min_points=2, max_points=10, mode='exact')
# We calculate the hydraulic head on our regular grid,
# and we make the result in a good shape
hh_hat = ok.transform(xx.flatten(), yy.flatten()).reshape(xx.shape)
# We calculate the kriging error on our grid:
s2 = ok.sigma.reshape(xx.shape)
@guiattard
guiattard / pfg6-meteo-1.py
Created April 14, 2022 09:48
pfg6-recharge-ee
# Import precipitation.
pr = (
ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.select("precipitation")
.filterDate(i_date, f_date)
)
# Import potential evaporation PET and its quality indicator ET_QC.
pet = (
ee.ImageCollection("MODIS/006/MOD16A2")
!apt install gdal-bin python-gdal python3-gdal
!pip install fiona shapely pyproj
!apt install python3-rtree
!pip install git+git://github.com/geopandas/geopandas.git
!pip install descartes
!pip install git+https://github.com/python-visualization/folium
import pandas as pd
import geopandas as gpd
import zipfile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.