Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmbertr committed Nov 8, 2023
2 parents 1ed3316 + 55ddb4c commit 56cb719
Show file tree
Hide file tree
Showing 24 changed files with 160 additions and 152 deletions.
231 changes: 134 additions & 97 deletions notebooks/alboran_sea.ipynb

Large diffs are not rendered by default.

75 changes: 26 additions & 49 deletions notebooks/alboran_sea/alboran_sea.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@ def compute_norm_vorticity(u: np.ndarray, v: np.ndarray, dy_u: np.ndarray, dx_v:
## Input data

In this example, we use NEMO model outputs (SSH and velocities), stored in several netCDF files.
Data can be downloaded [here](https://1drv.ms/f/s!Aq7KsFIdmDGepjMT6o77ko-JRRZu?e=hpxeKa), and the files stored inside the `data` folder.

Measurements are located on a C-grid.

Data can be downloaded [here](https://ige-meom-opendap.univ-grenoble-alpes.fr/thredds/fileServer/meomopendap/extract/MEOM/jaxparrow/alboransea.tar.gz), and the files extracted to the `data` folder.
The next cell does this for you, assuming wget and tar are available.


```python
!wget -P data https://ige-meom-opendap.univ-grenoble-alpes.fr/thredds/fileServer/meomopendap/extract/MEOM/jaxparrow/alboransea.tar.gz
!tar -xzf data/alboransea.tar.gz -C data
!rm data/alboransea.tar.gz
```


```python
data_dir = "data"
Expand Down Expand Up @@ -146,7 +154,7 @@ plt.show()



![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_14_0.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_15_0.png?raw=true)



Expand Down Expand Up @@ -218,25 +226,20 @@ plt.colorbar(im, ax=ax2)



<matplotlib.colorbar.Colorbar at 0x147915af0>





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_19_1.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_20_1.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_19_2.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_20_2.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_19_3.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_20_3.png?raw=true)



Expand All @@ -251,8 +254,6 @@ Cyclogeostrophic velocities are computed via the `cyclogeostrophy` function, usi
u_var, v_var = cyclogeostrophy(u_geos, v_geos, dx_u, dx_v, dy_u, dy_v, coriolis_factor_u, coriolis_factor_v)
```

100%|██████████| 2000/2000 [00:03<00:00, 528.08it/s]



```python
Expand Down Expand Up @@ -309,25 +310,20 @@ plt.colorbar(im, ax=ax2)



<matplotlib.colorbar.Colorbar at 0x141d70c10>





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_25_1.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_26_1.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_25_2.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_26_2.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_25_3.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_26_3.png?raw=true)



Expand All @@ -340,8 +336,6 @@ We use the same function, but with the argument `method="iterative"`.
u_penven, v_penven = cyclogeostrophy(u_geos, v_geos, dx_u, dx_v, dy_u, dy_v, coriolis_factor_u, coriolis_factor_v, method="iterative")
```

100%|██████████| 100/100 [00:00<00:00, 431.61it/s]



```python
Expand Down Expand Up @@ -398,25 +392,20 @@ plt.colorbar(im, ax=ax2)



<matplotlib.colorbar.Colorbar at 0x16a0ac220>





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_30_1.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_31_1.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_30_2.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_31_2.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_30_3.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_31_3.png?raw=true)



Expand All @@ -429,8 +418,6 @@ We use the same function, but with the arguments `method="iterative"`, and `use_
u_ioannou, v_ioannou = cyclogeostrophy(u_geos, v_geos, dx_u, dx_v, dy_u, dy_v, coriolis_factor_u, coriolis_factor_v, method="iterative", use_res_filter=True)
```

100%|██████████| 100/100 [00:00<00:00, 343.00it/s]



```python
Expand Down Expand Up @@ -487,25 +474,20 @@ plt.colorbar(im, ax=ax2)



<matplotlib.colorbar.Colorbar at 0x16a7a5fa0>





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_35_1.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_36_1.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_35_2.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_36_2.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_35_3.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_36_3.png?raw=true)



Expand Down Expand Up @@ -556,24 +538,19 @@ plt.colorbar(im, ax=ax2)



<matplotlib.colorbar.Colorbar at 0x295ae7ee0>





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_37_1.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_38_1.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_37_2.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_38_2.png?raw=true)





![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_37_3.png?raw=true)
![png](https://github.com/meom-group/jaxparrow/blob/main/notebooks/alboran_sea/output_38_3.png?raw=true)


File renamed without changes
Binary file removed notebooks/alboran_sea/output_19_3.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added notebooks/alboran_sea/output_20_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed notebooks/alboran_sea/output_25_3.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added notebooks/alboran_sea/output_26_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed notebooks/alboran_sea/output_30_3.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added notebooks/alboran_sea/output_31_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed notebooks/alboran_sea/output_35_3.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added notebooks/alboran_sea/output_36_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed notebooks/alboran_sea/output_37_3.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added notebooks/alboran_sea/output_38_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions notebooks/gaussian_eddy/gaussian_eddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ u_cyclo_est, v_cyclo_est = cyclogeostrophy(u_geos, v_geos, dXY, dXY, dXY, dXY, c
azim_cyclo_est = ge.compute_azimuthal_magnitude(u_cyclo_est, v_cyclo_est)
```

100%|██████████| 2000/2000 [00:04<00:00, 480.53it/s]

```python
vmax = np.max([azim_cyclo, azim_cyclo_est])
_, (ax1, ax2) = plt.subplots(1, 2, figsize=(20, 8))
Expand Down Expand Up @@ -234,8 +232,6 @@ u_cyclo_est, v_cyclo_est = cyclogeostrophy(u_geos, v_geos, dXY, dXY, dXY, dXY, c
azim_cyclo_est = ge.compute_azimuthal_magnitude(u_cyclo_est, v_cyclo_est)
```

4%|▍ | 4/100 [00:00<00:00, 713.89it/s]

```python
vmax = np.max([azim_cyclo, azim_cyclo_est])
_, (ax1, ax2) = plt.subplots(1, 2, figsize=(20, 8))
Expand Down Expand Up @@ -279,8 +275,6 @@ u_cyclo_est, v_cyclo_est = cyclogeostrophy(u_geos, v_geos, dXY, dXY, dXY, dXY, c
azim_cyclo_est = ge.compute_azimuthal_magnitude(u_cyclo_est, v_cyclo_est)
```

4%|▍ | 4/100 [00:00<00:00, 1861.45it/s]

```python
vmax = np.max([azim_cyclo, azim_cyclo_est])
_, (ax1, ax2) = plt.subplots(1, 2, figsize=(20, 8))
Expand Down

0 comments on commit 56cb719

Please sign in to comment.