View source: R/wind_functions2.R
| wind.dl | R Documentation |
wind.dl downloads wind data from the Global Forecast System (GFS) of the USA's National Weather Service (NWS) (https://www.ncei.noaa.gov/products/weather-climate-models/global-forecast). Wind data are taken from NOAA/NCEP Global Forecast System (GFS) Atmospheric Model collection. Geospatial resolution is 0.5 degrees (approximately 50 km), and wind is calculated for Earth surface, at 10 m. More metadata information for the current PacIOOS data: https://pae-paha.pacioos.hawaii.edu/erddap/griddap/ncep_global.graph Historical data are obtained from the official NOAA/NCEI GFS 0.5 degree archive: https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00634
wind.dl(
yyyy,
mm,
dd,
tt,
lon1,
lon2,
lat1,
lat2,
type = "read-data",
trace = 1,
source = c("auto", "pacioos", "ncei")
)
read.rWind(file)
yyyy |
Selected year. |
mm |
Selected month. |
dd |
Selected day. |
tt |
Selected time. There are currently several options at the GFS database: 00:00 - 03:00 - 06:00 - 09:00 - 12:00 - 15:00 - 18:00 - 21:00 (UTC). |
lon1 |
Western longitude |
lon2 |
Eastern longitude |
lat1 |
Southern latitude |
lat2 |
Northern latitude |
type |
Output type. "read-data" is selected by default, creating an R object. If you choose "csv", wind.dl create a a CSV file in your working directory named "wind_yyyy_mm_dd_tt.csv". |
trace |
if trace = 1 (by default) track downloaded files |
source |
Data provider. |
file |
file name of the saved ".csv" files. |
The output type is determined by type="csv" or type="read-data". If type="csv" is selected, the function creates a "wind_yyyy_mm_dd_tt.csv" file that is downloaded at the work directory. If type="read-data" is selected, an R object (data.frame) is created.
wind.dl() and read.rWind() return an object of classes rWind
and data.frame, with one row per grid cell. Columns are time (POSIXct,
UTC), lat and lon (degrees), ugrd10m and vgrd10m (eastward and
northward wind components in m/s), dir (direction of movement, in degrees
clockwise from north), and speed (m/s). With type = "csv", wind.dl()
also writes a CSV file in the working directory and returns the same object.
Longitude coordinate are provided by GFS dataset in 0/360 notation
and transformed internally into -180/180. Wind "dir" denotes where the
wind is going (toward), not from where is coming. With source = "auto",
dates before the current PacIOOS coverage are requested from NOAA/NCEI.
Javier Fernández-López (jflopez.bio@gmail.com)
http://www.digital-geography.com/cloud-gis-getting-weather-data/#.WDOWmbV1DCL
https://pae-paha.pacioos.hawaii.edu/erddap/griddap/ncep_global.graph
wind.dl_2, wind2raster
# Download wind for Iberian Peninsula region at 2015, February 12, 00:00
wind.dl(2015, 2, 12, 0, -10, 5, 35, 45)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.