Last active
August 15, 2019 22:19
-
-
Save matt-long/6e6e252ea7900d6f123f8ad7583242d6 to your computer and use it in GitHub Desktop.
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
__pycache__/* | |
*.png |
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
#!/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 |
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
#! /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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment