# NOT RUN {
{
# u is NetCDF and lat and lon characters
input <- system.file("extdata",
"uwnd.mon.mean_200hPa_2014JFM.nc",
package = "raytracing")
b <- betam(u = input, plots = TRUE)
cores <- c("#ff0000","#ff5a00","#ff9a00","#ffce00","#f0ff00")
graphics::filled.contour(b$betam/10e-12,
zlim = c(0, 11),
col = rev(colorRampPalette(cores)(24)),
main = "Beta Mercator (*10e-11)")
# u, lat and lon as numeric
input <- system.file("extdata",
"uwnd.mon.mean_200hPa_2014JFM.bin",
package = "raytracing")
u <- readBin(input,
what = numeric(),
size = 4,
n = 144*73*4)
lat <- seq(-90, 90, 2.5)
lon <- seq(-180, 180 - 1, 2.5)
u <- matrix(u,
nrow = length(lon),
ncol = length(lat))
graphics::filled.contour(u, main = "Zonal Wind Speed [m/s]")
}
# }
Run the code above in your browser using DataLab