.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_skewsurge.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_skewsurge.py: Skew surge examples =================== .. GENERATED FROM PYTHON SOURCE LINES 6-27 .. image:: /gallery/images/sphx_glr_plot_skewsurge_001.png :alt: plot skewsurge :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none solve: matrix prep ... solution ... diagnostics ... done. prep/calcs ... done. | .. code-block:: default import pandas as pd import toto import matplotlib.pyplot as plt from toto.inputs.nc import NCfile import os # read the file filename='https://raw.githubusercontent.com/calypso-science/Toto/master/_tests/nc_file/elevation.nc' os.system('wget %s '% filename) df=NCfile('elevation.nc')._toDataFrame() # Processing df_new=df[0].TideAnalysis.skew_surge(mag='elev40',args={'latitude':-36}) # Plot the results fig, ax = plt.subplots(1) ax.plot(df[0].index,df[0]['elev40'],label='Elevation') ax.plot(df_new.index,df_new['skew_surge'],label='Skew surge') ax.legend() fig.autofmt_xdate() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.962 seconds) .. _sphx_glr_download_gallery_plot_skewsurge.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_skewsurge.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_skewsurge.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_