Skip to content

Instantly share code, notes, and snippets.

@douglatornell
douglatornell / xarray_continental25.ipynb
Created February 15, 2024 21:50
Demonstrate Using xarray to Work with Atmospheric Forcing Datasets
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglatornell
douglatornell / backfill_hdf5-to-netcdf4.sh
Created June 23, 2021 16:28
Script to do HDF5 to netCDF4 conversion of MOHID results in MIDOSS project Monte-Carlo results tree. Created for post-processing of the `north_strait_5th362` batch of runs for which the in-job conversion failed because the `SLURM_TMPDIR` local scratch storage on the node filled.
#!/bin/bash
RESULTS_DIR="/scratch/dlatorne/MIDOSS/runs/monte-carlo/north_strait_5th362_2021-06-14T150753/results/north_strait_5th362"
HDF5_TO_NETCDF4="${HOME}/.local/bin/hdf5-to-netcdf4"
module load python/3.8.2
module load nco/4.9.5
TMPDIR="${SLURM_TMPDIR}"
@douglatornell
douglatornell / VTEProbWaterMask.ipynb
Created June 9, 2020 19:37
Effect of SalishSeaCast NEMO water mask for GeoTIFFs on calculation of monthly VTE probability
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglatornell
douglatornell / NowcastResultsViz.ipynb
Created December 8, 2016 20:27
GoMSS Nowcast Production 08dec16
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglatornell
douglatornell / gist:ca2e978bc1f3a7fc5e10970ce88b5970
Created November 17, 2016 18:47
GoMSS Nowcast Test 14nov16
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Visualize Results of a GoMSS Nowcast Run\n",
"\n",
"A quick collection of plots of results from a 1 day GoMSS nowcast system run."
]
@douglatornell
douglatornell / gist:550c46ebd38c0f627a3e
Last active August 29, 2015 14:16
Notes from plot_thresholds_all() code review on 2015-03-10
from collections import OrderedDict
# Here's a possible data structure to hold constant values for the sites
# that we report ssh for. The outer dict has 2 keys: DFO and NOAA. Each of
# those keys has an OrderedDict as its value. OrderedDicts are defined by
# lists of key-value 2-tuples. Here the keys of the DFO OrderedDict are the
# names of the DFO sites, and the values are a dict of constant values.
# So, iterating over SITES['DFO'].items() will return the constants for
# Point Atkinson, Campbell River, and Victoria, in that order. The Campbell
# River extreme_ssh is accessed by SITES['DFO']['Campbell River']['extreme_ssh'].
{
"metadata": {
"name": "",
"signature": "sha256:9e4150b049ad8b9ee7600a8fe76567ad97f185a1fd5cf7f86f63e60c83795bf7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@douglatornell
douglatornell / gist:2151f2ab1173e7985594
Created September 17, 2014 20:46
Commands to concatenate hourly EC research 2.5km GEM files to create a 1-day forcing file for NEMO
ncrcat -4 -L4 2014091000_00?_2.5km_360x300.nc ../NEMO-atmos/y2014m09d10.nc
ncrcat -4 -L4 -A ../NEMO-atmos/y2014m09d10.nc 2014091000_01?_2.5km_360x300.nc ../NEMO-atmos/y2014m09d10.nc
ncrcat -4 -L4 -A ../NEMO-atmos/y2014m09d10.nc 2014091000_02?_2.5km_360x300.nc ../NEMO-atmos/y2014m09d10.nc
@douglatornell
douglatornell / script_runs_example.py
Created July 22, 2014 16:50
Example of a script to execute a series of Salish Sea NEMO model runs.
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
@douglatornell
douglatornell / WestgridJun2014.ipynb
Last active August 29, 2015 14:02
Analysis of Jun-2014 Salish Sea NEMO runtime profile tests on westgrid.ca machines
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.