[ncl-talk] Extract point value + WRF model output
Barry Lynn
barry.h.lynn at gmail.com
Sat Oct 23 11:54:32 MDT 2021
Hi:
Here is some sample code.
external GET_IJ "./get_ij.so" ; convert get_ij.f with WRAPIT get_ij.f
begin
xlat2d=wrf_user_getvar(a,"XLAT",0)
xlon2d=wrf_user_getvar(a,"XLONG",0)
dims2d=dimsizes(xlat2d)
sta_i = new(n_sta,integer) ; Create array to hold text objects
sta_j = new(n_sta,integer) ; Create array to hold text objects
do i_sta=0,n_sta-1
i_loc = 1
j_loc = 1
GET_IJ::get_ij(xlat2d,xlon2d,Latitude(i_sta),Longitude(i_sta),i_loc,j_loc,dims2d(0),dims2d(1))
sta_i(i_sta) = i_loc-1
sta_j(i_sta) = j_loc-1
end do
t2=wrf_user_getvar(a,"T2",it)
q2=wrf_user_getvar(a,"Q2",it)
rh = relhum(t2, q2, psfc)
u10 = wrf_user_getvar(a,"U10",it)
v10 = wrf_user_getvar(a,"V10",it)
rainnc = wrf_user_getvar(a,"RAINNC",it)
u_plane := u10*3.6
v_plane := v10*3.6
wspd = wind_speed(u_plane,v_plane)
wdir = wind_direction(u_plane,v_plane,0)
do i_sta = 0,n_sta-1
sta_t2(i_sta,time)=t2(sta_j(i_sta),sta_i(i_sta))-273.15
sta_rh(i_sta,time)=rh(sta_j(i_sta),sta_i(i_sta))
sta_speed(i_sta,time)=wspd(sta_j(i_sta),sta_i(i_sta))
sta_wdir(i_sta,time)=wdir(sta_j(i_sta),sta_i(i_sta))
sta_prec(i_sta,time)=rainnc(sta_j(i_sta),sta_i(i_sta))
end do
end
On Sat, Oct 23, 2021 at 8:38 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hi:
>
> https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml
>
> Did you get this far?
>
> If so, I can send you a program to find the location of points with
> specific latitude and longitude.
>
> Barry
>
> On Sat, Oct 23, 2021 at 7:50 PM Setareh Rahimi via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear NCL users,
>> I have a WRF output file in nc format. I need to have point values of
>> wind, temperature,and humidity at specific lat/lon and specific times. I
>> do not need a map plot or time series. I just want point values for each
>> variable at specific times ( 00,03,06,09,12,15,18,21 UTC) in ascii format
>> .For example, for wind variable at lat:y and lon:x
>> Time: 00 , 03 , 06 , 09 ,12
>> wind value : x1 , x2 , x3 , x4 , x5,
>> Would you please kindly help me in this regard?
>> Best wishes,
>>
>> --
>> S.Rahimi
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
>
> Barry H. Lynn, Ph.D
> Senior Scientist, Lecturer,
> The Institute of Earth Sciences,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> Weather It Is, LTD
> Weather and Climate Focus
> https://weather-it-is.com <http://weather-it-is.com>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
>
--
Barry H. Lynn, Ph.D
Senior Scientist, Lecturer,
The Institute of Earth Sciences,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581
Weather It Is, LTD
Weather and Climate Focus
https://weather-it-is.com <http://weather-it-is.com>
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211023/661ff9bb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_ij.f
Type: application/octet-stream
Size: 932 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211023/661ff9bb/attachment.obj>
More information about the ncl-talk
mailing list