knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Based on this NCL
library(eixport) library(raster) library(stars) library(cptcity) library(sf)
Reading Temperature
wrfo <- "/home/sergio/R/x86_64-pc-linux-gnu-library/4.3/helios/extras/wrfout_d01_2020-01-01_01%3A00%3A00_sub.nc" t2 <- wrf_get(wrfo, "T2", as_raster = T) t2[] <- t2[] -273.15# we select one
Find colour palette for temperature
find_cpt("temperature")
Based on NCL:
plot(t2[[1]], main = "Temperature using plot", col = cpt("arendal_temperature")) contour(t2[[1]], add = T)
#spplot(t2, main = "Temperature 2m using spplot", scales=list(draw = TRUE), # col.regions = cpt("idv_temperature"), # sp.layout = list("sp.lines", as_Spatial(cl), col = "black"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.