Commit 0b100fa2 authored by Willi Rath's avatar Willi Rath

Suppress warnings

parent cdd618a9
This source diff could not be displayed because it is too large. You can view the blob instead.
# Using git.geomar.de/data to calculate SSH variance
This example uses version v1.0.0 of <https://git.geomar.de/data/SLTAC_GLO_PHY_L4_REP/> and calculates sea-surface-height variance for the year 1993.
## Preamble
Import a few modules:
......@@ -10,7 +12,12 @@ Import a few modules:
- `seaborn` makes plots nice
- `xarray` will do the calculations and call the plotting
Then, make plots nicer.
```python
# suppress warnings
import warnings
warnings.filterwarnings('ignore')
```
```python
......@@ -45,21 +52,15 @@ file_list = [str(fp) for fp in full_path.glob("1993/*.nc")]
xr.open_mfdataset(file_list).adt.var(dim="time").plot()
```
/home/wrath/TM/software/miniconda3_20170727/envs/py3_std/lib/python3.6/site-packages/dask/array/reductions.py:279: RuntimeWarning: invalid value encountered in true_divide
u = total / n
/home/wrath/TM/software/miniconda3_20170727/envs/py3_std/lib/python3.6/site-packages/dask/array/numpy_compat.py:45: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
<matplotlib.collections.QuadMesh at 0x7feb95eacf28>
<matplotlib.collections.QuadMesh at 0x7f52a2613278>
![png](example_01_SLTAC_adt_variance_local_and_opendap_files/example_01_SLTAC_adt_variance_local_and_opendap_5_2.png)
![png](example_01_SLTAC_adt_variance_local_and_opendap_files/example_01_SLTAC_adt_variance_local_and_opendap_6_1.png)
## OPeNDAP
......@@ -78,19 +79,13 @@ url_list = [base_url.format(file_name=fn) for fn in [p.name for p in full_path.g
xr.open_mfdataset(url_list).adt.var(dim="time").plot()
```
/home/wrath/TM/software/miniconda3_20170727/envs/py3_std/lib/python3.6/site-packages/dask/array/reductions.py:279: RuntimeWarning: invalid value encountered in true_divide
u = total / n
/home/wrath/TM/software/miniconda3_20170727/envs/py3_std/lib/python3.6/site-packages/dask/array/numpy_compat.py:45: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
<matplotlib.collections.QuadMesh at 0x7f52981def28>
<matplotlib.collections.QuadMesh at 0x7feb8e6582b0>
![png](example_01_SLTAC_adt_variance_local_and_opendap_files/example_01_SLTAC_adt_variance_local_and_opendap_8_2.png)
![png](example_01_SLTAC_adt_variance_local_and_opendap_files/example_01_SLTAC_adt_variance_local_and_opendap_9_1.png)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment