[ncl-talk] WRF interpolation (amendment-output)

Dennis Shea shea at ucar.edu
Wed Sep 11 14:05:46 MDT 2019


re: "My problem is why stations out of WRF domain, got interpolated
values?!!"

I looked at the C-interface and the fortran subroutine used by NCL.

I see the issue. I also remember the circumstances.

---
*rcm2points*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/rcm2points.shtml> was
introduced a decade+ years ago. Originally, it used an inverse distance
approach for interpolation. Subsequently, bilinear interpolation was
introduced. For bilinear interpolation, the target grid point was *required
to have 4 surrounding grid points*.

Subsequently, some users wanted locations "just outside" the defined grid
space to be interpolated. As I recall, several iterations of assorted users
requested features/options were tested.  The idea was to make multiple
options available to the users. For some forgotten reason(s), these were
not implemented with the C-interface.
In fact, the original subroutine had a section appended that would
accommodate the desired features. Suffice it to say, a partial
implementation was distributed.

===
Currently, users will have to only* input *values within the grid boundaries
or
remove the returned points outside the grid region.

D





On Wed, Sep 11, 2019 at 10:39 AM Ehsan Taghizadeh via ncl-talk <
ncl-talk at ucar.edu> wrote:

>  td2  = wrf_user_getvar
> <https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml>(fw,"td2",-1)
> "***works***"
> and
>  td2=fw->td2(0,:,:) "***didn't work***"
> likely, "td2" is diagnostic and is not in the file. It should be computed
> via "wrf_user_getvar".
> My problem is why stations out of WRF domain, got interpolated values?!!
>
> *Sincerely*
> *Ehsan*
> On Wednesday, September 11, 2019, 07:24:50 PM GMT+4:30, Dennis Shea <
> shea at ucar.edu> wrote:
>
>
>  ---
>   td2  = *wrf_user_getvar*
> <https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml>(fw,"td2",-1)
> ; td2=fw->td2(0,:,:) ******didn't work****
>   printVarSummary(td2)
>   printMinMax(td2,0)
> ---
> Likely:
>
>     [1] td2' is not  on the file
>     [2] one of the variables needed to derive 'td2' is not present on the
> file.
>     [3] you have an old version of 'wrf_user_getvar'
>
> *%> *less WRFUserARW.ncl       <=== 6.5.0
>
>   if( variable .eq. "td2" ) then
>        ;; function wrf_td needs qv and pressure (Pa) on input and returns
> dewpoint temperature on return
>        PSFC = _get_wrf_var(file_handle,"PSFC",time)
>        Q2   = _get_wrf_var(file_handle,"Q2",time)
>        td   = wrf_td( PSFC , Q2 )
>        copy_VarAtts_except(Q2,td,(/"description","units"/))
>        td at description = "2m Dewpoint Temperature"   ; Overwrite return
> description
>        return(td)
>   end if
>
>
> On Wed, Sep 11, 2019 at 6:22 AM Ehsan Taghizadeh via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> Dears,
> I forgot to attach output file from interpolation.
> At the attachment, stations like "40899" or "40890" got "
> 9969209968386869046778552952102584320.0" value. These stations don't
> locate in wrf domain 2. However, stations like "40745" has values, in spite
> of locating out of domain 2.
>
> *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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190911/785fa265/attachment.html>


More information about the ncl-talk mailing list