moncenterlib.gnss.cddis_client module

This module is designed to download one or more GNSS files from the CDDIS archive. This simplifies the process of searching and downloading various types of files. This automates your process. See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/GNSS_data_and_product_archive.html

Learn more about the specific class.

class moncenterlib.gnss.cddis_client.CDDISClient(logger: bool | Logger | None = None)

Bases: object

__init__(logger: bool | Logger | None = None) None
Parameters:

logger (bool | Logger, optional) – if the logger is None, a logger will be created inside the default class. If the logger is False, then no information will be output. If you pass an instance of your logger, the information output will be implemented according to your logger. Defaults to None.

get_clock_30s(output_dir: str, query: dict | list, unpack=True) dict

A method for downloading files of final station clock solutions (CLK 30 seconds). See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/clock_products.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict | list) – A request may containing a start date and an end date. Example: {“start”: “2020-12-30”, “end”: “2021-12-30”}. Format date = YYYY-MM-DD. Also you can use list of dates. Example: [“2020-12-30”, “2021-12-31”]

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"start": "2020-12-30", "end": "2021-01-02"}
>>> # or query = ["2020-12-30", "2024-05-05"]
>>> res = cddiscli.get_clock_30s("/output_dir", query)
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}
get_clock_5m(output_dir: str, query: dict | list, unpack=True) dict

A method for downloading files of final station clock solutions (CLK 5 minutes). See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/clock_products.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict | list) – A request may containing a start date and an end date. Example: {“start”: “2020-12-30”, “end”: “2021-12-30”}. Format date = YYYY-MM-DD. Also you can use list of dates. Example: [“2020-12-30”, “2021-12-31”]

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"start": "2020-12-30", "end": "2021-01-02"}
>>> # or query = ["2020-12-30", "2024-05-05"]
>>> res = cddiscli.get_clock_5m("/output_dir", query)
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}
get_daily_30s_data(output_dir: str, query: dict, unpack=True) dict

This method allows you to download Daily 30-second data. It is possible to select a range of days. Also select the station, file type and RINEX version. See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict) – The dictionary should contain the following keys.

  • dates ("dates" - range of dates or list of)

  • name ("station" - station)

  • type ("type" - file)

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Raises:
  • ValueError – Path to output_dir is strange.

  • KeyError – Invalid query.

  • ValueError – Start day must be less than or equal to end day.

  • ValueError – Rinex version 3 doesn’t support.

  • ValueError – Unknow rinex version.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found. The no_downloads key stores a list of files that have not been download.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"dates": {"start": "2020-12-30", "end": "2021-01-02"}, "station": "NOVM", "type": "o", "rinex_v": "2"}
>>> # or query = {"dates": ["2020-12-12", "2024-05-05"], "station": "NOVM", "type": "o", "rinex_v": "2"}
>>> res = cddiscli.get_daily_30s_data("/output_path", query))
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}
get_daily_multi_gnss_brd_eph(output_dir: str, query: dict | list, unpack: bool = True) dict

This method allows you to download Daily RINEX V3 GNSS Broadcast Ephemeris Files or Daily Multi-GNSS Broadcast Ephemeris Files. These are the format files BRDC00IGS_R_YYYYDDDHHMM_01D_MN.rnx.gz and BRDM00DLR_S_YYYYDDDHHMM_01D_MN.rnx.gz accordingly. Daily RINEX V3 GNSS Broadcast Ephemeris Files are downloaded as a priority. If no such file was found, then the Daily Multi-GNSS Broadcast Ephemeris Files are downloaded. See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/broadcast_ephemeris_data.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict | list) – A request may containing a start date and an end date. Example: {“start”: “2020-12-30”, “end”: “2021-12-30”}. Format date = YYYY-MM-DD. Also you can use list of dates. Example: [“2020-12-30”, “2021-12-31”]

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Raises:
  • ValueError – Path to output_dir is strange.

  • KeyError – The query must have the start and end keys.

  • ValueError – Start day must be less than or equal to end day.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found. The no_downloads key stores a list of files that have not been download.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"start": "2020-12-30", "end": "2021-01-02"}
>>> # or query = ["2020-12-30", "2024-05-05"]
>>> res = cddiscli.get_daily_multi_gnss_brd_eph("/output_dir", query)
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}
get_earth_orientation(output_dir: str, query: dict | list, unpack=True) dict

A method for downloading files of final Earth rotation parameters (ERP). See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/orbit_products.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict | list) – A request may containing a start date and an end date. Example: {“start”: “2020-12-30”, “end”: “2021-12-30”}. Format date = YYYY-MM-DD. Also you can use list of dates. Example: [“2020-12-30”, “2021-12-31”]

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"start": "2020-12-30", "end": "2021-01-20"}
>>> # or query = ["2020-12-30", "2024-05-05"]
>>> res = cddiscli.get_earth_orientation("/output_dir", query)
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}
get_precise_orbits(output_dir: str, query: dict | list, glonass: bool = False, unpack=True) dict

A method for downloading files of final precise orbits (SP3). See more here: https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/orbit_products.html

Parameters:
  • output_dir (str) – The path where the files should be saved.

  • query (dict | list) – A request may containing a start date and an end date. Example: {“start”: “2020-12-30”, “end”: “2021-12-30”}. Format date = YYYY-MM-DD. Also you can use list of dates. Example: [“2020-12-30”, “2021-12-31”]

  • glonass (bool) – If True download GLONASS precise orbits. Defaut to False.

  • unpack (bool, optional) – Deleting an archive after unpacking. Defaults to True.

Returns:

The dictionary contains 3 keys. done, no_exists, no_found_dates. The done key stores a list of files that have been successfully created. The no_exists key stores a list of files that have not been created. The no_found_dates key stores a list of dates that have not been found.

Return type:

dict

Examples

>>> cddiscli = CDDISClient()
>>> query = {"start": "2020-12-30", "end": "2021-01-02"}
>>> # or query = ["2020-12-30", "2024-05-05"]
>>> res = cddiscli.get_precise_orbits("/output_dir", query)
>>> res
{
    "done": ["file_1", "file_2"],
    "no_exists": [],
    "no_found_dates": []
}