Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retrieve cmems insitu data on FTP via cmc instead of ftplib #715

Closed
veenstrajelmer opened this issue Dec 11, 2023 · 2 comments
Closed

retrieve cmems insitu data on FTP via cmc instead of ftplib #715

veenstrajelmer opened this issue Dec 11, 2023 · 2 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Dec 11, 2023

Currently retrieving CMEMS insitu data directly from FTP, since these datasets cannot be subsetted via copernicus-marine-client yet. Also, sonarcloud complains about security issues with FTP protocol and in theory this can be resolved with FTP_TLS but that fails with CMEMS FTP. An alternative is to approach the copernicus-marine-client by forcing the ftp service.

This works quite nicely:

import copernicus_marine_client as cmc
import warnings
with warnings.catch_warnings():
    warnings.filterwarnings(action="ignore", module="versions_verifier", category=DeprecationWarning)
    cmc.get(
        dataset_id="cmems_obs-ins_glo_phy-ssh_my_na_PT1H",
        force_service="ftp",
        filter="Core/INSITU_GLO_PHY_SSH_DISCRETE_MY_013_053/cmems_obs-ins_glo_phy-ssh_my_na_PT1H/index_history.txt",
        output_directory=".",
        overwrite_output_data=True,
        force_download=True,
        no_directories=True,
        # show_outputnames=True,
        # overwrite_output_data=True,
    )

Is it still worth to implement? It is expected that insitu data will be available via cmc subset from mid 2024 or maybe March 2024.

Also, setting disable_progress_bar=True hangs the retrieval process, so it seems to be less stable. Furthermore, the retrieval process seems slower.

@veenstrajelmer veenstrajelmer changed the title retrieve cmems insitu data on FTP via copernicus-marine-client instead of ftplib retrieve cmems insitu data on FTP via cmc instead of ftplib Dec 11, 2023
@veenstrajelmer
Copy link
Collaborator Author

Won't do, we will wait for the data to be available via copernicus-marine-client instead. In the meantime the sonarcloud quality gate will fail on the FTP security issues.

@veenstrajelmer veenstrajelmer closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2024
@veenstrajelmer
Copy link
Collaborator Author

veenstrajelmer commented Apr 8, 2024

Update 8-4-2024: ftp was discontinued, so we have to find a solution anyway. This will be done in #817

@veenstrajelmer veenstrajelmer reopened this Apr 8, 2024
@veenstrajelmer veenstrajelmer closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant