icenet package#
Subpackages#
- icenet.data package
- Subpackages
- Submodules
- icenet.data.cli module
- icenet.data.dataset module
IceNetDataSetIceNetDataSet._configIceNetDataSet._configuration_pathIceNetDataSet._batch_sizeIceNetDataSet._countsIceNetDataSet._dtypeIceNetDataSet._loader_configIceNetDataSet._generate_workersIceNetDataSet._n_forecast_daysIceNetDataSet._num_channelsIceNetDataSet._shapeIceNetDataSet._shufflingIceNetDataSet.channelsIceNetDataSet.countsIceNetDataSet.get_data_loader()IceNetDataSet.loader_config
MergedIceNetDataSetcheck_dataset()get_args()
- icenet.data.loader module
- icenet.data.process module
- icenet.data.producers module
- icenet.data.utils module
- Module contents
- icenet.model package
- icenet.plotting package
- Submodules
- icenet.plotting.utils module
broadcast_forecast()calculate_extents()filter_ds_by_obs()geographic_box()get_bounds()get_crs()get_custom_cmap()get_forecast_ds()get_geoextent_polygon()get_obs_da()get_plot_axes()get_seas_forecast_da()get_seas_forecast_init_dates()pixel_to_projection()process_block()process_probes()process_region()projection_to_geographic_coords()reproject_array()reproject_projected_coords()set_ffmpeg_path()set_plot_geoaxes()set_plot_geoextent()show_img()
- icenet.plotting.video module
- Module contents
- icenet.process package
- icenet.results package
- icenet.tests package
Submodules#
icenet.exceptions module#
icenet.utils module#
- class icenet.utils.Hemisphere(value)[source]#
Bases:
FlagRepresentation of hemispheres & both with bitwise operations.
- An enum.Flag derived class representing the different hemispheres
(north, south, or both), providing methods to check which hemisphere is selected via bitwise operations:
& (AND), | (OR), ^ (XOR), and ~ (INVERT)
- BOTH = 3#
- NONE = 0#
- NORTH = 1#
- SOUTH = 2#
- class icenet.utils.HemisphereMixin[source]#
Bases:
objectA mixin relating to Hemisphere checking.
- _hemisphere#
Represents the bitmask value of the hemisphere. Defaults to Hemisphere.NONE (i.e., 0).
- Type:
int
- property both: int#
The bitmask value representing both hemispheres.
- property hemisphere: int#
The bitmask value representing the hemisphere.
- property hemisphere_loc: list#
Get a list of latitude and longitude extent representing the hemisphere’s location.
- property hemisphere_str: list#
A list of strings representing the selected hemispheres.
- property north: bool#
A flag indicating if _hemisphere is north. True if the hemisphere is north, False otherwise.
- property south: bool#
A flag indicating if _hemisphere is south. True if the hemisphere is south, False otherwise.
- class icenet.utils.LogFormat(str_format: str = '[%(asctime)-17s :%(levelname)-8s] - %(message)s', date_format: str = '%d-%m-%y %T')[source]#
Bases:
objectCreates a logging formatter for use across IceNet.
- date_format: str = '%d-%m-%y %T'#
- formatter: Formatter#
- str_format: str = '[%(asctime)-17s :%(levelname)-8s] - %(message)s'#
- icenet.utils.check_pytorch_import(logger: Logger) bool[source]#
Check for availability of pytorch module
- Parameters:
logger – A Logger instance
- Returns:
Whether torch was successfully imported
- Return type:
pytorch_available
Example
>>> logger = setup_module_logging(__name__) >>> pytorch_available = check_pytorch_import(logger)
- icenet.utils.run_command(command: str, dry: bool = False) object[source]#
Run a shell command
A wrapper in case we want some additional handling to go in here
- Parameters:
command – Command to run in shell.
dry (optional) – Whether to do a dry run or to run actual command. Default is False.
- Returns:
subprocess.CompletedProcess return of the executed command.
Module contents#
Top-level package for IceNet.