[ncl-talk] GFS interpolation (vertical and horizontal)

Dennis Shea shea at ucar.edu
Sun Dec 15 10:22:29 MST 2019


The original code is a bit messy for debugging. Really, it is best to send
a minimalist code to illustrate the problem(s).

--
See attachment: tst.gfsInterpolate.ncl
I used an available gfs...grib2 file.
---
The end result for 3 stations is:

(0)  85000   305.16   300.76   294.79
(1)  70000   292.31   291.38   279.63
(2)  60000   281.88   281.23   274.28
(3)  50000   269.71   269.62   264.71
(4)  40000   258.74   258.90   251.70
(5)  35000   253.37   253.66   244.32
(6)  30000   245.56   246.03   238.54
(7)  27500   240.79   241.26   236.50
(8)  25000   236.03   236.48   234.46
(9)  22500   230.07   230.59   230.70
(10)  20000   224.10   224.70   226.93
(11)  15000   210.87   210.74   216.14
(12)  10000   197.31   198.75   205.43



On Fri, Dec 13, 2019 at 11:47 PM Ehsan Taghizadeh via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Dear Adam,
> Thank you so much for your nice reply.
> I changed Po to Po(::-1) in int2p_n_Wrap, like:
> TMPGFS_HVInt = int2p_n_Wrap(lv0_GFS,TMPGFS_HInt,Po(::-1,:),linlog,0), also
> I tested followings
> TMPGFS_HVInt = int2p_n_Wrap(lv0_GFS(::-1),TMPGFS_HInt,Po,linlog,0), or
> TMPGFS_HVInt = int2p_n_Wrap(lv0_GFS(::-1),TMPGFS_HInt(::-1,:),Po,linlog,0).
> Unfortunately, bad results continued. The temperature are wrong, relative
> humidity, wind speed and wind direction are sth like miss values for all
> points and levels. May I ask for any idea?
> I hope to hear from you.
> Sincerely
> Ehsan
>
>
>
> On Saturday, December 14, 2019, 01:59:21 AM GMT+3:30, Adam Phillips <
> asphilli at ucar.edu> wrote:
>
>
> Hi Ehsan,
> Yes, pin and pout should both either be decreasing or increasing. I see in
> your script that pin (lv0_GFS) is increasing and pout (Po) is decreasing.
> Alter one so both are behaving similarly, and hopefully that fixes your
> issues.
> Adam
>
> On Fri, Dec 13, 2019 at 10:34 AM Ehsan Taghizadeh via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> Hi,
> Thank you for your guidance.
> I tried to do that (reorder, linint2_points_Wrap,int2p_n_Wrap), however it
> seems the result is not good at all. Relative humidity, wind speed and wind
> direction have written the same values. Temperature is not correct, I think.
> May I ask does in int2p_n_Wrap(pin,xin,pout,linlog,pdim), "pin" and "pout"
> must both increasing or decreasing, or pin could be increasing and pout
> could be decreasing?
> I've attached the script (intepgfs.ncl), input station locations
> (apist.dat) and the output (Interpolated.csv). I also put gfs.tar file in
> the ftp, inclulding two input gfs data files.
> I'll be thankful if anyone could help me?
>
> Sincerely
> Ehsan
>
> On Wednesday, December 11, 2019, 09:13:15 PM GMT+3:30, Dennis Shea <
> shea at ucar.edu> wrote:
>
>
> ncl-talk does not want to see a script "with many problems."
> We do not have the time to sort/debug multiple issues.
> ---
> GFS are ordered N->S
> [1] reorder S->N via NCL syntax:   x(:,:,::-1,:)
> [2] Use *linint2_points_Wrap*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_points_Wrap.shtml>
> to interpolate to desired locations
> [3] Use *int2p_n_Wrap*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml>
> to interpolate to desired level(s)
>
>
>
> On Wed, Dec 11, 2019 at 4:42 AM Ehsan Taghizadeh via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> Dears,
> I hope you're doing great.
> May I ask if anybody has a script to interpolate GFS (0.5 deg) on the
> desired station points and also the desired vertical level? I mean (both
> horizontal and vertical interpolation).
> Should I attach my script, however it faces many problems?
> I'll be thankful for any help.
>
> Sincerely
> Ehsan
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191215/1b3e4181/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst.gfsInterpolate.ncl
Type: application/octet-stream
Size: 2930 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191215/1b3e4181/attachment.obj>


More information about the ncl-talk mailing list