Skip to content

Instantly share code, notes, and snippets.

View tobeycarman's full-sized avatar

tobey tobeycarman

  • anchorage, ak
View GitHub Profile
@tobeycarman
tobeycarman / base_topic_restart_comparison_plots.py
Created June 6, 2023 21:29
Scripts for testing and comparing dvmdostem runs between two branches.
#!/usr/bin/env python
# June 2023
# H. Genet - initial framework
# T. Carman - adjustments for slightly different plots, re-usable,
# consistent formatting
import xarray as xr
import os
import glob
@tobeycarman
tobeycarman / driver.sh
Last active October 21, 2022 17:03
Experiment with using Git as a data storage mechanism.
#!/bin/bash
# October 2022, T Carman
# Quick experiment inspired by conversation with PJW about using git
# to store station data. This attempts to mock up an example and see if we
# can make any measurements and inferences about how fast the DB might grow.
# User should set this...
#!/usr/bin/env python
import os
from os.path import exists
import netCDF4 as nc
import pandas as pd
import numpy as np
import xarray as xr
import argparse
@tobeycarman
tobeycarman / quick_dvmdostem_docker_notebook_demo.ipynb
Last active September 10, 2021 05:53
Example of running dvmdostem in a docker container via a jupyter notebook that is also running in the same docker container.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tobeycarman
tobeycarman / sensitivity_analysis_demo_non_docker.ipynb
Created September 2, 2021 19:40
Basic Sensitivity analysis using dvmdostem without docker.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# Tobey Carman
# March 2018
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import netCDF4 as nc
import numpy as np
@tobeycarman
tobeycarman / kmz2kml.py
Created May 24, 2018 22:09
Create KML files from KMZ files
#!/usr/bin/env python
# T. Carman, 2018
# Opens a bunch of kmzs with a place marker each
# and prints the lat and lon
from zipfile import ZipFile
import os
#!/usr/bin/env python
# Scripts for creating plots for AGU 2017 poster with E.Euskirchen and S.Serbin.
#
# Runs were done on modex.
# Results copied to OSX machine for running this script.
'''
SIMARR=("2000000821" "2000000821" "2000000822")
@tobeycarman
tobeycarman / calibration_targets.py
Last active September 14, 2017 23:23
joys_calibrations
#!/usr/bin/env python
# could add code here to load up calibration_targets variable from the
# contents of an excel file...? or just plain csv?
calibration_targets = {
## WARNING: JUNK, PLACEHOLDER VALUES! USE AT YOUR OWN RISK!
"BLANK": {
'cmtnumber': 0,
# pft0 pft1 pft2 pft3 pft4 pft5 pft6 pft7 pft8 pft9
#!/usr/bin/env python
# Sept 2015
# Tobey Carman
#
# A quick 'n dirty hack attempt at some exif processing/reporting.
# Orignially written for Erin Whorton's work at the Alaska Division
# of Geological and Geophysical Surveys.