opendrift.readers ================= .. py:module:: opendrift.readers .. autoapi-nested-parse:: Readers ======= Readers are responsible for providing Opendrift with data about the `enviornment` of the drifting particles or elements. All readers descend from :class:`.basereader.BaseReader`. A reader generally also descends from one of the few general classes of readers. When writing a new reader consider which one fits your input data best: * :class:`.basereader.continuous.ContinuousReader` * :class:`.basereader.structured.StructuredReader` * :class:`.basereader.unstructured.UnstructuredReader` The `ContinuousReader` is suited for data that can be defined at any point within the domain, or if the reader does its own interpolation internally. E.g. a :class:`synthetic eddy <.reader_ArtificialOceanEddy.Reader>`, or a :class:`constant <.reader_constant.Reader>`. The `StructuredReader` aids in interpolation when creating a reader of data on a :class:`regular grid <.reader_netCDF_CF_generic.Reader>`, while the `UnstructuredReader` provides the basics for :class:`irregularily gridded data <.reader_netCDF_CF_unstructured.Reader>` (e.g. finite volume models). .. seealso:: See the reader-types or reader-implementations for more details. See :class:`.basereader.BaseReader` for how readers work internally. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/opendrift/readers/basereader/index /autoapi/opendrift/readers/interpolation/index /autoapi/opendrift/readers/operators/index /autoapi/opendrift/readers/reader_ArtificialOceanEddy/index /autoapi/opendrift/readers/reader_ROMS_native/index /autoapi/opendrift/readers/reader_constant/index /autoapi/opendrift/readers/reader_constant_2d/index /autoapi/opendrift/readers/reader_copernicusmarine/index /autoapi/opendrift/readers/reader_current_from_drifter/index /autoapi/opendrift/readers/reader_current_from_track/index /autoapi/opendrift/readers/reader_double_gyre/index /autoapi/opendrift/readers/reader_failing/index /autoapi/opendrift/readers/reader_global_landmask/index /autoapi/opendrift/readers/reader_grib/index /autoapi/opendrift/readers/reader_grib2/index /autoapi/opendrift/readers/reader_lazy/index /autoapi/opendrift/readers/reader_netCDF_CF_generic/index /autoapi/opendrift/readers/reader_netCDF_CF_unstructured/index /autoapi/opendrift/readers/reader_oscillating/index /autoapi/opendrift/readers/reader_schism_native/index /autoapi/opendrift/readers/reader_shape/index /autoapi/opendrift/readers/reader_telemac_selafin/index /autoapi/opendrift/readers/reader_timeseries/index /autoapi/opendrift/readers/roppy/index Attributes ---------- .. autoapisummary:: opendrift.readers.logger Functions --------- .. autoapisummary:: opendrift.readers.open_dataset_opendrift opendrift.readers.datetime_from_variable opendrift.readers.open_mfdataset_overlap opendrift.readers.applicable_readers opendrift.readers.reader_from_url Package Contents ---------------- .. py:data:: logger .. py:function:: open_dataset_opendrift(source, zarr_storage_options=None, open_mfdataset_options={}, chunks=None) Wrapper around Xarray open_dataset and open_mfdataset. Common wrapper/opener to be used for all Xarray based readers xarray.open_dataset will be used if source is: - a single netCDF file or OPeNDAP URL xarray.open_mfdataset will be used if source is: - a list of netCDF files - a filename with wildcards (* ? or [) cf-times are decoded after removing any offending variables (e.g. if units equals "hours since analysis") .. py:function:: datetime_from_variable(var) .. py:function:: open_mfdataset_overlap(url_base, time_series=None, start_time=None, end_time=None, freq=None, timedim='time') .. py:function:: applicable_readers(url) Return a list of readers that are possible candidates for a given URL, filename or product ID .. py:function:: reader_from_url(url, timeout=10) Make readers from URLs or paths to datasets