Dataset#

Profile count Profile BGC count

Hint

argopy makes a difference between the physical and biogeochemical parameters. To make sure you understand which data youโ€™re getting, have a look at this section.

Argo data are distributed as a single dataset. It is referenced at https://doi.org/10.17882/42182.

But they are several Argo missions with specific files and parameters that need special handling by argopy, namely:

  • the core Argo Mission: from floats that measure temperature, salinity, pressure down to 2000m,

  • the Deep Argo Mission: from floats that measure temperature, salinity, pressure down to 6000m,

  • and the BGC-Argo Mission: from floats that measure temperature, salinity, pressure and oxygen, pH, nitrate, chlorophyll, backscatter, irradiance down to 2000m.

Argo dataset available in argopy#

In argopy we simply make the difference between physical and biogeochemical parameters in the Argo dataset. This is because the Deep Argo mission data are accessible following the same files and parameters than those from the Core mission. Only BGC-Argo data requires specific files and parameters.

In argopy you can thus get access to the following Argo data:

  1. the phy dataset, for physical parameters.

    This dataset provides data from floats that measure temperature, salinity, pressure, without limitation in depth. It is available from all Available data sources. Since this is the most common Argo data subset itโ€™s selected with the phy keyword by default in argopy.

  2. the bgc dataset, for biogeochemical parameters.

    This dataset provides data from floats that measure temperature, salinity, pressure and oxygen, pH, nitrate, chlorophyll, backscatter, irradiance, without limitation in depth. You can select this dataset with the keyword bgc and methods described below.

Selecting a dataset#

You have several ways to specify which dataset you want to use:

  • using argopy global options:

In [1]: import argopy

In [2]: argopy.set_options(ds='bgc')
Out[2]: <argopy.options.set_options at 0x728dfa6dc090>
  • with an option in a temporary context:

In [3]: import argopy

In [4]: with argopy.set_options(ds='phy'):
   ...:     argopy.DataFetcher().profile(6904241, 12)
   ...: 
  • with the `ds` argument in the data fetcher:

In [5]: argopy.DataFetcher(ds='phy').profile(6902746, 34)
Out[5]: 
<datafetcher.erddap>
โญ Name: Ifremer erddap Argo data fetcher for profiles
โš“ Domain: WMO6902746_CYC34
๐Ÿ”— API: https://erddap.ifremer.fr/erddap
๐ŸŠ User mode: standard
๐ŸŸก+๐Ÿ”ต Dataset: phy
๐ŸŒค  Performances: cache=False, parallel=True [thread]

Note

In the future, we could consider to add more mission specific keywords for the dataset option and ds fetcher argument of DataFetcher. This could be deep for instance. Please raise an gitHub โ€œissueโ€ if you may require such a new feature.

The bgc dataset#

Important

At this time, BGC parameters from synthetic files are available with the erddap and gdac data source.

All argopy features work with the phy dataset. However, they are some specific methods dedicated to the bgc dataset that we now describe.

Specifics in DataFetcher#

The BGC-Argo Mission gathers data from floats that measure temperature, salinity, pressure and oxygen, pH, nitrate, chlorophyll, backscatter, irradiance down to 2000m. However, beyond this short BGC parameter list there exist in the Argo dataset more than 120 BGC-related variables. Therefore, in the DataFetcher we implemented 2 specific arguments to handle BGC variables: params and measured.

The params argument#

With a DataFetcher, the params argument can be used to specify which variables will be returned, whatever their values or availability in BGC floats found in the data selection.

By default, the params argument is set to the keyword all to return all variables found in the data selection. But the params argument can also be a single variable or a list of variables, in which case only these will be returned and all the others discarded.

Syntax example
  • To return data from a single BGC parameter, just add it as a string, for instance DOXY

  • To return more than one BGC parameter, give them as a list of strings, for instance ['DOXY', 'BBP700']

  • To retrieve all available BGC parameters, you can omit the params argument (since this is the default value), or give it explicitly as all.

In [6]: import argopy

