opendrift.readers.reader_constant ================================= .. py:module:: opendrift.readers.reader_constant Classes ------- .. autoapisummary:: opendrift.readers.reader_constant.Reader Module Contents --------------- .. py:class:: Reader(parameter_value_map) Bases: :py:obj:`opendrift.readers.basereader.BaseReader`, :py:obj:`opendrift.readers.basereader.ContinuousReader` A very simple reader that always give the same value for its variables init with a map {'variable_name': value, ...} value can also be an array, and in this case the map/dictionary must also include `element_ID` which corresponds to the elements that shall receive the actual value: self.environment. --> value[element_ID = self.elements.ID] (pseudo code) This is however more simply achived by specifying environment when seeding, see: https://opendrift.github.io/gallery/example_element_dependent_environment.html .. py:attribute:: _parameter_value_map .. py:attribute:: variables .. py:attribute:: proj4 :value: '+proj=latlong' .. py:attribute:: xmin :value: -180 .. py:attribute:: xmax :value: 180 .. py:attribute:: ymin :value: -90 .. py:attribute:: ymax :value: 90 .. py:attribute:: start_time :value: None .. py:attribute:: end_time :value: None .. py:attribute:: time_step :value: None .. py:attribute:: name :value: 'constant_reader' .. py:method:: get_variables(requestedVariables, time=None, x=None, y=None, z=None) Obtain and return values of the requested variables at all positions (x, y, z) closest to given time. Returns: Dictionary with arrays of length len(x) with values at exact positions x, y and z.