Skip to content

Instantly share code, notes, and snippets.

@matt-long
Last active August 15, 2019 22:19
Show Gist options
  • Save matt-long/6e6e252ea7900d6f123f8ad7583242d6 to your computer and use it in GitHub Desktop.
Save matt-long/6e6e252ea7900d6f123f8ad7583242d6 to your computer and use it in GitHub Desktop.
__pycache__/*
*.png
#!/bin/bash
#SBATCH -J build-collection
#SBATCH -n 1
#SBATCH --ntasks-per-node=1
#SBATCH -p dav
#SBATCH -A NCGD0011
#SBATCH -t 24:00:00
#SBATCH --mem=1GB
#SBATCH -e %J.out
#SBATCH -o %J.out
if [ -z $MODULEPATH_ROOT ]; then
unset MODULEPATH_ROOT
else
echo "NO MODULEPATH_ROOT TO RESET"
fi
if [ -z $MODULEPATH ]; then
unset MODULEPATH
else
echo "NO MODULEPATH TO RESET"
fi
if [ -z $LMOD_SYSTEM_DEFAULT_MODULES ]; then
unset LMOD_SYSTEM_DEFAULT_MODULES
else
echo "NO LMOD_SYSTEM_DEFAULT_MODULES TO RESET"
fi
source /etc/profile
export TERM=xterm-256color
export HOME=/glade/u/home/mclong
unset LD_LIBRARY_PATH
export PATH=/glade/work/mclong/miniconda3/bin:$PATH
export PYTHONUNBUFFERED=False
export TMPDIR=/glade/scratch/mclong/tmp
source activate analysis
collections=(find collection-definitions -name "*.yml")
for collection in ${collections[@]}; do
args="${collection} --overwrite-existing"
/glade/u/home/mclong/p/ocb2019-talk/build_collection.py ${args}
done
#! /usr/bin/env python
import click
import intake
import intake_esm
@click.command()
@click.argument('collection-input-definition')
@click.option('--overwrite-existing', default=False, is_flag=True)
def main(collection_input_definition, overwrite_existing):
intake.open_esm_metadatastore(collection_input_definition,
overwrite_existing=overwrite_existing)
if __name__ == '__main__':
main()
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment