Skip to content

Commit

Permalink
fix example that can give error if 1800UTC forecast is not up yet.
Browse files Browse the repository at this point in the history
Add date for previous day so that the example may be run at any time.
Previously the example could give an error if the 1800UTC forecast link
was not up yet.
  • Loading branch information
potterzot committed Sep 9, 2015
1 parent 7735e56 commit 243e76a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/gefs.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
#' #specific ensemble and times, for the 1800 forecast.
#' # here ensembles 1-3 (ensembles are numbered starting with 0)
#' # and time for 2 days from today at 1800
#' date=format(as.Date(Sys.time()) - 1, "%Y%m%d")
#' var = "Temperature_height_above_ground_ens"
#' gefs(var, lat, lon, forecast_time = "1800", ens_idx=2:4, time_idx=1:8)
#' gefs(var, lat, lon, date = date, forecast_time = "1800", ens_idx=2:4, time_idx=1:8)
#'
#' #One ensemble, all latitudes and longitudes (this is a big file) for the
#' # next 3 days.
Expand Down
3 changes: 2 additions & 1 deletion man/gefs.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ forecast_yesterday_prec = gefs("Total_precipitation_surface_6_Hour_Accumulation_
#specific ensemble and times, for the 1800 forecast.
# here ensembles 1-3 (ensembles are numbered starting with 0)
# and time for 2 days from today at 1800
date=format(as.Date(Sys.time()) - 1, "\%Y\%m\%d")
var = "Temperature_height_above_ground_ens"
gefs(var, lat, lon, forecast_time = "1800", ens_idx=2:4, time_idx=1:8)
gefs(var, lat, lon, date = date, forecast_time = "1800", ens_idx=2:4, time_idx=1:8)

#One ensemble, all latitudes and longitudes (this is a big file) for the
# next 3 days.
Expand Down

0 comments on commit 243e76a

Please sign in to comment.