Vortex-cen tools

Extraction tool for resources archived with vortex in a research context.

Usage examples:

With a default configuration file under vortex_cen/conf providing the full resource(s) description. In this example, the S2MReanalysis.ini configuration file allows to extract data from the S2M reanalysis over the entire period and all geometries covered by the dataset.

Before any actual extraction, the list of files that will be extracted can be checked as follows :

from vortex_cen.tools.vortex_extractor import get_data
get_data(configfile='S2MReanalysis.ini',  configsection='SafranFlatReanalysis', verbose=True, checkonly=True)

The actual extraction can be launched by removing the “checkonly=True” keyword argument (WARNING : do not do that for the entire dataset !)

In order to limit the extraction to one year and one geometry :

get_data(
    configfile='S2MReanalysis.ini',
    configsection='SafranFlatReanalysis',
    verbose=True,
    datebegin='2024080106',
    dateend='2025080106',
    geometry='cor2_flat',
)

In order to use a custom configuration file, provide the absolute or relative path to the target file. If this target file contains only the “DEFAULT” section or a single name section, simply type :

get_data(configfile='path/to/user/file.ini')