This file contains hidden or 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
| # Intake Catalog for the workflow in-progress | |
| plugins: | |
| source: [ module: intake_xarray ] | |
| sources: | |
| cmip6_raw: | |
| description: Catalog of raw CMIP6 GCM data to be cleaned and prepared | |
| metadata: | |
| title: Raw CMIP6 GCM data | |
| parameters: | |
| source_id: |
This file contains hidden or 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
| apiVersion: argoproj.io/v1alpha1 | |
| kind: Workflow | |
| metadata: | |
| generateName: dask-test- | |
| spec: | |
| entrypoint: dask | |
| activeDeadlineSeconds: 1800 # Safety first, kids! | |
| templates: | |
| - name: dask | |
| script: |
This file contains hidden or 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
| """Fill out missing directories in GCS bucket, for gcsfuse. | |
| Looks at blob names in GCS bucket to pull out all implied directories. | |
| Then add a blob directory placeholder - an empty blob for each | |
| directory that doesn't already have a blob. All directories should then | |
| appear when mounted by gcsfuse. | |
| """ | |
| import logging |
This file contains hidden or 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
| # Parse ROOT_PATH subdirectories for netCDF files matching TARGET_GLOB, | |
| # tries to read the file's variable, TARGET_VAR, logs any exception by printing. | |
| import traceback | |
| from pathlib import Path | |
| from netCDF4 import Dataset | |
| ROOT_PATH = "." |
This file contains hidden or 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
| # Parse ROOT_PATH subdirectories for netCDF files matching TARGET_GLOB, | |
| # if file has variable, TARGET_VAR, add "_Encoding" attribute to variable | |
| # with VAR_ENCODING. | |
| from pathlib import Path | |
| from netCDF4 import Dataset | |
| ROOT_PATH = "." | |
| TARGET_VAR = "hierid" |
This file contains hidden or 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
| #! /usr/bin/env python | |
| # 2020-01-16 | |
| # Brewster Malevich <[email protected]> | |
| """Fill out missing directories in GCS bucket (TARGET_BUCKET), for gcsfuse. | |
| Looks at blob names in Google Cloud Storage bucket to pull out all implied | |
| directories. Then add a blob directory placeholder - an empty blob for each | |
| directory that doesn't already have a blob. All directories should then | |
| appear when mounted by gcsfuse. |
This file contains hidden or 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
| from scipy.integrate import odeint | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| # these are our constants | |
| N = 40 # number of variables | |
| F = 8 # forcing | |
| def Lorenz96(x, t): |
This file contains hidden or 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 numpy as np | |
| from scipy.integrate import odeint, solve_ivp | |
| import matplotlib.pyplot as plt | |
| from mpl_toolkits.mplot3d import Axes3D | |
| # Lorenz paramters and initial conditions | |
| sigma, beta, rho = 10, 2.667, 28 | |
| u0, v0, w0 = 0, 1, 1.05 | |
| # Maximum time point and total number of time points |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # 2020-01-02 | |
| # Create a basic GCE disk backup policy (schedule snapshot) and | |
| # apply the policy to GCE disks in a zone. | |
| set -e | |
| TARGET_POLICY="backup-schedule" | |
| ZONE="us-west1-a" | |
| REGION="us-west1" |
This file contains hidden or 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
| # How to manually assign colors to series in a demography plot in burnr | |
| # 2019-09-17 | |
| library(burnr) | |
| library(ggplot2) | |
| data(lgr2) | |
| data(lgr2_meta) |