In [7]: with argopy.set_options(ds='bgc', src='erddap', mode='expert'):
   ...:     params = 'all'  # eg: 'DOXY' or ['DOXY', 'BBP700']
   ...:     f = argopy.DataFetcher(params=params)
   ...:     f = f.region([-75, -45, 20, 30, 0, 10, '2021-01', '2021-06'])
   ...:     f.load()
   ...: 
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
Cell In[7], line 5
      3 f = argopy.DataFetcher(params=params)
      4 f = f.region([-75, -45, 20, 30, 0, 10, '2021-01', '2021-06'])
----> 5 f.load()

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    646     opts["open_dataset_opts"] = {
    647         "errors": "ignore",
    648         "download_url_opts": {"errors": "ignore"},
    649     }
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:
    655     if results is not None:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    693 ################################
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################
    709 elif method == "thread":

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    587         raise DataNotFound("An error occurred while finalizing the dataset")
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):
    592     raise ValueError(
    593         "Errors happened with all URLs, this could be due to an internal impossibility to read returned content"
    594     )

DataNotFound: 'All URLs returned DataNotFound !'

In [8]: print(f.data.argo, "\n")  # Easy print of N profiles and points
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
Cell In[8], line 1
----> 1 print(f.data.argo, "\n")  # Easy print of N profiles and points

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:347, in ArgoDataFetcher.data(self)
    339 """Data structure
    340 
    341 Returns
   (...)
    344     Fetched data
    345 """
    346 if not isinstance(self._data, xr.Dataset) or self._request != self.__repr__():
--> 347     self.load()
    348     if self._data is None:
    349         raise DataNotFound("Seems like no data were found. Try to use to_xarray() explicitly")

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    646     opts["open_dataset_opts"] = {
    647         "errors": "ignore",
    648         "download_url_opts": {"errors": "ignore"},
    649     }
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:
    655     if results is not None:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    693 ################################
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################
    709 elif method == "thread":

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    587         raise DataNotFound("An error occurred while finalizing the dataset")
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):
    592     raise ValueError(
    593         "Errors happened with all URLs, this could be due to an internal impossibility to read returned content"
    594     )

DataNotFound: 'All URLs returned DataNotFound !'

In [9]: print(list(f.data.data_vars))  # List of dataset variables
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
Cell In[9], line 1
----> 1 print(list(f.data.data_vars))  # List of dataset variables

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:347, in ArgoDataFetcher.data(self)
    339 """Data structure
    340 
    341 Returns
   (...)
    344     Fetched data
    345 """
    346 if not isinstance(self._data, xr.Dataset) or self._request != self.__repr__():
--> 347     self.load()
    348     if self._data is None:
    349         raise DataNotFound("Seems like no data were found. Try to use to_xarray() explicitly")

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    646     opts["open_dataset_opts"] = {
    647         "errors": "ignore",
    648         "download_url_opts": {"errors": "ignore"},
    649     }
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:
    655     if results is not None:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    693 ################################
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################
    709 elif method == "thread":

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    587         raise DataNotFound("An error occurred while finalizing the dataset")
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):
    592     raise ValueError(
    593         "Errors happened with all URLs, this could be due to an internal impossibility to read returned content"
    594     )

DataNotFound: 'All URLs returned DataNotFound !'

The measured argument#

With a DataFetcher, the measured argument can be used to specify which variables cannot be NaN and must return values. This is very useful to reduce a dataset to points where all or some variables are available.

By default, the measured argument is set to None for unconstrained parameter values. To the opposite, the keyword all requires that all variables found in the data selection cannot be NaNs. In between, you can specify one or more parameters to limit the constrain to a few variables.

Syntax example

Letโ€™s impose that some variables cannot be NaNs, for instance DOXY and BBP700:

In [10]: import argopy

In [11]: with argopy.set_options(ds='bgc', src='erddap', mode='expert'):
   ....:     f = argopy.DataFetcher(params='all', measured=['DOXY', 'BBP700'])
   ....:     f = f.region([-75, -45, 20, 30, 0, 10, '2021-01', '2021-06'])
   ....:     f.load()
   ....: 
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):

DataNotFound: 'All URLs returned DataNotFound !'

During handling of the above exception, another exception occurred:

DataNotFound                              Traceback (most recent call last)
Cell In[11], line 4
      2 f = argopy.DataFetcher(params='all', measured=['DOXY', 'BBP700'])
      3 f = f.region([-75, -45, 20, 30, 0, 10, '2021-01', '2021-06'])
