Skip to content

Commit e481115

Browse files
authored
Merge pull request #125 from PabloCapilla/v3.4.0
'time_valid' replaced by 'valid_time' in edge_add_wind
2 parents ecaee2a + 3e80aef commit e481115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/edge_add_wind.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ edge_add_wind <- function(
171171
nc <- ncdf4::nc_open(file(i_s))
172172

173173
# Read data from netCDF file and convert the time of data to posixt
174-
# Fix to use the correct time variable ("time" until the new CDS, then "time_valid")
174+
# Fix to use the correct time variable ("time" until the new CDS, then "valid_time")
175175
if ("time" %in% names(nc$dim)) {
176176
time <- as.POSIXct(ncdf4::ncvar_get(nc, "time") * 60 * 60, origin = "1900-01-01", tz = "UTC")
177-
} else if ("time_valid" %in% names(nc$dim)) {
177+
} else if ("valid_time" %in% names(nc$dim)) {
178178
time <- as.POSIXct(ncdf4::ncvar_get(nc, "valid_time"), origin = "1970-01-01", tz = "UTC")
179179
} else {
180180
cli::cli_abort(c(

0 commit comments

Comments
 (0)