RE: [ncl-talk] coordinate subscripting

From: Sylvia Murphy (murphys AT cgd.ucar.edu)
Date: Wed Dec 01 2004 - 10:44:47 MST

  • Next message: Mail System Internal Data: "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA"

    M,

    by definition, a coordinate variable must be either monotonically
    increasing or decreasing. this is a requirement of netCDF. Is your
    longitude actually attached?

    if the problem is the resultant extraction not being monotonic, then you
    may want to check out the lonFlip function in contributed.ncl which will
    change a 0-360 coordinate to -180 to 180 and vice versa.

    sm

    On Wed, 1 Dec 2004, Marjolaine Krug wrote:

    > Dear Sylvia,
    >
    > The domain I want in my data is from 40West to 20East, which correspond to
    > points from :
    > 320 to 360
    > and
    > 360 (i.e 0) to 20
    > The problem is that my data longitude is not monotonic. So I can't just
    > extract the domain I want. I suppose I could extract both arrays
    > y1 = x({320:360},{minLat:maxLat}) and
    > y2 = x({0:20},{minLat:maxLat}) and then concatenate y1 and y2 into a
    > variable y. Only thing is that I am not sure how to concatenate y1 and y2.
    >
    > Regards, Marjolaine.
    >
    > -----Original Message-----
    > From: Sylvia Murphy [mailto:murphys@cgd.ucar.edu]
    > Sent: Monday, November 29, 2004 6:03 PM
    > To: Marjolaine Rouault
    > Cc: ncl-talk@ucar.edu
    > Subject: Re: coordinate subscripting
    >
    >
    > M,
    >
    > you certainly can use coordinate subscripting. This method is dependent
    > upon what your coordinates look like. if your coordinates go from -180 to
    > +180 then you need to use those values while coordinate subscripting. if,
    > as in your case, they go from 0 to 360 you need to use those values.
    >
    > for example
    >
    > y = x({-20:20},{270:360})
    >
    > in your case you need to mentally convert the region you want into
    > 360-mode and then subscript.
    >
    > sylvia
    >
    >
    >
    > On Mon, 29 Nov 2004, Marjolaine Rouault wrote:
    >
    > > Hi,
    > >
    > > I am reading some data which longitude is not "ordered" in the usual way.
    > >
    > > Longitude points from 0 east to 180 east have a longitude which increases
    > from 0 to 180.
    > > Longitude points from 180 west to 0 west have a longitude value which
    > increases from 181 to 360.
    > >
    > > I am trying to extract a domain between 40West and 20 East.Is it possible
    > to do it with coordinate subscripting? What would you suggest is the best
    > way to extract my domain?
    > >
    > > Many thanks, Marjolaine.
    > >
    > >
    > >
    > > _______________________________________________
    > > ncl-talk mailing list
    > > ncl-talk@ucar.edu
    > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    > >
    >
    >
    >
    > ******************************************************
    > Sylvia Murphy EML: murphys@ucar.edu
    > NCAR CGD/CSEG PHN: 303-497-1720
    > 1850 Table Mesa Drive FAX: 303-497-1333
    > Boulder CO 80305
    >
    >
    > WEB: http://www.cgd.ucar.edu/csm/support/
    > http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
    > ******************************************************
    >
    >
    >
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk@ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    ******************************************************
    Sylvia Murphy EML: murphys@ucar.edu
    NCAR CGD/CSEG PHN: 303-497-1720
    1850 Table Mesa Drive FAX: 303-497-1333
    Boulder CO 80305

    WEB: http://www.cgd.ucar.edu/csm/support/
         http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
    ******************************************************

    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Wed Dec 01 2004 - 11:04:18 MST