This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wrf import getvar | |
from netCDF4 import Dataset | |
import xarray as xr | |
import pyproj | |
# Extract the variables of interest at time index 17 | |
ds = Dataset('../wrfout_d02_2015-07-12_1200.nc') | |
variables = [getvar(ds, var, 17) for var in ('z', 'dbz', 'pressure', 'ter', 'ua', | |
'va', 'wa', 'temp', 'rh')] | |
data = xr.merge(variables) |