icenet package#
Subpackages#
- icenet.data package
- Subpackages
- Submodules
- icenet.data.cli module
- icenet.data.dataset module
IceNetDataSet
IceNetDataSet._config
IceNetDataSet._configuration_path
IceNetDataSet._batch_size
IceNetDataSet._counts
IceNetDataSet._dtype
IceNetDataSet._loader_config
IceNetDataSet._generate_workers
IceNetDataSet._n_forecast_days
IceNetDataSet._num_channels
IceNetDataSet._shape
IceNetDataSet._shuffling
IceNetDataSet.channels
IceNetDataSet.counts
IceNetDataSet.get_data_loader()
IceNetDataSet.loader_config
MergedIceNetDataSet
check_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:
Flag
Representation 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:
object
A 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:
object
Creates 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.