----> 4 f.load()

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:672, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    661 if (
    662     self.dataset_id in ["bgc", "bgc-s"]
    663     and len(self._bgc_vlist_measured) > 0
    664 ):
    665     msg = (
    666         "Your BGC request returned no data. This may be due to the 'measured' "
    667         "argument that imposes constraints impossible to fulfill for the "
   (...)
    670         "access point."
    671     )
--> 672     raise DataNotFound(msg)
    673 else:
    674     raise

DataNotFound: "Your BGC request returned no data. This may be due to the 'measured' argument that imposes constraints impossible to fulfill for the access point defined ([x=-75.00/-45.00; y=20.00/30.00; z=0.0/10.0; t=2021-01-01/2021-06-01]), i.e. some variables in 'measured' are not available in some floats in this access point."

In [12]: print(f.data.argo, "\n")  # Easy print of N profiles and points
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):

DataNotFound: 'All URLs returned DataNotFound !'

During handling of the above exception, another exception occurred:

DataNotFound                              Traceback (most recent call last)
Cell In[12], line 1
----> 1 print(f.data.argo, "\n")  # Easy print of N profiles and points

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:347, in ArgoDataFetcher.data(self)
    339 """Data structure
    340 
    341 Returns
   (...)
    344     Fetched data
    345 """
    346 if not isinstance(self._data, xr.Dataset) or self._request != self.__repr__():
--> 347     self.load()
    348     if self._data is None:
    349         raise DataNotFound("Seems like no data were found. Try to use to_xarray() explicitly")

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:672, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    661 if (
    662     self.dataset_id in ["bgc", "bgc-s"]
    663     and len(self._bgc_vlist_measured) > 0
    664 ):
    665     msg = (
    666         "Your BGC request returned no data. This may be due to the 'measured' "
    667         "argument that imposes constraints impossible to fulfill for the "
   (...)
    670         "access point."
    671     )
--> 672     raise DataNotFound(msg)
    673 else:
    674     raise

DataNotFound: "Your BGC request returned no data. This may be due to the 'measured' argument that imposes constraints impossible to fulfill for the access point defined ([x=-75.00/-45.00; y=20.00/30.00; z=0.0/10.0; t=2021-01-01/2021-06-01]), i.e. some variables in 'measured' are not available in some floats in this access point."

In [13]: print(list(f.data.data_vars))  # List of dataset variables
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-60.0&longitude%3C=-45.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1609459200.0&time%3C=1615982400.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
Error: 503, message='Service Unavailable', url='https://erddap.ifremer.fr/erddap/tabledap/ArgoFloats-synthetic-BGC.nc?bbp532,bbp532_adjusted,bbp532_adjusted_error,bbp532_adjusted_qc,bbp532_qc,bbp700,bbp700_adjusted,bbp700_adjusted_error,bbp700_adjusted_qc,bbp700_qc,chla,chla_adjusted,chla_adjusted_error,chla_adjusted_qc,chla_qc,config_mission_number,cycle_number,direction,down_irradiance380,down_irradiance380_adjusted,down_irradiance380_adjusted_error,down_irradiance380_adjusted_qc,down_irradiance380_qc,down_irradiance412,down_irradiance412_adjusted,down_irradiance412_adjusted_error,down_irradiance412_adjusted_qc,down_irradiance412_qc,down_irradiance490,down_irradiance490_adjusted,down_irradiance490_adjusted_error,down_irradiance490_adjusted_qc,down_irradiance490_qc,downwelling_par,downwelling_par_adjusted,downwelling_par_adjusted_error,downwelling_par_adjusted_qc,downwelling_par_qc,doxy,doxy_adjusted,doxy_adjusted_error,doxy_adjusted_qc,doxy_qc,latitude,longitude,nitrate,nitrate_adjusted,nitrate_adjusted_error,nitrate_adjusted_qc,nitrate_qc,ph_in_situ_total,ph_in_situ_total_adjusted,ph_in_situ_total_adjusted_error,ph_in_situ_total_adjusted_qc,ph_in_situ_total_qc,platform_number,position_qc,pres,pres_adjusted,pres_adjusted_error,pres_adjusted_qc,pres_qc,psal,psal_adjusted,psal_adjusted_error,psal_adjusted_qc,psal_qc,temp,temp_adjusted,temp_adjusted_error,temp_adjusted_qc,temp_qc,time,time_qc&longitude%3E=-75.0&longitude%3C=-60.0&latitude%3E=20&latitude%3C=30&pres%3E=0&pres%3C=10&time%3E=1615982400.0&time%3C=1622505600.0&latitude!=NaN&longitude!=NaN&distinct()&orderBy(%22time,pres%22)'
---------------------------------------------------------------------------
DataNotFound                              Traceback (most recent call last)
File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:652, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    650     opts["progress"] = False
--> 652 results = self.fs.open_mfdataset(URI, **opts)
    654 if concat:

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:695, in httpstore.open_mfdataset(self, urls, max_workers, method, progress, concat, concat_dim, concat_method, preprocess, preprocess_opts, open_dataset_opts, errors, compute_details, *args, **kwargs)
    694 if method == "erddap":
