.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/example_parcels.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_example_parcels.py: Analysing output from Parcels (Zarr format) =========================================== .. GENERATED FROM PYTHON SOURCE LINES 5-16 .. image-sg:: /gallery/images/sphx_glr_example_parcels_001.png :alt: example parcels :srcset: /gallery/images/sphx_glr_example_parcels_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Size: 123kB Dimensions: (trajectory: 100, obs: 61) Coordinates: * obs (obs) int32 244B 0 1 2 3 4 5 6 7 8 ... 53 54 55 56 57 58 59 60 * trajectory (trajectory) int64 800B 700 701 702 703 704 ... 796 797 798 799 Data variables: lat (trajectory, obs) float32 24kB ... lon (trajectory, obs) float32 24kB ... time (trajectory, obs) datetime64[ns] 49kB ... z (trajectory, obs) float32 24kB ... Attributes: Conventions: CF-1.6/CF-1.7 feature_type: trajectory ncei_template_version: NCEI_NetCDF_Trajectory_Template_v2.0 parcels_mesh: spherical parcels_version: 2.4.0 | .. code-block:: Python import matplotlib.pyplot as plt import xarray as xr import trajan as ta ds = xr.open_dataset('../tests/test_data/parcels.zarr', engine='zarr') print(ds) ds.traj.plot(land='mask', margin=2) #ds.mean('trajectory', skipna=True).traj.plot(color='r', label='Mean trajectory') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.257 seconds) .. _sphx_glr_download_gallery_example_parcels.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_parcels.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_parcels.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: example_parcels.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_