1.5.1.2.2. polar2grid._glue_argparser module

Argument parsing and script setup for the main glue.py script.

class polar2grid._glue_argparser.GlueArgumentParser(argv: list[str], is_polar2grid: bool)[source]

Bases: object

Helper class for parsing and grouping command line arguments.

_parse_one_writer_args(writer_subgroups: list) dict[source]
_parse_reader_args(reader_subgroups: list) tuple[dict, dict][source]
_separate_scene_init_load_args(reader_subgroups) None[source]
polar2grid._glue_argparser._add_common_arguments(parser: ArgumentParser, binary_name: str) None[source]
polar2grid._glue_argparser._add_component_parser_args(parser: ArgumentParser, component_type: str, component_names: list[str]) list[source]
polar2grid._glue_argparser._args_to_dict(args, group_actions, exclude=None)[source]
polar2grid._glue_argparser._convert_reader_name(reader_name: str) str[source]
polar2grid._glue_argparser._convert_writer_name(writer_name: str) str[source]
polar2grid._glue_argparser._filenames_from_local(input_filenames)[source]
polar2grid._glue_argparser._fsfiles_for_s3(input_filenames)[source]

Convert S3 URLs to something Satpy can understand and use.

Examples

Example S3 URLs (no caching):

polar2grid.sh ... -f s3://noaa-goes16/ABI-L1b-RadC/2019/001/17/*_G16_s20190011702186*

Example S3 URLs using fsspec caching:

polar2grid.sh ... -f simplecache::s3://noaa-goes16/ABI-L1b-RadC/2019/001/17/*_G16_s20190011702186*
polar2grid._glue_argparser._main_args(argv, use_polar2grid_defaults)[source]
polar2grid._glue_argparser._retitle_optional_arguments(parser)[source]

Hack to make the optional arguments say what we want.

polar2grid._glue_argparser._supported_readers(is_polar2grid: bool = False) list[str][source]
polar2grid._glue_argparser._supported_writers(is_polar2grid: bool = False) list[str][source]
polar2grid._glue_argparser._validate_reader_writer_args(parser, args, use_polar2grid_defaults)[source]
polar2grid._glue_argparser.add_resample_argument_groups(parser, is_polar2grid=None)[source]
polar2grid._glue_argparser.add_scene_argument_groups(parser, is_polar2grid=False)[source]
polar2grid._glue_argparser.add_writer_argument_groups(parser, is_polar2grid=False)[source]
polar2grid._glue_argparser.float_or_false(val)[source]
polar2grid._glue_argparser.get_default_output_filename(reader: str, writer: str, is_polar2grid: bool)[source]

Get a default output filename based on what reader we are reading.

polar2grid._glue_argparser.get_input_files(input_filenames)[source]

Convert directories to list of files.

polar2grid._glue_argparser.get_p2g_defaults_env_var()[source]
polar2grid._glue_argparser.get_reader_parser_function(reader_name: str) Callable[[ArgumentParser], tuple] | None[source]
polar2grid._glue_argparser.get_writer_parser_function(writer_name: str) Callable[[ArgumentParser], tuple] | None[source]