:py:mod:`gnome.environment.gridcur` =================================== .. py:module:: gnome.environment.gridcur .. autoapi-nested-parse:: code to work with the "old" gridcur format Examples: A single cell, values on the cell: :: [GRIDCURTIME] KNOTS NUMROWS 1 NUMCOLS 1 LOLAT 44 HILAT 46 LOLONG 12 HILONG 15 [TIME] 30 1 2002 1 0 1 1 .092388 -.0382683 Two by two grid, values on the nodes: :: [GRIDCURTIME] KNOTS NUMROWS 2 NUMCOLS 2 STARTLAT 44 STARTLONG 12 DLAT 2 DLONG 3 [TIME] 30 1 2002 1 0 1 1 .092388 -.0382683 1 2 .092388 -.0382683 2 1 .092388 -.0382683 2 2 .092388 -.0382683 Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: gnome.environment.gridcur.from_gridcur gnome.environment.gridcur.init_from_gridcur gnome.environment.gridcur.read_file gnome.environment.gridcur.write_gridcur gnome.environment.gridcur.make_grid_arrays Attributes ~~~~~~~~~~ .. autoapisummary:: gnome.environment.gridcur.data_types gnome.environment.gridcur.data_type_tags .. py:data:: data_types .. py:data:: data_type_tags .. py:exception:: GridCurReadError Bases: :py:obj:`Exception` custom class so that we canknow the error was in reading GridCur file Initialize self. See help(type(self)) for accurate signature. .. py:function:: from_gridcur(filename, extrapolation_is_allowed=False, **kwargs) factory function to make a GridCurrent from a gridcur file :param filename: name (full path) of the gridcur file to load :param extrapolation_is_allowed=False: passes other keyword arguments on to GridCurrent initilizer .. py:function:: init_from_gridcur(gc, filename, extrapolation_is_allowed=False, **kwargs) utility function to initialize a GridCurrent :param gc=None: the GridCur object to be initialized if None, then a new one will be created. :param filename: name (full path) of the gridcur file to load :param extrapolation_is_allowed=False: passes other keyword arguments on to GridCurrent initilizer .. py:function:: read_file(filename) .. py:function:: write_gridcur(filename, data_type, units, times, lon, lat, data_u, data_v) write a gridcur file -- used for making tests, etc. .. py:function:: make_grid_arrays(grid_info) Build the arrays for the grid and data :param grid_info: a dict of the grid information from the header