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

Suggestions on copernicus_product_details and copernicus_products_list #10

Open
RSO9192 opened this issue Mar 19, 2023 · 6 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@RSO9192
Copy link
Contributor

RSO9192 commented Mar 19, 2023

  • It would be nice if the URL in copernicus_product_list, column thumbnailUrl, is not a link to an image but the actual URL of the dataset in the COPERNICUS Marine data store
  • Is it possible to add information on the CRS in one additional column?
  • I find it very difficult to find information from copernicus_product_details that can then be used in copernicus_download_motu. For example, information on layer or sub_variables arguments. Maybe it would be possible to write a function that takes a product name as input and outputs all the possible information that can be used in copernicus_download_motu ?
@pepijn-devries
Copy link
Owner

Hi Riccardo,

Thank you for taking the time for providing constructive feedback. Note that this R package was primarily intended as a wrapper around the Copernicus Marine API's. This package is therefore limited by the services provided by Copernicus. With that in mind please see my response to your specific inquiries below.

  • It would be nice if the URL in copernicus_product_list, column thumbnailUrl, is not a link to an image but the actual URL of the dataset in the COPERNICUS Marine data store

The function copernicus_product_list simply returns an R-friendly (data.frame) list of products as provided by Copernicus. I prefer not to stray from the provided information and further modify or complicate this function in order to keep it easier to maintain.

  • Is it possible to add information on the CRS in one additional column?

CRS is not provided by Copernicus and therefore cannot be added as a column. Note, that when you read downloaded NetCDF files with the stars package, the correct CRS is included automatically.

  • I find it very difficult to find information from copernicus_product_details that can then be used in copernicus_download_motu. For example, information on layer or sub_variables arguments. Maybe it would be possible to write a function that takes a product name as input and outputs all the possible information that can be used in copernicus_download_motu ?

At the moment these functions return the information from the API as is. I agree that the information is a bit overwhelming, this is also true for the Copernicus dashboard. At some stage I might try to simplify the information stream going from the product details to the download function. My current priority is to add an interface for in situ data and to fix the download for some specific products. I’ll leave this issue open and hope to get around to this in the near future.

@pepijn-devries pepijn-devries added the enhancement New feature or request label Mar 19, 2023
@pepijn-devries pepijn-devries self-assigned this Mar 19, 2023
@RSO9192
Copy link
Contributor Author

RSO9192 commented Mar 19, 2023

Thanks, Pepijn,
all clear. Maybe regarding the output of copernicus_product_details, this can be filtered using the stringr package, to filter and retain the most relevant information, in particular, for the usage of copernicus_download_motu. Thus, it might be enough to simply make another function to clean the output of copernicus_product_details for the specific purpose of retaining only the necessary information for copernicus_download_motu. I might give it a try as soon as I find some time.

@jatalah
Copy link

jatalah commented Nov 8, 2023

Hi, I am receiving the following message when I attempt to run the example of the copernicus_download_motu function:

Already logged in
Preparing download...
Failed to collect information from Copernicus.
Could not resolve host: cmems-be.lobelia.earth

Do you have any ideas on how to resolve this issue?

sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_New Zealand.utf8 LC_CTYPE=English_New Zealand.utf8 LC_MONETARY=English_New Zealand.utf8 LC_NUMERIC=C
[5] LC_TIME=English_New Zealand.utf8

time zone: Pacific/Auckland
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] leaflet_2.1.2 CopernicusMarine_0.0.9 conflicted_1.2.0 ggthemes_4.2.4 lubridate_1.9.2 forcats_1.0.0
[7] stringr_1.5.0 dplyr_1.1.2 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[13] ggplot2_3.4.2 tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] utf8_1.2.3 generics_0.1.3 xml2_1.3.5 stringi_1.7.12 hms_1.1.3 digest_0.6.31 magrittr_2.0.3 evaluate_0.21
[9] grid_4.3.1 timechange_0.2.0 fastmap_1.1.1 httr_1.4.7 rvest_1.0.3 fansi_1.0.4 crosstalk_1.2.0 scales_1.2.1
[17] cli_3.6.1 crayon_1.5.2 rlang_1.1.1 munsell_0.5.0 withr_2.5.1 cachem_1.0.8 tools_4.3.1 tzdb_0.4.0
[25] memoise_2.0.1 colorspace_2.1-0 curl_5.0.1 vctrs_0.6.2 R6_2.5.1 lifecycle_1.0.3 htmlwidgets_1.6.2 pkgconfig_2.0.3
[33] pillar_1.9.0 gtable_0.3.3 glue_1.6.2 highr_0.10 xfun_0.39 tidyselect_1.2.0 knitr_1.43 rstudioapi_0.14
[41] htmltools_0.5.5 compiler_4.3.1

@pepijn-devries
Copy link
Owner

The server seems to be offline at the moment, the URL (https://cmems-be.lobelia.earth) also won't open in my browser. This does not seem to be an issue with the package. Maybe you could try contacting the people at Copernicus (https://marine.copernicus.eu)

@pepijn-devries
Copy link
Owner

@jatalah I was too soon with my response. Please check #15

@jatalah
Copy link

jatalah commented Nov 9, 2023

Thanks for the follow-up. I am still having issues. Please see #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants