<div dir="ltr"><div>Hi Nicolas,<br><br></div><div>Thanks for your help.<br><br></div><div>But now, the following error messages are seen:<br><br>warning:ScalarFieldSetValues: 2d coordinate array sfXArray has an incorrect dimension size: defaulting sfXArray<br>warning:ScalarFieldSetValues: 2d coordinate array sfYArray has an incorrect dimension size: defaulting sfYArray<br>warning:ContourPlotDraw: out of range coordinates encountered; standard AreaFill rendering method may be unreliable;<br> consider setting the resource trGridType to "TriangularMesh" if coordinates contain missing values<br>fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000<br>fatal:ContourPlotDraw: draw error<br>fatal:ContourPlotDraw: draw error<br>fatal:PlotManagerDraw: error in plot draw<br>fatal:_NhlPlotManagerDraw: Draw error<br><br></div><div>Please note that I don't have the grid resolution information except nlat, nlon and depth levels.</div><div><br>Modified script is attached.<br></div><div><br></div><div><br></div><div>Regards,<br>Vimal<br><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font size="2">Sincerely<br></font></div><font size="2">Vimal Koul<br><br></font></div><div><font size="2">Graduate Student<br></font></div><div><font size="2">Department of Atmospheric and Space Science<br></font></div><div><font size="2">Savitribai Phule Pune University<br></font></div><div><font size="2">India</font><br></div><div dir="ltr"><br><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 4 August 2015 at 16:41, Nicolas GASNIER <span dir="ltr"><<a href="mailto:ngprod41@gmail.com" target="_blank">ngprod41@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
With the xaxis_1 and yaxis_1 variables you should try to build a lat and<br>
lon 2d arrays matching your data grid dimensions. Then use these 2d<br>
arrays as sfXArray and sfYArray plotting ressource.<br>
<br>
Something like this (untested) :<br>
<br>
xaxis_1 = fin->xaxis_1<br>
yaxis_1 = fin->yaxis_1<br>
<br>
lon2d = new((/720, 410/), float)<br>
do i=0,719<br>
lon2d(i, :) = xaxis_1<br>
end do<br>
<br>
lat2d = new((/720, 410/), float)<br>
do i=0,409<br>
lat2d(:, i) = yaxis_1<br>
end do<br>
<br>
<br>
gen_res = True<br>
gen_res@sfXArray = lon2d<br>
gen_res@sfYArray = lat2d<br>
<br>
Then pass that ressource to your plotting function.<br>
<br>
Hope that helps.<br>
<br>
Nicolas Gasnier<br>
<br>
<br>
Le 04/08/2015 08:23, <a href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</a> a écrit :<br>
> Date: Tue, 4 Aug 2015 11:53:07 +0530<br>
> From: Vimal Koul<<a href="mailto:koulvimal18@gmail.com">koulvimal18@gmail.com</a>><br>
> Subject: [ncl-talk] Problem with CFS initial condition data plot in<br>
> NCL<br>
> <a href="mailto:To%3Ancl-talk@ucar.edu">To:ncl-talk@ucar.edu</a><br>
> Message-ID:<br>
> <<a href="mailto:CAJVe0MCbueZr-1EZHk6eOD1VULML0XEOMaGchvsM5rczLjjFSQ@mail.gmail.com">CAJVe0MCbueZr-1EZHk6eOD1VULML0XEOMaGchvsM5rczLjjFSQ@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Dear Users,<br>
><br>
> I am trying to plot an ocean data file which is a part of CFS High<br>
> Resolution Initial Conditions (<a href="http://nomads.ncdc.noaa.gov/data.php" rel="noreferrer" target="_blank">http://nomads.ncdc.noaa.gov/data.php</a>).<br>
><br>
> File: <a href="http://ocnanl.gdas.1985050100.ocean_temp_salt.res.nc" rel="noreferrer" target="_blank">ocnanl.gdas.1985050100.ocean_temp_salt.res.nc</a> (uploaded to ncl ftp<br>
> link) or download from:<a href="https://copy.com/7bVgOvDfQKDjcg07" rel="noreferrer" target="_blank">https://copy.com/7bVgOvDfQKDjcg07</a><br>
><br>
> Unfortunately, printVarSummary shows that the variable "temp" I'm trying to<br>
> plot does not have coordinate information, however, nlat, nlon are<br>
> provided. So I used fspan (and tried other functions also) to attach<br>
> coordinates, but the resulting plot is messed up. The plot and ncl script<br>
> are attached.<br>
><br>
> Can you please help me in defining the lat long coordinate information for<br>
> this type of data?<br>
><br>
> I am completely new to NCL, infact just started last week.<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>