Skip to content

Instantly share code, notes, and snippets.

View philippemiron's full-sized avatar
❤️‍🩹
Kaizen

Philippe Miron philippemiron

❤️‍🩹
Kaizen
View GitHub Profile
@philippemiron
philippemiron / seminf_haxby.ipynb
Last active August 12, 2020 02:02
seminf_haxby
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philippemiron
philippemiron / gridded_mwp.ipynb
Last active September 23, 2020 03:47
Transform a scalar defined by country to a regular 2d global map.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philippemiron
philippemiron / cartopy_label.ipynb
Last active October 2, 2020 16:15
Labels and clipping cartopy projection
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philippemiron
philippemiron / cartopy_contourvectors.ipynb
Created April 10, 2021 18:57
example cartopy for contour + vectors (combination of two examples from the doc)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philippemiron
philippemiron / sync_gdp_hourly.sh
Created September 28, 2021 14:34
sync_gdp_hourly.sh
#!/usr/bin/bash
REMOTE_GDP_PATH=/phod/pub/lumpkin/hourly/v1.04/netcdf
LOCAL_GDP_PATH=/YOUR/LOCAL/PATH/
# declare folders list
declare -a folders=("argos_block1"
"argos_block2"
"argos_block3"
import matplotlib
import numpy as np
colors = [[123, 78, 41],
[134, 77, 37],
[124, 80, 38],
[136, 111, 68],
[164, 123, 81],
[200, 175, 142],
[143, 161, 167],
@philippemiron
philippemiron / preprocess.py
Created March 23, 2022 21:14
gdp preprocessing
import xarray as xr
import numpy as np
from datetime import datetime
import pandas as pd
def decode_date(t):
'''
The date format is specified in 'seconds since 1970-01-01 00:00:00' but the missing values
are stored as -1e+34 which is not supported by the default parsing mechanism in xarray
@philippemiron
philippemiron / preprocess.py
Last active March 24, 2022 19:47
preprocess for gdp stage-recipe
import numpy as np
import pandas as pd
from datetime import datetime
def decode_date(t):
'''
The date format is specified in 'seconds since 1970-01-01 00:00:00' but the missing values
are stored as -1e+34 which is not supported by the default parsing mechanism in xarray