This gist contains an example analysis script, along with a list of dependencies. It uses data from a simulation I ran for Clark et al. (2020) and shows how one might compute and plot a lag-regression sequence of precipitation for South Asian monsoon low pressure systems.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dask.array as darray | |
import numpy as np | |
import xarray as xr | |
from collections import defaultdict | |
def _matmul(arr1, arr2): | |
if isinstance(arr1, darray.core.Array): | |
return darray.matmul(arr1, arr2) |
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.
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.
Yet another wrapper for pyspharm...
Existing wrappers, windspharm and animal-spharm, lack dask support to parallelize operations. This wrapper enables use of dask at least for a subset of functions provided by pyspharm needed for computing closed tracer budgets following the methods of
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= test session starts ============================== | |
platform darwin -- Python 3.6.6, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- //anaconda/envs/xarray-dev-37/bin/python | |
cachedir: .pytest_cache | |
rootdir: /Users/spencerclark/cftime-resample-simplifications, inifile: | |
collecting ... collected 64 items | |
test_first_items_current.py::test_first_items[downsampling-0-left-left-11M] PASSED [ 1%] | |
test_first_items_current.py::test_first_items[downsampling-0-left-left-8001H] PASSED [ 3%] | |
test_first_items_current.py::test_first_items[downsampling-0-left-left-600003T] PASSED [ 4%] | |
test_first_items_current.py::test_first_items[downsampling-0-left-left-3MS] PASSED [ 6%] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder