Skip to content

Commit

Permalink
update vignette with new requests
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens committed Aug 27, 2024
1 parent 781282c commit d916759
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions vignettes/advanced_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,18 @@ This is a brief overview of some of the more advanced options in the `ecmwfr` pa
Another hidden feature of `ecmwfr` is the fact that the request is the first argument in the `wf_request()` function. This means that any valid list can be piped into this function (using the %>% or pipe symbol).

```{r eval = FALSE}
list(stream = "oper",
levtype = "sfc",
param = "167.128",
dataset = "interim",
step = "0",
grid = "0.75/0.75",
time = "00",
date = "2014-07-01/to/2014-07-02",
type = "an",
class = "ei",
area = "73.5/-27/33/45",
format = "netcdf",
target = "tmp.nc") |>
list(
product_type = 'reanalysis',
variable = 'geopotential',
year = '2024',
month = '03',
day = '01',
time = '13:00',
pressure_level = '1000',
data_format = 'grib',
dataset_short_name = 'reanalysis-era5-pressure-levels',
target = 'test.grib'
) |>
wf_request(path = "~")
```

Expand All @@ -59,22 +58,21 @@ The `wf_archetype()` function creates a new function with as parameters the dyna
# this is an example of a request
dynamic_request <- wf_archetype(
request = list(
"dataset_short_name" = "reanalysis-era5-pressure-levels",
"product_type" = "reanalysis",
"variable" = "temperature",
"pressure_level" = "850",
"year" = "2000",
"month" = "04",
"day" = "04",
"time" = "00:00",
"area" = "70/-20/30/60",
"format" = "netcdf",
"target" = "era5-demo.nc"
product_type = 'reanalysis',
variable = 'geopotential',
year = '2024',
month = '03',
day = '01',
time = '13:00',
pressure_level = '1000',
data_format = 'grib',
dataset_short_name = 'reanalysis-era5-pressure-levels',
target = 'test.grib'
),
dynamic_fields = c("area","day"))
dynamic_fields = c("day", "target"))
# change the day of the month
dynamic_request(day = "01")
dynamic_request(day = "01", target = "new.grib")
```

## Batch (parallel) requests
Expand Down

0 comments on commit d916759

Please sign in to comment.