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

support for era-5-land #40

Closed
everydayduffy opened this issue Sep 2, 2019 · 2 comments
Closed

support for era-5-land #40

everydayduffy opened this issue Sep 2, 2019 · 2 comments

Comments

@everydayduffy
Copy link

Hello,

Recently, the ERA5-land dataset was released. I'm trying to use wf_request to obtain this data, but am unsure what I should put as my product_type and dataset variable in the request list. If you have any advice that would be much appreciated. Here is an example request:

# area of interest
ar <- paste0(5,"/",-2,"/",1,"/",2)

request <- list(
      area = ar,
      product_type = "reanalysis-era5-land",
      format = "netcdf",
      variable = c("2m_temperature", "2m_dewpoint_temperature", 
                   "10m_u_component_of_wind", "10m_v_component_of_wind"),
      year = "2007",
      month = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", 
                "12"),
      day = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", 
              "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", 
              "23", "24", "25", "26", "27", "28", "29", "30", "31"),
      time = c("00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", 
               "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", 
               "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", 
               "21:00", "22:00", "23:00"),
      dataset = "reanalysis-era5-land",
      target = "test.nc")
@khufkens
Copy link
Member

khufkens commented Sep 2, 2019

Have you seen the documentation here on how to transform the API request to an R request using the rstudio addin?

https://khufkens.github.io/ecmwfr/articles/cds_vignette.html

This is what you get if you do so:

request <- list(
  format = "netcdf",
  variable = c("10m_u_component_of_wind", "10m_v_component_of_wind", "2m_dewpoint_temperature", "2m_temperature"),
  year = "2007",
  month = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"),
  day = c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"),
  time = c("00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"),
  dataset = "reanalysis-era5-land",
  target = "download.nc"
)

This should work, adjust the area manually.

@everydayduffy
Copy link
Author

Brilliant. Looks like product_type is absent for these requests. That seems to be working. Thanks for your quick response and also thank you for developing such a useful package!

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

No branches or pull requests

2 participants