[ncl-talk] ncl-talk Digest, Vol 141, Issue 5

Vimal Koul koulvimal18 at gmail.com
Wed Aug 5 06:14:19 MDT 2015


Hi Nicolas,

Yes, that is exactly the problem.

I was hoping someone on this forum might have worked with this type of data
(NCEP CFSv2 High Resolution Initial Conditions) before, so I could save
some time.

I'll see the regridding section now.

Thanks for your help.

Regards,
Vimal



Regards,
Vimal Koul


On 5 August 2015 at 15:54, Nicolas GASNIER <ngprod41 at gmail.com> wrote:

> Hi Vimal,
>
> Sorry I made this little script by memory, the sfX* arrays don't need to
> be 2D, it should be your lat / lon arrays.  I assumed the axis variables
> would contain coordinate info but it is just indexes. Please note that
> you need an extra value on the lon array for global plot (see
> gsnAddCyclic property).
>
> I made some testing, but it is not working better with this method. Your
> grid seems to be 0.5° in longitude, but it is not the case with
> latitude. I tried various intervals with fspan, but can't align the data
> with the map. I suspect the data is not regularly spaced on that axis :
> maybe gaussian grid. Can't help you a lot on this, but here is a
> starting point :
>
> https://www.ncl.ucar.edu/Applications/regrid.shtml
>
> Nicolas
>
> Le 04/08/2015 20:00, ncl-talk-request at ucar.edu a écrit :
> > Message: 4
> > Date: Tue, 4 Aug 2015 19:48:45 +0530
> > From: Vimal Koul <koulvimal18 at gmail.com>
> > Subject: Re: [ncl-talk] Problem with CFS initial condition data plot
> >       in NCL
> > To: ncl-talk at ucar.edu
> > Message-ID:
> >       <
> CAJVe0MADUJWm7CwinWxXaxMLHofsy36QkZiDQ-ANXXT5j9D6yQ at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi Nicolas,
> >
> > Thanks for your help.
> >
> > But now, the following error messages are seen:
> >
> > warning:ScalarFieldSetValues: 2d coordinate array sfXArray has an
> incorrect
> > dimension size: defaulting sfXArray
> > warning:ScalarFieldSetValues: 2d coordinate array sfYArray has an
> incorrect
> > dimension size: defaulting sfYArray
> > warning:ContourPlotDraw: out of range coordinates encountered; standard
> > AreaFill rendering method may be unreliable;
> >   consider setting the resource trGridType to "TriangularMesh" if
> > coordinates contain missing values
> > fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size
> > 100000000
> > fatal:ContourPlotDraw: draw error
> > fatal:ContourPlotDraw: draw error
> > fatal:PlotManagerDraw: error in plot draw
> > fatal:_NhlPlotManagerDraw: Draw error
> >
> > Please note that I don't have the grid resolution information except
> nlat,
> > nlon and depth levels.
> >
> > Modified script is attached.
> >
> >
> > Regards,
> > Vimal
> >
> >
> > Sincerely
> > Vimal Koul
> >
> > Graduate Student
> > Department of Atmospheric and Space Science
> > Savitribai Phule Pune University
> > India
> >
> >
> >
> > On 4 August 2015 at 16:41, Nicolas GASNIER <ngprod41 at gmail.com> wrote:
> >
> >> Hi,
> >>
> >> With the xaxis_1 and yaxis_1 variables you should try to build a lat and
> >> lon 2d arrays matching your data grid dimensions. Then use these 2d
> >> arrays as sfXArray and sfYArray plotting ressource.
> >>
> >> Something like this (untested) :
> >>
> >> xaxis_1 = fin->xaxis_1
> >> yaxis_1 = fin->yaxis_1
> >>
> >> lon2d = new((/720, 410/), float)
> >> do i=0,719
> >>       lon2d(i, :) = xaxis_1
> >> end do
> >>
> >> lat2d = new((/720, 410/), float)
> >> do i=0,409
> >>       lat2d(:, i) = yaxis_1
> >> end do
> >>
> >>
> >> gen_res = True
> >> gen_res at sfXArray = lon2d
> >> gen_res at sfYArray = lat2d
> >>
> >> Then pass that ressource to your plotting function.
> >>
> >> Hope that helps.
> >>
> >> Nicolas Gasnier
> >>
> >>
> >> Le 04/08/2015 08:23, ncl-talk-request at ucar.edu a ?crit :
> >>> Date: Tue, 4 Aug 2015 11:53:07 +0530
> >>> From: Vimal Koul<koulvimal18 at gmail.com>
> >>> Subject: [ncl-talk] Problem with CFS initial condition data plot in
> >>>        NCL
> >>> To:ncl-talk at ucar.edu
> >>> Message-ID:
> >>>        <
> >> CAJVe0MCbueZr-1EZHk6eOD1VULML0XEOMaGchvsM5rczLjjFSQ at mail.gmail.com>
> >>> Content-Type: text/plain; charset="utf-8"
> >>>
> >>> Dear Users,
> >>>
> >>> I am trying to plot an ocean data file which is a part of CFS High
> >>> Resolution Initial Conditions (http://nomads.ncdc.noaa.gov/data.php).
> >>>
> >>> File: ocnanl.gdas.1985050100.ocean_temp_salt.res.nc (uploaded to ncl
> ftp
> >>> link) or download from:https://copy.com/7bVgOvDfQKDjcg07
> >>>
> >>> Unfortunately, printVarSummary shows that the variable "temp" I'm
> trying
> >> to
> >>> plot does not have coordinate information, however, nlat, nlon are
> >>> provided. So I used fspan (and tried other functions also) to attach
> >>> coordinates, but the resulting plot is messed up. The plot and ncl
> script
> >>> are attached.
> >>>
> >>> Can you please help me in defining the lat long coordinate information
> >> for
> >>> this type of data?
> >>>
> >>> I am completely new to NCL, infact just started last week.
> >> _______________________________________________
> >> 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/20150804/17d62ebe/attachment-0001.html
> > -------------- next part --------------
> > A non-text attachment was scrubbed...
> > Name: p7cn.ncl
> > Type: text/x-ncl
> > Size: 1118 bytes
> > Desc: not available
> > Url :
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150804/17d62ebe/attachment-0001.bin
> >
> > ------------------------------
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> > End of ncl-talk Digest, Vol 141, Issue 5
> > ****************************************
>
> _______________________________________________
> 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/20150805/311a9a02/attachment.html 


More information about the ncl-talk mailing list