knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Based on this NCL

library(eixport)
library(raster)
library(stars)
library(cptcity)
library(sf)

Reading Temperature

wrfo <- "/media/sergio/ext5/WRF4/WRF/test/em_real/wrfout_d01_2014-10-03_00:00:00"
t2 <- wrf_get(wrfo, "T2", as_raster = T)
t2 <- t2$T2 -273.15# we select one

Find colour palette for temperature

find_cpt("temperature")

Based on NCL:

plot(t2, main = "Temperature using plot", col = cpt("arendal_temperature"))
contour(t2, 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"))


ibarraespinosa/eixport documentation built on Feb. 13, 2024, 12:46 a.m.