[ncl-talk] Extract wrf variable at specific latitude and longitude

Alyce Sala Tenna alsalte at gmail.com
Fri Oct 9 08:12:01 MDT 2020


Hello,

I would like to extract temperature at a specific latitude and longitude.

I’m new to python and I’m not confident with loops. 


times = wrf.getvar(f, "times")
t2 = wrf.getvar(f, "td2")
nl = wrf.extract_dim(f, 'Time')
len = nl-1			

# Find the closest point to the site in WRF grids
x_y = wrf.ll_to_xy(f, stn_lat, stn_lon,True)

for i in range(len):
    temp_sub = t2[0:i,x_y[0],x_y[1]]

I know I’m only pulling one slice of data vertically - how do I draw it from a specific lat and long?

Thanks in advance,
Ayce


More information about the ncl-talk mailing list