argopy.utils.check_gdac_path#
- check_gdac_path(path, errors: str = 'ignore', ignore_knowns: bool = False)[source]#
Check if a path has the expected GDAC structure
Expected GDAC structure:
. βββ dac βββ aoml βββ ... βββ coriolis βββ ... βββ meds βββ nmdis
Examples:
>>> check_gdac_path("https://data-argo.ifremer.fr") # True >>> check_gdac_path("https://usgodae.org/pub/outgoing/argo") # True >>> check_gdac_path("ftp://ftp.ifremer.fr/ifremer/argo") # True >>> check_gdac_path("/home/ref-argo/gdac") # True >>> check_gdac_path("s3://argo-gdac-sandbox/pub") # True
>>> check_gdac_path("https://www.ifremer.fr") # False >>> check_gdac_path("ftp://usgodae.org/pub/outgoing") # False
- Parameters:
path (str) β Path name to check, including access protocol
errors (str, default="ignore") β Determine how check procedure error are handled: βignoreβ, βraiseβ or βwarnβ
ignore_knowns (bool, default=False) β Should the checking procedure be by-passed for the internal list of known GDACs. Set this to True to check if a known GDACs is connected or not.
- Returns:
checked
- Return type:
boolean
See also
argopy.stores.gdacfs
,argopy.utils.list_gdac_servers()