|
16 | 16 | #' @param pressure pressure measurement of the associated `tag` data used to estimate the pressure |
17 | 17 | #' level (i.e., altitude) of the bird during the flights. This data.frame needs to contain `date` as |
18 | 18 | #' POSIXt and `value` in hPa. |
19 | | -#' @param variable list of the variables to extract from [the ERA5 pressure level]( |
20 | | -#' https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Table9) # nolint |
21 | | -#' using the `shortName` notation: `"u"`, `"v"`, `"t"`, `"cc"`, `"r"`, , `"w"`, `"ciwc"`, `"clwc"`, |
22 | | -#' `"q"`, `"cswc"`, `"d"`, `"z"`, `"o3"`, `"pv"`, `'vo"`. |
| 19 | +#' @param variable list of the variables to extract from [the ERA5 pressure level |
| 20 | +#' ](https://bit.ly/3BrwLBM) using the `shortName` notation: `"u"`, `"v"`, `"t"`, `"cc"`, `"r"`, |
| 21 | +#' `"w"`, `"ciwc"`, `"clwc"`, `"q"`, `"cswc"`, `"d"`, `"z"`, `"o3"`, `"pv"`, `'vo"`. |
23 | 22 | #' @param rounding_interval temporal resolution on which to query the variable (min). Default is to |
24 | 23 | #' macth ERA5 native resolution (1hr). |
25 | 24 | #' @param interp_spatial_linear logical to interpolate the variable linearly over space, if `FALSE` |
@@ -173,7 +172,9 @@ edge_add_wind <- function( |
173 | 172 | # Read data from netCDF file and convert the time of data to posixt |
174 | 173 | # Fix to use the correct time variable ("time" until the new CDS, then "valid_time") |
175 | 174 | if ("time" %in% names(nc$dim)) { |
176 | | - time <- as.POSIXct(ncdf4::ncvar_get(nc, "time") * 60 * 60, origin = "1900-01-01", tz = "UTC") |
| 175 | + time <- as.POSIXct(ncdf4::ncvar_get(nc, "time") * 60 * 60, |
| 176 | + origin = "1900-01-01", tz = "UTC" |
| 177 | + ) |
177 | 178 | } else if ("valid_time" %in% names(nc$dim)) { |
178 | 179 | time <- as.POSIXct(ncdf4::ncvar_get(nc, "valid_time"), origin = "1970-01-01", tz = "UTC") |
179 | 180 | } else { |
@@ -472,7 +473,9 @@ edge_add_wind_check <- function( |
472 | 473 |
|
473 | 474 | # Check that the time is matching |
474 | 475 | if ("time" %in% names(nc$dim)) { |
475 | | - time <- as.POSIXct(ncdf4::ncvar_get(nc, "time") * 60 * 60, origin = "1900-01-01", tz = "UTC") |
| 476 | + time <- as.POSIXct(ncdf4::ncvar_get(nc, "time") * 60 * 60, |
| 477 | + origin = "1900-01-01", tz = "UTC" |
| 478 | + ) |
476 | 479 | } else if ("valid_time" %in% names(nc$dim)) { |
477 | 480 | time <- as.POSIXct(ncdf4::ncvar_get(nc, "valid_time"), origin = "1970-01-01", tz = "UTC") |
478 | 481 | } else { |
|
0 commit comments