[ncl-talk] About regridding from

Barry Lynn barry.h.lynn at gmail.com
Tue Jan 17 13:56:26 MST 2017


Hi:
I think it is easiest to grid the radar data to the  WRF grid, as I did in
my original program.

This doesn't use regrid programs, but objective analysis.

If the wrf grid is coarser than the radar data, the data will be smoothed.

Using NCL requires perseverance. Sometimes it is easier to start with a
basic example.

If you make data lat, Lon, value, the program I sent will read it.

You then need to set/list the files, and the name of the WRF file,

Sorry I can't help more at the moment.



On Tuesday, January 17, 2017, Dennis Shea <shea at ucar.edu> wrote:

> [1]
> A general rule for regridding is to go from high-resolution to
> low-resolution. *If* the variable is 'smoothly varying' virtually any
> interpolation method (eg: bilinear) will do. If the data is fractal (eg:
> hourly/3hrly/daily precipitation), then other methods may be more
> appropriate.
>
> Interpolating from low-resolution to high-resolution, does *not* provide
> any additional information. However, depending upon your objective and use,
> this may be what you need to do.
>
> [2]
> Look at ESMF Regridding: http://www.ncl.ucar.edu/Applications/ESMF.shtml
>
> Look at Example 21
>
> [a] Take the radar data and make one-dimensional lat_radar/lon_radar/value_radar
> arrays. These are your input ('Source'). Create a weight file (say)
>
> Opt at WgtFileName= "WGT.Radar_to_WRF.nc" ; default is "weights_file.nc"
>
> [b] The target grid is defined by  the WRF: XLAT, XLONG variables. There
> are numerous examples on the ESMF page to illustrate how to do this.
>
> [c] Run the script
>
> [d] The weight file can be used subsequently for other regriddings.
>
> =============
> NOTE:
> It is your responsibility to look at and study the ESMF URL. Read it
> carefully before proceeding. Responding to ncl-talk questions, especially,
> ESMF can be quite time consuming and we have our own jobs to do.
>
> Good Luck
>
> On Tue, Jan 17, 2017 at 10:41 AM, Barry Lynn <barry.h.lynn at gmail.com
> <javascript:_e(%7B%7D,'cvml','barry.h.lynn at gmail.com');>> wrote:
>
>> Hi Tao:
>>
>> I apologize, but I can't answer right now as I am traveling.
>>
>> However, in order to provide ncl-talkers with enough information/data,
>> you can write out the data grid (lat/lon) you are trying to plot on from
>> WRF, and upload one time step of it (or two).  You should also upload the
>> radar data.
>>
>> ;---Write wrf variables lat/lon to file for ncltalk.nc
>>
>>
>>     system("rm -f file_for_ncltalk.nc")
>>      fout = addfile("file_for_ncltalk.nc","c")
>>      fout->xlat      = xlat
>>       fout->xlong     = xlong
>>
>> Barry
>>
>> On Tue, Jan 17, 2017 at 7:14 PM, Tao Lu <hakufu.asano at gmail.com
>> <javascript:_e(%7B%7D,'cvml','hakufu.asano at gmail.com');>> wrote:
>>
>>> Hello Barry:
>>>
>>> Thank you very much for your reply.
>>> I  am very appreciated that you shared your codes with us.
>>>
>>> Some editions have been done in my situation.
>>> However, I could not get contour after grid =
>>> obj_anal_ic(lon_o,lat_o,obs_o,xlon_m,xlat_m,rscan,False).
>>> I attached the edited code and run information, please help me check
>>> that.
>>>
>>> I also have some questions about the method for regridding:
>>> 1. There is a item named "rightmost dimension or leftmost dimension" in
>>>     http://www.ncl.ucar.edu/Document/Functions/Built-in/obj_anal
>>> _ic.shtml
>>>     I googled it but have no ideal.
>>>
>>> 2. Also according to the webpage in 1. obs_o at _FillValue will be ignored.
>>>     Does it mean that missing value won't be accounted for when
>>> interpolation?
>>>
>>> 3. "cband radar observations: min=0   max=220" before regridding
>>>     "var_zoom min=0   max=23.5354" after regridding
>>>      After regridding the radar density is much smaller than original
>>> maximum.
>>>     Is it normal? Maybe as you said rscan is important.
>>>
>>> 4. When you use
>>>     grid = obj_anal_ic(lon_o,lat_o,obs_o,xlon_m,xlat_m,rscan,False)
>>>
>>>     You calculate this
>>>     ;---Get slice of lat/lon data at halfway points.
>>>     nlat   = dims2d(0)
>>>     nlon   = dims2d(1)
>>>     xlat_m = xlat2d_m(:,nlon/2)
>>>     xlon_m = xlon2d_m(nlat/2,:)
>>>
>>>     Is it reasonable to calculate lat/lon at a quarter points?
>>>
>>> 5. If use halfway points to regrid radar data,
>>> [image: Inline image 1]
>>>   We will get a n(xlat_m) x n(xlon_m) regridded array.
>>>   So, what will the array's lat/lon will be?
>>>
>>> 6. This method is to interpolate radar data to wrf grid.
>>>     Is the mean average method more suitable for radar data? Because
>>> radar have
>>>     so many data points unlike rain gauge data?
>>>
>>>
>>> My ascii data converted from radar is too large, if you need it I will
>>> send it to you.
>>> The data is something like below:
>>> # crain_composite_data:rain_density:lat:lon:ndata=2406400:
>>> # 2015-09-09_00:00:00
>>> -9999       47.32916666666667       137.01874999999998
>>> -9999       47.32916666666667       137.03125
>>> -9999       47.32916666666667       137.04375
>>> -9999       47.32916666666667       137.05625
>>> -9999       47.32916666666667       137.06875
>>> -9999       47.32916666666667       137.08124999999998
>>>
>>>
>>> Waiting for your reply.
>>> Thank you very much.
>>>
>>> Tao
>>>
>>>
>>> On Tue, Jan 17, 2017 at 4:05 AM, Barry Lynn <barry.h.lynn at gmail.com
>>> <javascript:_e(%7B%7D,'cvml','barry.h.lynn at gmail.com');>> wrote:
>>>
>>>> Hi Tao:
>>>>
>>>> Here, I gridded the radar data to the WRF grid.
>>>>
>>>> You will need to adapt what I did to your situation, but the most
>>>> important step is to decide on the degree of smoothing (which is set by
>>>> rscan).
>>>>
>>>>  grid = obj_anal_ic(lon_o,lat_o,obs_o,xlon_m,xlat_m,rscan,False)
>>>>
>>>> Please write if you have questions.
>>>>
>>>> Barry
>>>>
>>>> On Mon, Jan 16, 2017 at 9:11 AM, Tao Lu <hakufu.asano at gmail.com
>>>> <javascript:_e(%7B%7D,'cvml','hakufu.asano at gmail.com');>> wrote:
>>>>
>>>>> Dear ncl-talk
>>>>>
>>>>> Hello.
>>>>>
>>>>> I am new to regridding, if possible please give me some help and
>>>>> advice.
>>>>>
>>>>> What I am doing?: Compare two kind of grid data
>>>>> *I have two kind of data.*
>>>>> 1. radar data:
>>>>> resolution:            0.5 minute x 0.75 minute, as seen not regular
>>>>> grids
>>>>> file format:            ascii
>>>>> [image: Inline image 1]
>>>>> 2. output data from WRF:
>>>>>  dx = 30000,
>>>>>  dy = 30000,
>>>>>  map_proj = 'lambert',
>>>>>  ref_lat   =  36.00,
>>>>>  ref_lon   =  140.00,
>>>>>  truelat1  =  30.0,
>>>>>  truelat2  =  60.0,
>>>>>  stand_lon = 140.0,
>>>>> file fomat:                    netcdf
>>>>> [image: Inline image 3]
>>>>>
>>>>> *I have to regrid the two data to each other or to new grid.*
>>>>> 1. Regrid wrf data grid to radar data grid?
>>>>> 2. Regrid radar data to wrf data?
>>>>> 3. Regrid both to another data?
>>>>> Which is easiest?
>>>>>
>>>>> I am really new to this, please give me some guide line, I will
>>>>> further operation on my work.
>>>>>
>>>>> Thank you very much for your kind help.
>>>>>
>>>>> Tao
>>>>>
>>>>>
>>>>> --
>>>>> ******************************************************
>>>>> Tao Lu    (M. Eng)
>>>>> Laboratory of River Engineering and Hydrology,
>>>>> Dept. of Civil and Environmental Engineering,
>>>>> Graduate School of Science and Engineering,
>>>>> Chuo University
>>>>>
>>>>> 1-13-27,Kasuga,Bunkyo-ku,Tokyo
>>>>> 112-8551, Japan
>>>>> TEL: 03-3817-1805;   Phone: 070-2188-7509
>>>>> Email1: hakufu.asano at gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','mail:met.yamos at gmail.com');>
>>>>> Email2: lutao at civil.chuo-u.ac.jp
>>>>> <javascript:_e(%7B%7D,'cvml','mail:yamoto at civil.chuo-u.ac.jp');>
>>>>> *****************************************************
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu <javascript:_e(%7B%7D,'cvml','ncl-talk at ucar.edu');>
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Barry H. Lynn, Ph.D
>>>> Senior Lecturer,
>>>> The Institute of the Earth Science,
>>>> The Hebrew University of Jerusalem,
>>>> Givat Ram, Jerusalem 91904, Israel
>>>> Tel: 972 547 231 170
>>>> Fax: (972)-25662581
>>>>
>>>> C.E.O, Weather It Is, LTD
>>>> Weather and Climate Focus
>>>> http://weather-it-is.com
>>>> Jerusalem, Israel
>>>> Local: 02 930 9525
>>>> Cell: 054 7 231 170
>>>> Int-IS: x972 2 930 9525
>>>> US 914 432 3108 <(914)%20432-3108>
>>>>
>>>
>>>
>>>
>>> --
>>> ******************************************************
>>> 盧 涛 (ル タオ) 修士課程2年
>>>
>>> 〒112-8551 東京都文京区春日1-13-27
>>>
>>> 中央大学理工学研究科都市環境学専攻
>>>
>>> 河川・水文研究室(山田正教授)
>>>
>>>
>>> TEL: 03-3817-3406;   Phone: 070-2188-7509
>>> Email1: hakufu.asano at gmail.com
>>> <javascript:_e(%7B%7D,'cvml','mail:met.yamos at gmail.com');>
>>> Email2: lutao at civil.chuo-u.ac.jp
>>> <javascript:_e(%7B%7D,'cvml','mail:yamoto at civil.chuo-u.ac.jp');>
>>> *******************************************************
>>> ******************************************************
>>> Tao Lu    (M. Eng)
>>> Laboratory of River Engineering and Hydrology,
>>> Dept. of Civil and Environmental Engineering,
>>> Graduate School of Science and Engineering,
>>> Chuo University
>>>
>>> 1-13-27,Kasuga,Bunkyo-ku,Tokyo
>>> 112-8551, Japan
>>> TEL: 03-3817-1805;   Phone: 070-2188-7509
>>> Email1: hakufu.asano at gmail.com
>>> <javascript:_e(%7B%7D,'cvml','mail:met.yamos at gmail.com');>
>>> Email2: lutao at civil.chuo-u.ac.jp
>>> <javascript:_e(%7B%7D,'cvml','mail:yamoto at civil.chuo-u.ac.jp');>
>>> *****************************************************
>>>
>>
>>
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>> US 914 432 3108 <(914)%20432-3108>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <javascript:_e(%7B%7D,'cvml','ncl-talk at ucar.edu');>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>

-- 
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/20f61aa7/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 44666 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/20f61aa7/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4669 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/20f61aa7/attachment-0004.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 392777 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/20f61aa7/attachment-0005.png 


More information about the ncl-talk mailing list