Skip to content

Instantly share code, notes, and snippets.

View callumrollo's full-sized avatar
🇸🇪

Callum Rollo callumrollo

🇸🇪
View GitHub Profile
@callumrollo
callumrollo / gsw_02_test.py
Last active December 11, 2021 20:35
Testing lat/lon sensitivy of gsw o2 calculation
import xarray as xr
import gsw
import numpy as np
import matplotlib.pyplot as plt
data = xr.open_dataset('/home/callum/Documents/data-flow/raw-to-nc/pyglider-c-proof/example-seaexplorer/L0-timeseries/dfo-eva035-20190718.nc')
data['oxygen_concentration_uncorr'] = data['oxygen_concentration'].copy()
ref_sal =0
def cor_oxy(data, lon, lat, label):
@callumrollo
callumrollo / gsoc-report.md
Created August 20, 2021 16:40
Report for Googel Summer of Code 2021
@callumrollo
callumrollo / gebco_to_json.py
Last active January 17, 2021 16:00
Extract GEBCO isobaths from a geographic area and export them to geoJSON files
from pathlib import Path
import xarray as xr
import numpy as np
import os
import matplotlib.pyplot as plt
import json
from shapely.geometry import LineString
import geopandas as gpd
path_to_gebco_nc = '/media/callum/storage/Documents/global_datasets/GEBCO_2019/GEBCO_2019.nc'