Skip to content

Instantly share code, notes, and snippets.

View prl900's full-sized avatar

Pablo Rozas Larraondo prl900

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Time,Drought Index,Category,Precipitation (mm),Maximum Temperature (℃),Soil Moisture (vol/vol),Evapotranspiration (mm)
Jan-2016,0.59,Slightly Wet,54.79,43,0.13,34.46
Feb-2016,0.26,Near Normal,2.96,42,0.06,29.94
Mar-2016,-0.10,Near Normal,9.01,39,0.09,9.71
Apr-2016,0.08,Near Normal,3.35,38,0.08,5.49
May-2016,0.43,Near Normal,47.52,30,0.16,22.36
Jun-2016,0.54,Slightly Wet,95.95,24,0.26,27.2
Jul-2016,1.22,Moderately wet,15.05,27,0.17,40.19
Aug-2016,1.01,Moderately wet,25.40,26,0.16,50.59
Sep-2016,0.87,Moderately wet,79.71,26,0.23,64.96
Unnamed: 0 Drought_Index_Value Category rainfall temperature
0 2002-01-15 5.94712826570923 42.25331232774736
1 2002-02-15 58.34421719221458 40.6786152429228
2 2002-03-15 10.539968537918513 42.141793822041656
3 2002-04-15 17.219905600778276 34.57716753499701
4 2002-05-15 -0.234805081655276 WD 2.4984264368386286 27.980472078480933
5 2002-06-15 -0.582560138968759 D0 7.943430364542263 27.095594024958338
6 2002-07-15 -0.8127054901053521 D1 1.9243902496929106 24.85682924482224
7 2002-08-15 -0.634472858405265 D0 9.407553114483527 31.762415415465973
8 2002-09-15 -0.17496025851634397 WD 13.615184906814427 35.81514557509043
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import datacube
import sys
import itertools
import numpy as np
import os
from datacube.drivers.netcdf import write_dataset_to_netcdf
# Code from: https://ncar.github.io/xdev/posts/writing-multiple-netcdf-files-in-parallel-with-xarray-and-dask/
def split_by_chunks(dataset):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.