read_netcdf.py¶
-
class
pycovjson.read_netcdf.
NetCDFReader
(dataset_path)[source]¶ -
convert_time
(t_variable)[source]¶ Formats time objects to CovJSON compliant strings.
Parameters: t_variable – Time Variable Returns: list of formatted datetime strings
-
extract_var_data
(var_names)[source]¶ Returns dictionary containing the values in each variable specified in the variable list.
Parameters: var_names (String) – :return variable_dict - Dictionary containing key-val pairs
-
get_dimensions
(variable)[source]¶ Return dimension of specified variable.
Parameters: variable – Input variable Returns: Tuple - Array dimension of specified variable
-
get_metadata
(variable)[source]¶ Returns metadata for a specified variable.
Parameters: variable – Name of specified Returns: dset[variable]
-
get_shape
(variable)[source]¶ Get shape of specifed variable, as list :param variable: String specifying variable name :return: shape_list - List containing shape of specified variable
-
get_std_name
(variable)[source]¶ Return standard name of variable.
Parameters: variable – input variable Returns: standard_name
-
get_type
(variable)[source]¶ Parameters: - dset – NetCDF dataset object
- variable – Specified
Returns: var_type with digits stripped
-
get_var_group
(variable)[source]¶ Return group which specified variable belongs to.
Parameters: variable – Returns: group as string :type string
-