Closed dancrear closed 6 months ago
Hi @dancrear,
Thank you for reporting. I've not figured out yet what is going wrong here exactly. But do note that you can get the available layer names with:
library(CopernicusMarine)
details <- cms_product_details("GLOBAL_ANALYSISFORECAST_BGC_001_028",
variant = "detailed-v3")
Showing that cmems_mod_glo_bgc-pft_anfc_0.25deg_P1M-m_202311
is the correct layer name. But even with that name it's still not working. I will have to some more digging and get back to you on that.
Cheers,
Pepijn
Hi @dancrear,
Unfortunately, I'm not able to figure out what is going wrong here. My implementation of the API at https://data-be-prd.marine.copernicus.eu/api/download/ is based on reversed engineering. The API does not give any feedback on why this particular request is not accepted. The documentation of the API is also pretty much non-existing to my knowledge. I will contact the people at Copernicus Marine to see if they are willing to help me out.
Meanwhile, I will also work on implementing subsetting Copernicus Marine data with ZARR (see https://github.com/pepijn-devries/CopernicusMarine/issues/34), but this may take some time.
As a temporary workaround you could either download the complete set with cms_download_stac
or use the deprecated copernicus_download_motu
method. However, the last option may become defunct in the future.
Any progress on the issue reported here will be posted here...
Cheers,
Pepijn
In order to keep the issues tidy, I will bundle all related issues on this matter here: https://github.com/pepijn-devries/CopernicusMarine/issues/42
And close this one.
Hi @pepijn-devries
Apologize for pinging you again here. Looks like there's a strange issue going on when downloading any layers from the product GLOBAL_ANALYSISFORECAST_BGC_001_028. I used the same code framework I have for downloading other physical and biogeochemical products but pretty immediately after the Preparing job... text comes up in the console I receive the error:
Failed to collect information from subset-job. HTTP 400 Bad Request.
I've messed around a lot with years, months, layers, and variables and I get the same error. Below is the code I tried.
cms_download_subset( destination = destination, product = “GLOBAL_ANALYSISFORECAST_BGC_001_028”, layer = "cmems_mod_glo_bgc-pft_anfc_0.25deg_P1D-m", variable = c("chl","phyc"), region = c(-150,-40,-70,40), timerange = c("2022-01-01 UTC", "2022-02-01 UTC"), verticalrange = c(0, -1), overwrite = TRUE)
Thanks again for your help! As you can see I'm trying to use your package to download a lot of different variables so I really appreciate your work on this.
Best, Dan