You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea of getting the original netcdf file is related directly with the BSH DMQC activities:
One needs to estimate the positions before running OWC, which takes the netcdf file downloaded from coriolis as input.
Then the file can be modified as necessary and then is sent back to coriolis, also as a netcdf file.
So I have a question @gmaze , is the output of ds.to_netcdf(wmo+ '_prof.nc')
an exact mirror of the netcdf file from the coriolis GDAC?
Using the fetcher this way: NO this is not the exact GDAC netcdf file !
attributes (global and for variables) are modified
the N_PROF may be different
If you want to retrieve the raw GDAC file, you can do this (this is undocumented):
# Point to the float you want:argo_set=ArgoDataFetcher(src='gdac', mode='expert', cache=True).float(wmo)
# Get the netcdf file location:uri=argo_set.uri[0] # uri is a list, take the 1st item because we fetch only one float here# Load the file:ds=argo_set.fetcher.fs.open_dataset(uri, decode_cf=1, use_cftime=0, mask_and_scale=1)
You can then modify this dataset and save it with to_netcdf
note: using to_xarray() on the above argo_set (like in your question) will do the raw download and then perform a lot of checking, possibly modifications, before returning a modified dataset.
Instead of using the ftp library, one could use argopy to retrieve the multi-profile file of a float like this:
In the notebook example, I think we could follow on to work with this dataset, but one could simply save it as a netcdf file as well:
The text was updated successfully, but these errors were encountered: