518er2005
Member
Hello everyone,
For my analysis related to wind resource assessment, I need to find the wind speed values at various heights, i.e., 10m, 20m, and likewise up to 100m. I tried using "wrf.vinterp()", but it seems after 50 m the values are not changing. Also, I tried using "wrf.interplevel". While using "wrf.interplevel" the issue is that over the land I am getting nan values at the lower heights, such as 50m, 20m, 60m, etc. I am attaching the images as well as the code.
So, in this regard, if anyone can help how to compute the wind speed for various heights, it will be much appreciated.
The code used:
With regards,
Debashis
For my analysis related to wind resource assessment, I need to find the wind speed values at various heights, i.e., 10m, 20m, and likewise up to 100m. I tried using "wrf.vinterp()", but it seems after 50 m the values are not changing. Also, I tried using "wrf.interplevel". While using "wrf.interplevel" the issue is that over the land I am getting nan values at the lower heights, such as 50m, 20m, 60m, etc. I am attaching the images as well as the code.
So, in this regard, if anyone can help how to compute the wind speed for various heights, it will be much appreciated.
The code used:
import xarray as xr
import numpy as np
from wrf import getvar, interplevel, to_np
from netCDF4 import Dataset
# Load the WRF output file (replace with your file path)
file_path = '/home/user/WRF/WRF_OUT/GOPALPUR/TOPO_INC/GDAS/sim1/wrfout_d03_2020-05-31_12:00:00'
ds = Dataset(file_path)
# Extract U and V wind components and pressure levels
u = getvar(ds, "wspd",15,units='m s-1' )
z = getvar(ds, 'z', units='m') # Height levels
# Define the target height
target_height = 100.0 # in meters
# Interpolate U and V at the target height
w_50m = interplevel(u, z, target_height)
With regards,
Debashis
Attachments
Last edited: