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
| wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
| chmod +x Miniconda-latest-Linux-x86_64.sh | |
| ./Miniconda-latest-Linux-x86_64.sh |
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
| function jasminsci(){ | |
| # SSH to a specific science node on jasmin | |
| # Note, you need the -t flag for the tunneling, else it fails | |
| ssh -t -A andreww@jasmin-login1.ceda.ac.uk ssh jasmin-sci$1 | |
| } |
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
| # This file may be used to create an environment using: | |
| # $ conda create --name <env> --file <this file> | |
| # platform: osx-64 | |
| _ipyw_jlab_nb_ext_conf=0.1.0=py37_0 | |
| alabaster=0.7.12=py37_0 | |
| anaconda=2019.10=py37_0 | |
| anaconda-client=1.7.2=py37_0 | |
| anaconda-navigator=1.9.7=py37_0 | |
| anaconda-project=0.8.3=py_0 | |
| antlr-python-runtime=4.7.2=py37_1000 |
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
| function jasmin(){ | |
| # SSH to the jasmin-sci3 node (most memory) on jasmin | |
| # with forwarding set up so that it can easily tunnel to a local browser ! | |
| # | |
| # Run with: jasmin PORTNUMBER | |
| ssh -A -XY andreww@jasmin-login1.ceda.ac.uk -L ${1}:localhost:${1} -t ssh -A -XY jasmin-sci3 -L ${1}:localhost:${1} | |
| } |
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
| # Andrew Williams - 2020 | |
| # Written in response to: https://stackoverflow.com/questions/38960903 | |
| import numpy as np | |
| import xarray as xr | |
| # Define a linear trend function to use | |
| def linear_trend(x, y): | |
| pf = np.polyfit(x, y, 1) | |
| return xr.DataArray(pf[0]) |
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 climt | |
| import sympl | |
| import numpy as np | |
| from datetime import timedelta | |
| import os | |
| os.system("rm 1_yr_spinup_nodamping_T42_30vlvl.nc") | |
| ### ----------------------- | |
| # 9th Dec 2019 |
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 climt | |
| import sympl | |
| from datetime import timedelta | |
| import os | |
| os.system("rm 2_yr_spinup_eqpolediff_T42_37vlvl_3damped.nc") | |
| ### ----------------------- | |
| # 10th Dec 2019 | |
| # Script to initialise a simple dry gcm from rest and spin up for one year, |
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
| """ | |
| ================================================================= | |
| March 2020 --- Andrew Williams | |
| ================================================================= | |
| Dictionaries to aid the loading in of variables for | |
| ICON-LAM simulations. | |
| Contains conversions from standard name-->long name | |
| and long name --> standard name. |
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 | |
| import matplotlib.pyplot as plt | |
| from matplotlib.animation import FuncAnimation | |
| # 22/04/2019: Script to plot animation of | |
| # balls falling and bouncing under gravity (in 1-D, for now) | |
| # Set up the plotting area | |
| fig, ax = plt.subplots() | |
| ax.set(xlim=(0, 10), ylim=(0, 10)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer