<div dir="ltr"><div><div><div><div>Hi Nicolas,<br><br></div>Yes, that is exactly the problem. <br><br></div>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.<br><br></div><div>I'll see the regridding section now.<br><br></div><div>Thanks for your help.<br></div><div><br>Regards,<br></div></div>Vimal<br><div><div><div><br> <br></div></div></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><div dir="ltr"><div><font size="2">Regards,<br></font></div><font size="2">Vimal Koul</font><br><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 5 August 2015 at 15:54, 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 Vimal,<br>
<br>
Sorry I made this little script by memory, the sfX* arrays don't need to<br>
be 2D, it should be your lat / lon arrays. I assumed the axis variables<br>
would contain coordinate info but it is just indexes. Please note that<br>
you need an extra value on the lon array for global plot (see<br>
gsnAddCyclic property).<br>
<br>
I made some testing, but it is not working better with this method. Your<br>
grid seems to be 0.5° in longitude, but it is not the case with<br>
latitude. I tried various intervals with fspan, but can't align the data<br>
with the map. I suspect the data is not regularly spaced on that axis :<br>
maybe gaussian grid. Can't help you a lot on this, but here is a<br>
starting point :<br>
<br>
<a href="https://www.ncl.ucar.edu/Applications/regrid.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Applications/regrid.shtml</a><br>
<br>
Nicolas<br>
<br>
Le 04/08/2015 20:00, <a href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</a> a écrit :<br>
> Message: 4<br>
> Date: Tue, 4 Aug 2015 19:48:45 +0530<br>
> From: Vimal Koul <<a href="mailto:koulvimal18@gmail.com">koulvimal18@gmail.com</a>><br>
> Subject: Re: [ncl-talk] Problem with CFS initial condition data plot<br>
> in NCL<br>
> To: <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
> Message-ID:<br>
> <<a href="mailto:CAJVe0MADUJWm7CwinWxXaxMLHofsy36QkZiDQ-ANXXT5j9D6yQ@mail.gmail.com">CAJVe0MADUJWm7CwinWxXaxMLHofsy36QkZiDQ-ANXXT5j9D6yQ@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Hi Nicolas,<br>
><br>
> Thanks for your help.<br>
><br>
> But now, the following error messages are seen:<br>
><br>
> warning:ScalarFieldSetValues: 2d coordinate array sfXArray has an incorrect<br>
> dimension size: defaulting sfXArray<br>
> warning:ScalarFieldSetValues: 2d coordinate array sfYArray has an incorrect<br>
> dimension size: defaulting sfYArray<br>
> warning:ContourPlotDraw: out of range coordinates encountered; standard<br>
> AreaFill rendering method may be unreliable;<br>
> consider setting the resource trGridType to "TriangularMesh" if<br>
> coordinates contain missing values<br>
> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size<br>
> 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>
> Please note that I don't have the grid resolution information except nlat,<br>
> nlon and depth levels.<br>
><br>
> Modified script is attached.<br>
><br>
><br>
> Regards,<br>
> Vimal<br>
><br>
><br>
> Sincerely<br>
> Vimal Koul<br>
><br>
> Graduate Student<br>
> Department of Atmospheric and Space Science<br>
> Savitribai Phule Pune University<br>
> India<br>
><br>
><br>
><br>
> On 4 August 2015 at 16:41, Nicolas GASNIER <<a href="mailto:ngprod41@gmail.com">ngprod41@gmail.com</a>> wrote:<br>
><br>
>> 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>
>>> <<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<br>
>> 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<br>
>> for<br>
>>> this type of data?<br>
>>><br>
>>> I am completely new to NCL, infact just started last week.<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>
>><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150804/17d62ebe/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150804/17d62ebe/attachment-0001.html</a><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: p7cn.ncl<br>
> Type: text/x-ncl<br>
> Size: 1118 bytes<br>
> Desc: not available<br>
> Url : <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150804/17d62ebe/attachment-0001.bin" rel="noreferrer" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150804/17d62ebe/attachment-0001.bin</a><br>
><br>
> ------------------------------<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>
><br>
><br>
> End of ncl-talk Digest, Vol 141, Issue 5<br>
> ****************************************<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>