--> 695     return self._open_mfdataset_from_erddap(
    696         urls=urls,
    697         concat_dim=concat_dim,
    698         max_workers=max_workers,
    699         preprocess=preprocess,
    700         preprocess_opts=preprocess_opts,
    701         concat=concat,
    702         progress=progress,
    703         compute_details=compute_details,
    704         *args,
    705         **kwargs,
    706     )
    708 ################################

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/stores/implementations/http.py:589, in httpstore._open_mfdataset_from_erddap(self, urls, concat_dim, max_workers, preprocess, preprocess_opts, concat, progress, compute_details, *args, **kwargs)
    588     else:
--> 589         raise results
    591 elif len(failed) == len(urls):

DataNotFound: 'All URLs returned DataNotFound !'

During handling of the above exception, another exception occurred:

DataNotFound                              Traceback (most recent call last)
Cell In[13], line 1
----> 1 print(list(f.data.data_vars))  # List of dataset variables

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:347, in ArgoDataFetcher.data(self)
    339 """Data structure
    340 
    341 Returns
   (...)
    344     Fetched data
    345 """
    346 if not isinstance(self._data, xr.Dataset) or self._request != self.__repr__():
--> 347     self.load()
    348     if self._data is None:
    349         raise DataNotFound("Seems like no data were found. Try to use to_xarray() explicitly")

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:886, in ArgoDataFetcher.load(self, force, **kwargs)
    882     force = True
    884 if not self._loaded or force:
    885     # Fetch measurements:
--> 886     self._data = self._to_xarray(**kwargs)
    887     # Next 2 lines must come before ._index because to_index(full=False) calls back on .load() to read .data
    888     self._request = self.__repr__()  # Save definition of loaded data

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/fetchers.py:673, in ArgoDataFetcher._to_xarray(self, **kwargs)
    668 if not self.fetcher:
    669     raise InvalidFetcher(
    670         " Initialize an access point (%s) first."
    671         % ",".join(self.Fetchers.keys())
    672     )
--> 673 xds = self.fetcher.to_xarray(**kwargs)
    674 xds = self.postprocess(xds)
    676 return xds

File ~/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/data_fetchers/erddap_data.py:672, in ErddapArgoDataFetcher.to_xarray(self, errors, add_dm, concat, max_workers)
    661 if (
    662     self.dataset_id in ["bgc", "bgc-s"]
    663     and len(self._bgc_vlist_measured) > 0
    664 ):
    665     msg = (
    666         "Your BGC request returned no data. This may be due to the 'measured' "
    667         "argument that imposes constraints impossible to fulfill for the "
   (...)
    670         "access point."
    671     )
--> 672     raise DataNotFound(msg)
    673 else:
    674     raise

DataNotFound: "Your BGC request returned no data. This may be due to the 'measured' argument that imposes constraints impossible to fulfill for the access point defined ([x=-75.00/-45.00; y=20.00/30.00; z=0.0/10.0; t=2021-01-01/2021-06-01]), i.e. some variables in 'measured' are not available in some floats in this access point."

We can see from f.data.argo.N_POINTS that the dataset is reduced compared to the previous version without constraints on variables measured.

Specifics in ArgoIndex#

All details and examples of the BGC specifics methods for ArgoIndex can be found in: Specifics to bgc Index.