gnome.environment.environment_objects ===================================== .. py:module:: gnome.environment.environment_objects Classes ------- .. autoapisummary:: gnome.environment.environment_objects.SteadyUniformCurrent gnome.environment.environment_objects.VelocityTS gnome.environment.environment_objects.VelocityGrid gnome.environment.environment_objects.WindTS gnome.environment.environment_objects.CurrentTS gnome.environment.environment_objects.TemperatureTS gnome.environment.environment_objects.GridTemperature gnome.environment.environment_objects.SalinityTS gnome.environment.environment_objects.GridSalinity gnome.environment.environment_objects.WaterDensityTS gnome.environment.environment_objects.GridSediment gnome.environment.environment_objects.IceConcentration gnome.environment.environment_objects.Bathymetry gnome.environment.environment_objects.GridCurrent gnome.environment.environment_objects.GridWind gnome.environment.environment_objects.LandMask gnome.environment.environment_objects.IceVelocity gnome.environment.environment_objects.IceAwareCurrent gnome.environment.environment_objects.IceAwareWind gnome.environment.environment_objects.FileGridCurrent Module Contents --------------- .. py:class:: SteadyUniformCurrent(speed, direction, units='m/s', name='Steady Uniform Current') Bases: :py:obj:`gnome.environment.environment.Environment` Simple current: the same at all time and places Create a steady, uniform current (same at all time and places) :param speed: speed of the current :param direction: direction of the current (direction to, not from), in degrees from north :param units="m/s": units of speed: defaults to "m/s" :param name="Steady Uniform Current": optional name for the current .. py:attribute:: data_start .. py:attribute:: data_stop .. py:attribute:: units :value: 'm/s' .. py:property:: speed .. py:property:: direction .. py:property:: u .. py:property:: v .. py:method:: at(points, time, *, units=None, extrapolate=None, **kwargs) Find the value of the property at positions of points at time T :param points: will be ignored :param time: will be ignored :param units='m/s': units the values will be returned in (or converted to) if None, the default units for the environment type will be used. :type units: string such as ('m/s', 'knots', etc) :return: returns an Nx2 arrary is points is Nx2, Nx3 is points is Nx3 .. py:class:: VelocityTS(variables=None, time=None, units=None, *args, **kwargs) Bases: :py:obj:`gnome.environment.timeseries_objects_base.TimeseriesVector` Base class for multiple data sources aligned along the same single time dimension A class that represents a vector natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. :param name: Name of the Property :type name: string :param units: Unit of the underlying data :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param variables: component data arrays :type variables: [] of TimeseriesData or numpy.array (Max len=2) .. py:method:: constant(name='', speed=0, direction=0, units='m/s') :classmethod: utility to create a constant wind "timeseries" :param speed: speed of wind :param direction: direction -- degrees True, direction wind is from (degrees True) :param units='m/s': units for speed, as a string, i.e. "knots", "m/s", "cm/s", etc. .. note:: The time for a constant wind timeseries is irrelevant. This function simply sets it to datetime.now() accurate to hours. .. py:property:: timeseries .. py:class:: VelocityGrid(angle=None, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.VectorVariable` A base class for all classes in environment module. This is primarily to define a dtype such that the OrderedCollection defined in the Model object requires it. :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:attribute:: comp_order :value: ['u', 'v', 'w'] .. py:method:: get_data_vectors() return array of shape (2, time_slices, len_linearized_data) .. py:method:: get_bounds() Return a bounding box surrounding the grid data. .. py:class:: WindTS(name=None, units=None, time=None, variables=None, **kwargs) Bases: :py:obj:`VelocityTS`, :py:obj:`gnome.environment.environment.Environment` Base class for multiple data sources aligned along the same single time dimension A class that represents a vector natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. :param name: Name of the Property :type name: string :param units: Unit of the underlying data :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param variables: component data arrays :type variables: [] of TimeseriesData or numpy.array (Max len=2) .. py:method:: constant_wind(name='Constant Wind', speed=None, direction=None, units='m/s') :classmethod: :param speed: speed of wind :param direction: direction -- degrees True, direction wind is from (degrees True) :param unit='m/s': units for speed, as a string, i.e. "knots", "m/s", "cm/s", etc. .. py:class:: CurrentTS(name=None, units=None, time=None, variables=None, **kwargs) Bases: :py:obj:`VelocityTS`, :py:obj:`gnome.environment.environment.Environment` Base class for multiple data sources aligned along the same single time dimension A class that represents a vector natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. :param name: Name of the Property :type name: string :param units: Unit of the underlying data :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param variables: component data arrays :type variables: [] of TimeseriesData or numpy.array (Max len=2) .. py:method:: constant_current(name='Constant Current', speed=None, direction=None, units='m/s') :classmethod: :param speed: speed of current :param direction: direction -- degrees True, direction current is going (degrees True) :param unit='m/s': units for speed, as a string, i.e. "knots", "m/s", "cm/s", etc. .. py:class:: TemperatureTS(name=None, units='K', time=None, data=None, **kwargs) Bases: :py:obj:`gnome.environment.timeseries_objects_base.TimeseriesData`, :py:obj:`gnome.environment.environment.Environment` Base class for data with a single dimension: time A class that represents a natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. EnvProp is the base class, and returns only a single value regardless of the time. :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param data: Value of the property :type data: array-like .. py:method:: constant_temperature(name='Constant Temperature', temperature=None, units='K') :classmethod: .. py:class:: GridTemperature(extrapolation_is_allowed=False, surface_boundary_condition='extrapolate', bottom_boundary_condition='mask', *args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable`, :py:obj:`gnome.environment.environment.Environment` Variable object: represents a field of values associated with the grid. Abstractly, it is usually a scalar physical property such a temperature, salinity that varies over a the domain of the model. This more or less maps to a variable in a netcdf file, but does not have to come form a netcdf file, and this provides and abstraction where the user can access the value in world coordinates, interpolated from the grid. It holds a reference to its own grid object, and its data. This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:attribute:: default_names :value: ['water_t', 'temp'] .. py:attribute:: cf_names :value: ['sea_water_temperature', 'sea_surface_temperature'] .. py:class:: SalinityTS(data=None, time=None, units=None, extrapolate=True, *args, **kwargs) Bases: :py:obj:`gnome.environment.timeseries_objects_base.TimeseriesData`, :py:obj:`gnome.environment.environment.Environment` Base class for data with a single dimension: time A class that represents a natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. EnvProp is the base class, and returns only a single value regardless of the time. :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param data: Value of the property :type data: array-like .. py:method:: constant_salinity(name='Constant Salinity', salinity=None, units='ppt') :classmethod: .. py:class:: GridSalinity(extrapolation_is_allowed=False, surface_boundary_condition='extrapolate', bottom_boundary_condition='mask', *args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable`, :py:obj:`gnome.environment.environment.Environment` Variable object: represents a field of values associated with the grid. Abstractly, it is usually a scalar physical property such a temperature, salinity that varies over a the domain of the model. This more or less maps to a variable in a netcdf file, but does not have to come form a netcdf file, and this provides and abstraction where the user can access the value in world coordinates, interpolated from the grid. It holds a reference to its own grid object, and its data. This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:attribute:: default_names :value: ['salt'] .. py:attribute:: cf_names :value: ['sea_water_salinity', 'sea_surface_salinity'] .. py:class:: WaterDensityTS(name=None, units='kg/m^3', temperature=None, salinity=None) Bases: :py:obj:`gnome.environment.timeseries_objects_base.TimeseriesData`, :py:obj:`gnome.environment.environment.Environment` Base class for data with a single dimension: time A class that represents a natural phenomenon and provides an interface to get the value of the phenomenon at a position in space and time. EnvProp is the base class, and returns only a single value regardless of the time. :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4.Variable, or Time object :param data: Value of the property :type data: array-like .. py:class:: GridSediment(extrapolation_is_allowed=False, surface_boundary_condition='extrapolate', bottom_boundary_condition='mask', *args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable` Variable object: represents a field of values associated with the grid. Abstractly, it is usually a scalar physical property such a temperature, salinity that varies over a the domain of the model. This more or less maps to a variable in a netcdf file, but does not have to come form a netcdf file, and this provides and abstraction where the user can access the value in world coordinates, interpolated from the grid. It holds a reference to its own grid object, and its data. This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:attribute:: default_names :value: ['sand_06'] .. py:class:: IceConcentration(*args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable` Variable object: represents a field of values associated with the grid. Abstractly, it is usually a scalar physical property such a temperature, salinity that varies over a the domain of the model. This more or less maps to a variable in a netcdf file, but does not have to come form a netcdf file, and this provides and abstraction where the user can access the value in world coordinates, interpolated from the grid. It holds a reference to its own grid object, and its data. This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:attribute:: default_names :value: ['ice_fraction', 'aice'] .. py:attribute:: cf_names :value: ['sea_ice_area_fraction'] .. py:class:: Bathymetry(extrapolation_is_allowed=False, surface_boundary_condition='extrapolate', bottom_boundary_condition='mask', *args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable` Variable object: represents a field of values associated with the grid. Abstractly, it is usually a scalar physical property such a temperature, salinity that varies over a the domain of the model. This more or less maps to a variable in a netcdf file, but does not have to come form a netcdf file, and this provides and abstraction where the user can access the value in world coordinates, interpolated from the grid. It holds a reference to its own grid object, and its data. This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:attribute:: default_names :value: ['h'] .. py:attribute:: cf_names :value: ['depth'] .. py:class:: GridCurrent(angle=None, **kwargs) Bases: :py:obj:`VelocityGrid` GridCurrent is VelocityGrid that adds specific stuff for currents: - Information about how to find currents in netCDF file - Ability to apply an angle adjustment of grid-aligned currents - overloading the memorization to memoize the angle-adjusted current. - add a get_data_vectors() provides magnitude, direction -- used to draw the currents in a GUI loading code for netcdf files for gridded currents, and an interpolation (`.at`), function that provides caching :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:attribute:: default_names .. py:attribute:: cf_names .. py:method:: at(points, time, *, units=None, extrapolate=None, **kwargs) Find the value of the property at positions P at time T :param points: Coordinates to be queried (P) :type points: Nx2 or Nx3 array of double :param time: The time at which to query these points (T) :type time: datetime.datetime object :param units: units the values will be returned in (or converted to) :type units: string such as ('m/s', 'knots', etc) :param extrapolate: if True, extrapolation will be supported :type extrapolate: boolean (True or False) :return: returns a Nx2 array of interpolated values :rtype: double .. py:class:: GridWind(wet_dry_mask=None, *args, **kwargs) Bases: :py:obj:`VelocityGrid` Gridded winds -- usually from netcdf files from meteorological models. This will most often be initialized from netcdf files as: wind = GridWind.from_netCDF(filename="a/path/to/a/netcdf_file.nc") filename can be: * An already open netCDF4 Dataset * A single path to a netcdf file * A list of paths to a set of netcdf files with timeseries :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:attribute:: default_names .. py:attribute:: cf_names .. py:attribute:: wet_dry_mask :value: None .. py:method:: at(points, time, *, units=None, extrapolate=None, coord_sys='uv', _auto_align=True, **kwargs) Find the value of the property at positions P at time T :param points: Array of coordinates [(lon0, lat0), (lon1, lat1), ...] to be queried (P) :type points: Nx2 array of double :param time: The time at which to query these points (T) :type time: datetime.datetime object :param depth: Specifies the depth level of the variable :type depth: integer :param units: units the values will be returned in (or converted to) :type units: string such as ('m/s', 'knots', etc) :param extrapolate: if True, extrapolation will be supported :type extrapolate: boolean (True or False) :param coord_sys: String describing the coordinate system to be used. :type coord_sys: string, one of ('uv','u','v','r-theta','r','theta') :return: returns a Nx2 array of interpolated values :rtype: double .. py:method:: transform_result(value, coord_sys) .. py:method:: get_start_time() .. py:method:: get_end_time() .. py:class:: LandMask(*args, **kwargs) Bases: :py:obj:`gnome.environment.gridded_objects_base.Variable` This class depends on gridded features not yet finalized so it likely non-functional This class represents a value defined on a grid :param name: Name :type name: string :param units: Units :type units: string :param time: Time axis of the data :type time: list of `datetime.datetime`, netCDF4 Variable, or Time object :param data: Underlying data source :type data: array-like object such as netCDF4.Variable or numpy.ndarray :param grid: Grid that the data corresponds with :type grid: Grid object (pysgrid or pyugrid or ) :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param varname: Name of the variable in the data source file :type varname: string :param fill_value: the fill value used for undefined data :param location: location on the grid -- possible values depend on the grid type :type location: str :param attributes: attributes associated with the Variable (analogous to netcdf variable attributes) :type attributes: dict .. py:method:: at(points, time, *, units=None, extrapolate=None, _hash=None, _mem=True, **kwargs) Find the value of the property at positions P at time T :param points: Cartesian coordinates to be queried (P). Lon, Lat required, Depth (Z) is optional Coordinates must be organized as a 2D array or list, one coordinate per row. Failure to provide point data in this format may cause unexpected behavior. If you wish to provide point data using separate longitude and latitude arrays, use the ``lons=`` and ``lats=`` kwargs. :: [[Lon1, Lat1, Z1], [Lon2, Lat2, Z2], [Lon3, Lat3, Z3], ...] :type points: Nx3 array of double :param time: The time at which to query these points (T) :type time: datetime.datetime object :param units: units the values will be returned in (or converted to) :type units: string such as ('m/s', 'knots', etc) :param extrapolate: if True, extrapolation will be supported :type extrapolate: boolean (default False) :param unmask: If True and return array is a masked array, returns filled array. :type unmask: boolean (default False) :param surface_boundary_condition: Specifies how to evaluate points above the depth interval. :type surface_boundary_condition: string ('extrapolate' or 'mask', default 'extrapolate') :param bottom_boundary_condition: Specifies how to evaluate points below the depth interval. :type bottom_boundary_condition: string ('extrapolate' or 'mask', default 'extrapolate') :param lons: 1D iterable of longitude values. This is ignored if points is provided. :type lons: iterable :param lats: 1D iterable of latitude values. This is ignored if points is provided :type lons: iterable :return: returns a Nx1 array of interpolated values :rtype: double If time is out of bounds of the time series, and extrapolate is False, a gridded.time.OutOfTimeRangeError is raised. .. py:class:: IceVelocity(angle=None, **kwargs) Bases: :py:obj:`VelocityGrid` A base class for all classes in environment module. This is primarily to define a dtype such that the OrderedCollection defined in the Model object requires it. :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:attribute:: default_names .. py:attribute:: cf_names .. py:class:: IceAwareCurrent(ice_velocity=None, ice_concentration=None, *args, **kwargs) Bases: :py:obj:`GridCurrent` IceAwareCurrent is a GridCurrent that modulates the usual water velocity field using ice velocity and concentration information. While under 20% ice coverage, queries will return water velocity. Between 20% and 80% coverage, queries will interpolate linearly between water and ice velocity Above 80% coverage, queries will return the ice velocity. :param ice_velocity: VectorVariable representing surface ice velocity :type ice_velocity: VectorVariable or compatible object :param ice_concentration: Variable representing surface ice concentration :type ice_concentration: Variable or compatible object .. py:attribute:: ice_velocity :value: None .. py:attribute:: ice_concentration :value: None .. py:method:: from_netCDF(*args, **kwargs) :classmethod: Allows one-function initialization of a VectorVariable from a file. :param filename: Default data source. Parameters below take precedence :type filename: string :param dataset: Instance of open Dataset :type dataset: netCDF4.Dataset :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param grid_topology: Description of the relationship between grid attributes and variable names. :type grid_topology: {string : string, ...} :param grid: Grid that the data corresponds with :type grid: pysgrid or pyugrid :param varnames: Names of the variables in the data source file :type varnames: [] of string. Order of the names in the list would be order of vector components :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4 Variable, or Time object :param name: Name of property :type name: string :param units: Units :type units: string .. py:method:: init_from_netCDF(ice_file=None, ice_concentration=None, ice_velocity=None, *args, **kwargs) Allows one-function initialization of a VectorVariable from a file. :param filename: Default data source. Parameters below take precedence :type filename: string :param dataset: Instance of open Dataset :type dataset: netCDF4.Dataset :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param grid_topology: Description of the relationship between grid attributes and variable names. :type grid_topology: {string : string, ...} :param grid: Grid that the data corresponds with :type grid: pysgrid or pyugrid :param varnames: Names of the variables in the data source file :type varnames: [] of string. Order of the names in the list would be order of vector components :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4 Variable, or Time object :param name: Name of property :type name: string :param units: Units :type units: string .. py:method:: at(points, time, *, units=None, extrapolate=None, **kwargs) Find the value of the property at positions P at time T :param points: Coordinates to be queried (P) :type points: Nx2 or Nx3 array of double :param time: The time at which to query these points (T) :type time: datetime.datetime object :param units: units the values will be returned in (or converted to) :type units: string such as ('m/s', 'knots', etc) :param extrapolate: if True, extrapolation will be supported :type extrapolate: boolean (True or False) :return: returns a Nx2 array of interpolated values :rtype: double .. py:class:: IceAwareWind(ice_concentration=None, *args, **kwargs) Bases: :py:obj:`GridWind` Gridded winds -- usually from netcdf files from meteorological models. This will most often be initialized from netcdf files as: wind = GridWind.from_netCDF(filename="a/path/to/a/netcdf_file.nc") filename can be: * An already open netCDF4 Dataset * A single path to a netcdf file * A list of paths to a set of netcdf files with timeseries :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:attribute:: ice_concentration :value: None .. py:method:: from_netCDF(ice_concentration=None, **kwargs) :classmethod: Allows one-function initialization of a VectorVariable from a file. :param filename: Default data source. Parameters below take precedence :type filename: string :param dataset: Instance of open Dataset :type dataset: netCDF4.Dataset :param data_file: Name of data source file :type data_file: string :param grid_file: Name of grid source file :type grid_file: string :param grid_topology: Description of the relationship between grid attributes and variable names. :type grid_topology: {string : string, ...} :param grid: Grid that the data corresponds with :type grid: pysgrid or pyugrid :param varnames: Names of the variables in the data source file :type varnames: [] of string. Order of the names in the list would be order of vector components :param time: Time axis of the data :type time: [] of datetime.datetime, netCDF4 Variable, or Time object :param name: Name of property :type name: string :param units: Units :type units: string .. py:method:: at(points, time, *, units=None, extrapolate=None, min_val=0, **kwargs) :param min_val: Minimum value for wind speed. If computed wind speed is less than this value, it will be set to this value. :type min_val: float .. py:class:: FileGridCurrent(filename=None, extrapolation_is_allowed=False, *args, **kwargs) Bases: :py:obj:`GridCurrent` class that presents an interface for GridCurrent loaded from files of various formats Done as a class to provide a Schema for the persistence system And to provide a simple interface to making a current from a file. :param angle: scalar field of cell rotation angles (for rotated/distorted grids) :type angle: gridded_objects_base.Variable or None .. py:method:: init_from_gridcur(filename, extrapolation_is_allowed, **kwargs) Wrapper for external initalize function .. py:method:: new_from_dict(serial_dict) :classmethod: creates a new object from dictionary This is base implementation and can be over-ridden by classes using this mixin