swarmpal.cli.commands
=====================

.. py:module:: swarmpal.cli.commands


Functions
---------

.. autoapisummary::

   swarmpal.cli.commands._update_times
   swarmpal.cli.commands._read_config
   swarmpal.cli.commands.cli
   swarmpal.cli.commands.spacecraft
   swarmpal.cli.commands.fac_single_sat
   swarmpal.cli.commands.last_available_time
   swarmpal.cli.commands._check_overwrite
   swarmpal.cli.commands.fetch_data
   swarmpal.cli.commands.batch
   swarmpal.cli.commands.quicklook


Module Contents
---------------

.. py:function:: _update_times(start_time, end_time, dataset_config)

   Helper to update start and end times in a dataset configuration.


.. py:function:: _read_config(filename, times)

   Helper function to read and validate YAML config files


.. py:function:: cli()

.. py:function:: spacecraft()

   List names of available spacecraft


.. py:function:: fac_single_sat(spacecraft: str, time_start: str, time_end: str, grade: str, to_cdf_file: str)

   Execute FAC single-satellite processor


.. py:function:: last_available_time(collection)

   UTC of last available data for a collection, e.g. SW_FAST_MAGA_LR_1B


.. py:function:: _check_overwrite(file: click.Path, overwrite: bool)

.. py:function:: fetch_data(time, overwrite, config: click.File, out: click.Path)

   Fetch data described in yaml file CONFIG and save the resulting DataTree in NetCDF file OUT


.. py:function:: batch(time, overwrite, config: click.File, out: click.Path)

   Run SwarmPAL in batch mode. The datasets and processes need to be specified in YAML file and
   passed as the first CONFIG argument. The results are written to NetCDF files specified by OUT.


.. py:function:: quicklook(overwrite, file: click.File, out: click.Path)

   Create a quicklook plot if possible


