argopy.utils.check_gdac_path

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()