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

Here we attempt to provide useful code to generate figures from WRF outputs based on known galleries. For instance, NCL and WRF-Python provides extensive examples for plotting WRF outputs. Therefore, we aim to replicate some of these. Our approach to read wrfout files is based on eixport which relies r packages with GDAL bindings such as raster and stars. We do not try to provide a full gallery, instead, some basics and necessary plots to inspire other R used and receive more examples so share with the community.

packages

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

Based on NCL:

First lets get a summary of a WRF output file

wrfo <- "/media/sergio/ext5/WRF4/WRF/test/em_real/wrfout_d01_2014-10-03_00:00:00"
(dt <- wrf_meta(wrfo)$vars)

Now we can select some variables

(vars <- dt[dt$MemoryOrder == "XYZ", ]$vars)

Now get some statistics

wrf_summary(wrfo, vars = c("co"))


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