Skip to content

Commit 5c0f4bc

Browse files
authored
Merge pull request #121 from IamShubhamGupto/add/gp
GP notebook import
2 parents 8c5d441 + 9d99969 commit 5c0f4bc

11 files changed

+975
-19
lines changed

.github/workflows/deploy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
conda list
4343
- name: 📦 Installing graphviz
4444
uses: ts-graphviz/setup-graphviz@v1
45+
- name: 👀 Check Tensorflow installation
46+
shell: bash -l {0}
47+
run: |
48+
python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
4549
# - name: 📦 Setting up PySR
4650
# shell: bash -l {0}
4751
# run: |

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ title: Learning Machine Learning with Lorenz-96
66
author: The M<sup>2</sup>LInES Community
77
logo: newlogo.png
88

9+
exclude_patterns: ['env/*', '_build/*']
910
# Force re-execution of notebooks on each build.
1011
# See https://jupyterbook.org/content/execute.html
1112
execute:

_toc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ parts:
2121
- file: notebooks/Neural-Network-Saliency-Maps.ipynb
2222
- file: notebooks/Neural-Network-Advection.ipynb
2323
- file: notebooks/random_forest_parameterization.ipynb
24+
- file: notebooks/GP_lorenz96.ipynb
2425
- caption: Data Assimilation with Lorenz-96
2526
chapters:
2627
- file: notebooks/DA_demo_L96.ipynb

conda-linux-64.lock

+18-13
Large diffs are not rendered by default.

environment.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ dependencies:
2323
- pip
2424
- xarray
2525
- pysr
26+
- nomkl

notebooks/DA_methods.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from numba import jit
77

88

9-
@jit
9+
@jit(nopython=False)
1010
def Lin3dvar(ub, w, H, R, B, opt):
1111
# The solution of the 3DVAR problem in the linear case requires
1212
# the solution of a linear system of equations.
@@ -35,7 +35,7 @@ def Lin3dvar(ub, w, H, R, B, opt):
3535
return ua
3636

3737

38-
@jit
38+
@jit(nopython=False)
3939
def ens_inflate(posterior, prior, opt, factor):
4040
inflated = np.zeros(posterior.shape)
4141
n, N = prior.shape
@@ -55,7 +55,7 @@ def ens_inflate(posterior, prior, opt, factor):
5555
return inflated
5656

5757

58-
@jit
58+
@jit(nopython=False)
5959
def EnKF(prior, obs, H, R, B):
6060
# The analysis step for the (stochastic) ensemble Kalman filter
6161
# with virtual observations

notebooks/GP_lorenz96.ipynb

+926
Large diffs are not rendered by default.

notebooks/L96-two-scale-description.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
"name": "python",
341341
"nbconvert_exporter": "python",
342342
"pygments_lexer": "ipython3",
343-
"version": "3.10.9"
343+
"version": "3.9.16"
344344
}
345345
},
346346
"nbformat": 4,

notebooks/L96_model.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from numba import jit
99

1010

11-
@jit
11+
@jit(nopython=False)
1212
def L96_eq1_xdot(X, F, advect=True):
1313
"""
1414
Calculate the time rate of change for the X variables for the Lorenz '96, equation 1:
@@ -33,7 +33,7 @@ def L96_eq1_xdot(X, F, advect=True):
3333
return Xdot
3434

3535

36-
@jit
36+
@jit(nopython=False)
3737
def L96_2t_xdot_ydot(X, Y, F, h, b, c):
3838
"""
3939
Calculate the time rate of change for the X and Y variables for the Lorenz '96, two time-scale

references.bib

+17
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,20 @@ @article{Bach2015
244244
pages = {1-46},
245245
number = {7},
246246
}
247+
248+
@book{Rasmussen_Williams_2005,
249+
title={Gaussian Processes for Machine Learning},
250+
url={http://dx.doi.org/10.7551/mitpress/3206.001.0001},
251+
doi={10.7551/mitpress/3206.001.0001},
252+
publisher={The MIT Press},
253+
author={Rasmussen, Carl Edward and Williams, Christopher K. I.},
254+
year={2005}
255+
}
256+
@book{Bishop2006,
257+
author = {Bishop, Christopher M.},
258+
title = {Pattern Recognition and Machine Learning (Information Science and Statistics)},
259+
year = {2006},
260+
isbn = {0387310738},
261+
publisher = {Springer-Verlag},
262+
address = {Berlin, Heidelberg}
263+
}

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pydot
33
pysindy
44
torch-lr-finder
55
gplearn
6+
gpflow

0 commit comments

Comments
 (0)