[ncl-talk] Question on interpolation
Dennis Shea
shea at ucar.edu
Tue Sep 3 14:59:24 MDT 2019
I assume you are processing multiple GRIB2 files using *addfiles.*
This is appropriate if the same grid is applicable to all files.
*addfiles *will concatenate all the file times. You only need to use one
grid.
---
In the case of the HWRF grids (possibly) changing at each time step, you
will have to step through the files manually. This means you will have to
do some book-keeping.
dirHWRF = "..."
filHWRF = "..."
pthHWRF = dirHWRF + filHWRF
nfil = dimsizes(filHWRF)
SLAT = ; one or more Sonde lat
SLON =
do nf=0,nfil-1
f = addfile(pthHWRF(nf),"r")
x = f->X
xsonde(nf.....) = *linint2_points*(x&lon_0, x&lat_0,
False,SLAT,SLON 0)
end do
Good Luck
On Tue, Sep 3, 2019 at 1:19 PM Andrew Kren - NOAA Affiliate via ncl-talk <
ncl-talk at ucar.edu> wrote:
> Dear ncl-talk,
>
> I am working to interpolate a high-resolution model dataset (HWRF) to the
> time and location of a dropsonde location. In the past for other datasets,
> I have used linint1_n and linint2_points to interpolate in time and space
> to the dropsonde position.
>
> However, HWRF, which is 6-hour analysis output, has a varying grid every 6
> hours as the domain "moves" with the tropical cyclone. Hence, the lat/lon
> locations are not fixed in time. They have the same dimension sizes but the
> points vary depending on the cyclone center. This led to an error in my
> linint2_points function:
>
> fatal:linint2_points: If xi is not one-dimensional, then it must have one
> less dimension than fi
>
>
>
> I know why this is happening. I read in two HWRF files around the
> dropsonde time to do the interpolation. I used "join" to join the files and
> my lat/lon arrays are (time, lat) and (time, lon). So I get the error.
>
>
> But my question is how best to proceed? This is technically not an
> unstructured grid, but could be considered one. Should I use ESMF?
>
>
> Thanks,
>
> --
> Andrew Kren
> Assistant Scientist
> University of Miami CIMAS - NOAA/AOML
> Global Observing Systems Analysis (GOSA) Group
> NOAA/AOML Quantitative Observing System Assessment Program (QOSAP)
> _______________________________________________
> 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/20190903/23e12115/attachment.html>
More information about the ncl-talk
mailing list