<div dir="ltr">Hi:<div><br></div><div>I am not sure what your problem is, and you might be aware that arrays in NCL or (time, j,i), or (time,nlon,nlat). I believe this is the case evenif you are reading a file of i,j,time dimensions.</div><div><br></div><div>Barry</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 23, 2018 at 9:58 AM, Mateus Dias Nunes <span dir="ltr"><<a href="mailto:nunes.mateusdias@gmail.com" target="_blank">nunes.mateusdias@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><img width="0" height="0" class="m_-8076210614714328569mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/7431dc6cb490b49f28a2f50d53aab7adf9a60654.png?u=968181"><div></div><div class="gmail_default"><div style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div>Hello,</div><div><br></div><div>I'm trying to convert this my binary data (output from a mesoscale model) to the netCDF extension. However I am encountering difficulties because the values not plotted do not agree with the values when I write the values of each point on the screen.</div><div><br></div><div>Below the data link and the script:<br><br><a href="https://drive.google.com/open?id=1KO_bm_oa88OVKaAcXLLg_1HGcyMgximg" target="_blank">https://drive.google.com/open?<wbr>id=1KO_bm_oa88OVKaAcXLLg_<wbr>1HGcyMgximg</a><br></div><br><div><span style="font-size:12.8px">begin</span></div><div><span style="font-size:12.8px"> nlat = 101</span></div><div><span style="font-size:12.8px"> nlon = 361</span></div><div><span style="font-size:12.8px"> fils = systemfunc("ls ozo130501012.350_950")</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Predefine array for one year of daily data</span></div><div><span style="font-size:12.8px"> finarr = new((/dimsizes(fils),nlat,<wbr>nlon/),"float") </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Loop through each file and read</span></div><div><span style="font-size:12.8px"> rec_num = 0 ; record number</span></div><div><span style="font-size:12.8px"> do gg = 0,dimsizes(fils)-1</span></div><div><span style="font-size:12.8px"> finarr(gg,:,:) = fbindirread(fils(gg),rec_num,(<wbr>/nlat,nlon/),"float")</span></div><div><span style="font-size:12.8px"> end do</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> print("Assigning coordinate variable information")</span></div><div><span style="font-size:12.8px"> finarr!0 = "time"</span></div><div><span style="font-size:12.8px"> finarr!1 = "lat"</span></div><div><span style="font-size:12.8px"> finarr!2 = "lon"</span></div><div><span style="font-size:12.8px"> finarr&time = ispan(1,dimsizes(fils),1)</span></div><div><span style="font-size:12.8px"> finarr&lat = fspan(-89,10,nlat)</span></div><div><span style="font-size:12.8px"> finarr&lon = fspan(0,360,nlon)</span></div><div><span style="font-size:12.8px"> finarr&lat@units = "degrees_north"</span></div><div><span style="font-size:12.8px"> finarr&lon@units = "degrees_east"</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----------</span></div><div><span style="font-size:12.8px">; Section to write data to netCDF file</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----------</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Make sure file doesn't exist.</span></div><div><span style="font-size:12.8px"> nc_filename = "<a href="http://ozone_20130501.nc" target="_blank">ozone_20130501.nc</a>"</span></div><div><span style="font-size:12.8px"> system("rm -f " + nc_filename)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Open file and write global attributes</span></div><div><span style="font-size:12.8px"> a = addfile("<a href="http://ozone_20130501.nc" target="_blank">ozone_20130501.nc</a>","<wbr>c")</span></div><div><span style="font-size:12.8px"> a@title = "1 year of daily data"</span></div><div><span style="font-size:12.8px"> a@source = "exemplo"</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Make time an UNLIMITED dimension, always recommended</span></div><div><span style="font-size:12.8px"> filedimdef(a,"time",-1,True) </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Write "SLP" data to file</span></div><div><span style="font-size:12.8px"> a->ozonio = finarr</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">end</span></div><br><br class="m_-8076210614714328569gmail-Apple-interchange-newline">Please, help me.</div><br clear="all"></div><div><div class="m_-8076210614714328569gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="tahoma, sans-serif">______________________________<wbr>______________________________<wbr>___________________________</font></div><font face="tahoma, sans-serif"><div dir="ltr" style="color:rgb(0,0,255)"><font face="tahoma, sans-serif"><br></font></div><font color="#0000ff">MATEUS DIAS NUNES<br></font></font><div><div><font face="tahoma, sans-serif" color="#0000ff"><div dir="ltr">Doutorando do Programa de Pós-Graduação em Meteorologia - CPTEC / INPE<br></div><div dir="ltr"><font><font>Centro de Previsão do Tempo e Estudos Climáticos / Instituto Nacional de Pesquisas Espaciais<br></font><font size="2" style="font-family:arial,helvetica,sans-serif;font-size:12.8px;font-style:italic">Rodovia Presidente Dutra, km 39, </font></font><font face="tahoma, sans-serif" style="font-size:12.8px">Cachoeira Paulista - SP - Brasil</font><br></div></font></div><div><span style="font-family:tahoma,sans-serif;font-size:12.8px"><font color="#0000ff">WhatsApp: <a href="tel:+55%2053%2098112-5154" value="+5553981125154" target="_blank">+55 (53) 98112-5154</a> </font></span><span style="font-family:tahoma,sans-serif;font-size:12.8px"><font color="#0000ff"> </font><br></span><br></div><div><font face="tahoma, sans-serif">______________________________<wbr>______________<span style="background-color:rgb(255,255,255)"><span></span></span>________________<wbr>___________________________<br></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><br><br><div class="m_-8076210614714328569mt-signature">
<a href="https://mailtrack.io/" class="m_-8076210614714328569mt-signature-logo" style="text-decoration:none" target="_blank"><img src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png" height="14"></a>
<font style="color:#999">Sent with <a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&" class="m_-8076210614714328569mt-install" target="_blank">Mailtrack</a></font>
</div></div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>