opendrift.readers.reader_constant
Classes
A very simple reader that always give the same value for its variables |
Module Contents
- class opendrift.readers.reader_constant.Reader(parameter_value_map)[source]
Bases:
opendrift.readers.basereader.BaseReader,opendrift.readers.basereader.ContinuousReaderA 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.<variable_name> –> 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
- _parameter_value_map
- variables
- proj4 = '+proj=latlong'
- xmin = -180
- xmax = 180
- ymin = -90
- ymax = 90
- start_time = None
- end_time = None
- time_step = None
- name = 'constant_reader'