[ncl-talk] A general question about coordinate selection

Dennis Shea shea at ucar.edu
Tue Dec 8 09:20:05 MST 2020


Whenever you send a question about coordinates, you should also include
information about the coordinates in the file.

*ncl_filedump *
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>provides
a file overview that is analogous to '*ncdump -h'*

%> *ncl_filedump* foo.grb | less

or
 %> *ncl_filedump*  foo.grb > foo.dump

====
or

    g = *addfile*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>
("foo.grb","r")
    x = g->VAR
    *printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>
(x)

======

**If** the coordinates associated with a variable are *'coordinate variable
<https://www.ncl.ucar.edu/Document/Language/cv.shtml>**s*
<https://www.ncl.ucar.edu/Document/Language/cv.shtml>' (CVs)

   latS =              ; southern lat                 [ex:  -13.5]
   latN =              ; northern lat                 [       41.3]
   lonL =              ; westernmost longitude      [  72.5 ]
   lonR =             ; eastern mostlongitude       [ 305.0]

   g = addfile("foo.grb","r)
   x = g->VAR({latS:latN},{lonL:lonR})
   printVarSummary(x)

If you are "new to NCL", please read the *User Guide*
<https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/>



On Tue, Dec 8, 2020 at 8:32 AM Grima via ncl-talk <ncl-talk at mailman.ucar.edu>
wrote:

>
> Hi,
>
> Thanks for your post.
>
> Do you also know something about my second question; i.e. whether one
> can use a tool to cut the GRIB2 file to a specific country in advance?
>
> Thanks and best regards.
>
>
>
> Am 08.12.2020 08:19 schrieb Ehsan Taghizadeh:
> > Hi,
> > I think you should use shapefile mask in NCL. Following link is
> > related to the subject.
> > https://www.ncl.ucar.edu/Applications/shapefiles.shtml [1]
> >
> > Sincerely,
> > Ehsan
> >
> >  On Tuesday, December 8, 2020, 10:22:59 AM GMT+3:30, cemilyigit--- via
> > ncl-talk <ncl-talk at mailman.ucar.edu> wrote:
> >
> > Hello together,
> >
> > I'm relatively new to NCL and have a general question about selecting
> >
> > coordinates.
> >
> > Currently I read out the temperature for a large region from GFS data
> > or
> >
> > rahter from GRIB files.
> >
> > This is easy and works perfectly. In the next step I wanted to read
> > out
> >
> > the temperature only for a certain country and display it as an
> > xy-plot.
> >
> > And this is exactly where I got a problem. How can I specify the
> >
> > coordinates in NCL in a way that my coordinate specification only
> >
> > considers a certain country.
> >
> > It would be very nice if I could see this in a code example.
> >
> > Is it possible to cut the GRIB file to the corresponding coordinates
> >
> > before?
> >
> > Thanks a lot.
> >
> > _______________________________________________
> >
> > ncl-talk mailing list
> >
> > ncl-talk at mailman.ucar.edu
> >
> > List instructions, subscriber options, unsubscribe:
> >
> > https://mailman.ucar.edu/mailman/listinfo/ncl-talk [2]
> >
> >
> > Links:
> > ------
> > [1] https://www.ncl.ucar.edu/Applications/shapefiles.shtml
> > [2] https://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201208/bf2974b7/attachment.html>


More information about the ncl-talk mailing list