moncenterlib.gnss.code_client module
- class moncenterlib.gnss.code_client.CODEClient(logger: bool | Logger | None = None)
Bases:
objectClient for downloading precise CODE (Center for Orbit Determination in Europe) products for GNSS processing.
The class downloads files from the AIUB/CODE archive:
http://ftp.aiub.unibe.ch/CODE. Supported product types areION,ERP,SP3,CLK,CLK_05S,DCB_P1C1, andDCB_P1P2.- __init__(logger: bool | Logger | 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.
- download(dates: dict | list, type_file: str, output_dir: str, remove_archive: bool = True) None
Download CODE products for the requested dates.
Available product types: ION, ERP, SP3, CLK, CLK_05S, DCB_P1C1, DCB_P1P2
- Parameters:
dates (dict | list) – Either a dictionary with
startandendkeys inYYYY-MM-DDformat, or a list of date strings in the same format.type_file (str) – Product type to download.
output_dir (str) – Directory where downloaded files will be saved.
remove_archive (bool, optional) – Remove the original archive after successful unpacking. Defaults to
True.
- Raises:
ValueError – If
type_fileis unknown oroutput_dirdoes not exist.TypeError – If
datesis not a dict withstart/endkeys or a list of date strings.
Examples
>>> code_client = CODEClient() >>> code_client.download( ... dates={"start": "2024-01-01", "end": "2024-01-03"}, ... type_file="SP3", ... output_dir="/tmp/code_products" ... ) >>> code_client.download( ... dates=["2024-01-01", "2024-01-15"], ... type_file="DCB_P1C1", ... output_dir="/tmp/code_products", ... remove_archive=False ... )