#!/usr/bin/env python3
"""
Submit NSRDB polygon archive requests for county-average cloudiness inputs.

This is a cloud-specific wrapper around request_nsrdb_county_polygon_archives.py.
It reuses the existing polygon tiling, site-count, Polar fallback, pacing, and
manifest logic, but writes to separate cloud request/response files and requests:

ghi,clearsky_ghi,cloud_type
"""

from __future__ import annotations

import sys

import request_nsrdb_county_polygon_archives as polygon_request


DEFAULT_ARGS = [
    "--requests-csv",
    "data/nrel/county_polygon_cloud_request_manifest.csv",
    "--error-csv",
    "data/nrel/county_polygon_cloud_error_log.csv",
    "--response-dir",
    "data/nrel/polygon_cloud_request_responses",
    "--artifact-label",
    "cloud",
    "--legacy-artifact-label",
    "ghi",
    "--attributes",
    "ghi,clearsky_ghi,cloud_type",
]


def main() -> None:
    """Run the existing polygon requester with cloud-specific defaults."""
    polygon_request.main(
        [*DEFAULT_ARGS, *sys.argv[1:]],
        description=__doc__,
    )


if __name__ == "__main__":
    main()
