Skip to content

Commit

Permalink
Merge d7db05b into 9d531a9
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Jan 10, 2024
2 parents 9d531a9 + d7db05b commit 628f6f8
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion polar2grid/readers/viirs_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"""
from __future__ import annotations

from argparse import ArgumentParser, _ArgumentGroup
from argparse import ArgumentParser, _ArgumentGroup, BooleanOptionalAction
from typing import Optional

from satpy import DataQuery
Expand Down Expand Up @@ -149,4 +149,26 @@ def add_reader_argument_groups(
if group is None:
group = parser.add_argument_group(title="VIIRS EDR Reader")

group.add_argument(
"--filter-veg",
action=BooleanOptionalAction,
default=True,
help="Filter vegetation index variables by various quality flags. Default is enabled.",
)
group.add_argument(
"--aod-qc-filter",
default=1,
type=_int_or_none,
choices=[None, 0, 1, 2, 3],
help="Filter AOD550 variable by QCAll variable. Value specifies the maximum "
"quality to include (0-high, 1-medium, 2-low, 3-no retrieval). Defaults to "
"1 which means medium and high quality data are included.",
)

return group, None


def _int_or_none(value: str) -> None | int:
if value.lower() == "none":
return None
return int(value)

0 comments on commit 628f6f8

Please sign in to comment.