1.1.1.1.4. tds2stac.analysers.recognizer module#
- class tds2stac.analysers.recognizer.Recognizer(main_catalog_url: str, nested_check: bool = False, logger_properties: dict = {}, requests_properties: dict = {})[source]#
Bases:
objectA class for recognizing nine different and possible scenarios in management of TDS datasets. We will explain each scenario in the following.
- First scenario: Just
catalogReftags are located directly under the dataset element tag. tag
https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/era5/sfc/single/catalog.xml(nested)- Second senarion:
CatalogRefsare not under a dataset element tag and directly come below thecatalog. https://thredds.imk-ifu.kit.edu/thredds/catalog/catalogues/sensor_catalog_ext.xml(nested)- Third scenario: One single
datasettag is located next toCatalogReftags. All are under adatasettag. https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/chirps/catalog.xml(nested)- Fourth scenario: An empty datasets.
https://thredds.imk-ifu.kit.edu/thredds/catalog/catalogues/bio_geo_chem_catalog_ext.xmlorhttps://thredds.atmohub.kit.edu/thredds/catalog/snowfogs/catalog.xml- Fifth scenario: There is no
CatalogReftag and all aredatasettag. All of them are under adatasettag. https://thredds.imk-ifu.kit.edu/thredds/catalog/climate/raster/global/chelsa/v1.2/catalog.html- Sixth scenario: A single dataset
https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/era5/sfc/single/catalog.xml?dataset=regclim/raster/global/era5/sfc/single/era5_sfc_20210101.nc- Seventh scenario: An aggregated dataset
https://thredds.imk-ifu.kit.edu/thredds/catalog/catalogues/swabian_moses_2021.xml?dataset=swabian_moses_aggregation- Eighth scenario: A combination of
caralogRefanddatasettags that is not under adatasettag.It’s similar to second scenario but with datasets https://thredds.imk-ifu.kit.edu/thredds/catalog/catalogues/transfer.xml- Ninth scenario: When we have a bunch of single
datasettags next to catalogref. It’s similar to third scenario but with more datasets. https://thredds.imk-ifu.kit.edu/thredds/catalog/regclim/raster/global/hydrogfd/v3.0/catalog.xml(nested)
- Parameters:
main_catalog_url – TDS Catalog url to start harvesting
nested_check – An option for checking nested datasets in TDS (True or False)
auth – Authentication for TDS catalog e.g.(‘user’, ‘password’)
logger_properties – A dictionary for logger properties.
requests_properties – A dictionary for requests properties.
- nested_checker(url: str)[source]#
A function for returning the depth of nested datasets in TDS for scenarios 1, 3, ,and 9
- nested_checker_exceptions(url: str)[source]#
A function for returning the depth of nested datasets in TDS for scenarios 2 and 8
- recognition_function(url: str, xml_content)[source]#
A function for recognizing number of scenarios in TDS
- First scenario: Just