datetimeinfo: Getting Time/Forecast Time Information from a NetCDF...

Description Usage Arguments Value Author(s) Examples

Description

Returns the time or forecast time information from a ncdf4 connection. Developed for some ECMWF forecasts, time information is stored as hours since 1900-01-01 wherefore init is required to compute forecast steps.

Usage

1
2
## Basic usage
datetimeinfo(nc,init)

Arguments

nc

Open ncdf4 connection.

init

Date, POSIXt, or character which can be converted into a POSIXt object.

Value

Returns a data.frame with 3 columns. init contains the init datetime, valid is the time for which the forecast is valid, and step is the forecast step or lead time.

Author(s)

Reto Stauffer

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Open NetCDF connection
nc <- nc_open("costgrib/ECMWF_cost_sfc_201111180000.nc")
# Get time information
datetimeinfo(nc,"2011-11-18")
# Close NetCDF connection
nc_close(nc)

## End(Not run)

retostauffer/Rcost documentation built on May 7, 2019, 9:43 p.m.