Skip to content

Instantly share code, notes, and snippets.

View ScottWales's full-sized avatar

Scott Wales ScottWales

  • Bureau of Meteorology
  • Melbourne
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Search ESGF for model runs that contain multiple variables

$ python cmip6-variable-search.py --source_id TaiESM1 --experiment_id ssp126 --variable tas mrro pr evspsbl --frequency mon
                                                                                                  variable_id
mip_era activity_id institution_id source_id experiment_id member_id table_id grid_label version
CMIP6   ScenarioMIP AS-RCEC        TaiESM1   ssp126        r1i1p1f1  Amon     gn         20201124     evspsbl
                                                                                         20201124          pr
                                                                                         20201124         tas
                                                                     Lmon     gn         20201124        mrro
@ScottWales
ScottWales / install_dynlib.sh
Last active October 21, 2020 05:55
Install dynlib at NCI
#!/bin/bash
## Option A - use the central conda environment
# module use /g/data/hh5/public/modules
# module load conda/analysis3
## Option B - use your own conda environment
conda create -c conda-forge -n dynlib python numpy pytest liblapack pytz basemap scipy matplotlib pillow netcdf4 gfortran_impl_linux-64
conda activate dynlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ScottWales
ScottWales / extract_ancil_year.py
Created February 11, 2020 03:50
extract_ancil_year.py
#!/g/data/hh5/public/apps/miniconda3/envs/analysis3-20.01/bin/python
"""
Extract a year of data from a UM ancil file, and use it to create a new periodic ancillary
./extract_ancil_year.py --year=2000 --output=SPARCO3_2000.anc ~access/data/ancil/CMIP5/SPARCO3_1850-2009_L38.anc
"""
import mule
import argparse
#!/bin/bash
set -eux
# Set up your run directory following https://accessdev.nci.org.au/trac/wiki/access/ACCESS1.0_raijin
# Also add oasis3 to submodels/ with 'svn co https://access-svn.nci.org.au/svn/oasis/branches/oasis3_cmip5'
# Number of processors CICE will be assigned
CICE_PROCS=6
# Clear the environment file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.