<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 12px; font-family: Helvetica, sans-serif;">
<div>
<div>
<div>Thank you! We have done what we need to with the binary file now!</div>
<div><br>
</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Mary Haley &lt;<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Thursday, January 12, 2017 at 12:14 PM<br>
<span style="font-weight:bold">To: </span>Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu">taylor.hughlett@uta.edu</a>&gt;, &quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [ncl-talk] Reading in .ieeer8 file and plotting it with NCL<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">​Correction: The lat2d and lon2d should be attached to the data variable, not the &quot;res&quot; variable.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">​<span style="font-size:12.8px">flx@lat2d = tlat &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></div>
<span style="font-size:12.8px">
<div class="gmail_default" style="font-size:small;display:inline">​flx</div>
@lon2d = ltlon &nbsp; &nbsp; &nbsp;&nbsp;</span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 9, 2017 at 3:39 PM, Dennis Shea <span dir="ltr">
&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I was just corrected on <br>
<br>
----<span class=""><span class="m_-3981536243164243846gmail-im">
<div>
<div style="font-size:12.8px">
<div>then, in your graphics code<br>
<br>
</div>
res@lat2d = lat2d<br>
</div>
<span style="font-size:12.8px">res@lon2d = lon2d</span><br>
</div>
</span></span>
<div><span style="font-size:12.8px">;---</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">Be this (?)</span></div>
<div><br>
</div>
<div>;----</div>
<div style="font-size:12.8px"><span class=""><span class="m_-3981536243164243846gmail-im">
<div>then, in your graphics code<br>
<br>
</div>
</span></span>res@lat2d = tlat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;=== correct<br>
</div>
<span style="font-size:12.8px">res@lon2d = ltlon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;=== correct</span><br>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 9, 2017 at 3:33 PM, Dennis Shea <span dir="ltr">
&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>There are 'variables that contain coordinates' and 'coordinate variables'.<br>
<br>
</div>
Coordinate Variables (CVs) are one-dimensional and contain montonicall {in/de}creasing numerical values. Think 'rectilinear grid'. The 'copy_VarCoords' applies only to this strict subset of coordinates.<br>
<br>
===<br>
</div>
Looking at the SFWF variable:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float SFWF(time, nlat, nlon) ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:long_name = &quot;Virtual Salt Flux in FW Flux formulation&quot; ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:units = &quot;kg/m^2/s&quot; ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:coordinates = &quot;TLONG TLAT time&quot; ; &lt;*****************<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:grid_loc = &quot;2110&quot; ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:cell_methods = &quot;time: mean&quot; ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:_FillValue = 9.96921e&#43;36f ;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SFWF:missing_value = 9.96921e&#43;36f ;<br>
<br>
===<br>
<br>
<br>
</div>
<div>REPLACE:<span><br>
<br>
<span style="background-color:rgb(255,255,0)">******************************<wbr>******************************</span>
<div><span style="background-color:rgb(255,255,0)">; Copy variable attributes to the binary data</span></div>
<div><span style="background-color:rgb(255,255,0)">;*****************************<wbr>******************************<wbr>*</span></div>
<div><span style="background-color:rgb(255,255,0)"><br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">&nbsp;printVarSummary(flx)</span></div>
<div><span style="background-color:rgb(255,255,0)"><br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">&nbsp;copyVarMeta(sfwf,flx)<br>
<br>
</span></div>
</span>
<div><span style="background-color:rgb(255,255,0)">WITH<br>
<br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">tlat&nbsp; = f-&gt;TLAT<br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">ltlon = f-&gt;TLON<br>
<br>
=======================<br>
</span></div>
<br>
</div>
<div><br>
</div>
then, in your graphics code<br>
<br>
</div>
res@lat2d = lat2d<br>
</div>
res@lon2d = lon2d<br>
<br>
&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
<br>
<a href="http://www.ncl.ucar.edu/Applications/" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/</a><br>
</div>
Under &quot;Models&quot; ... Click CESM: POP<br>
<br>
</div>
There are numerous examples of plotting this type of data.<br>
<br>
</div>
HTH<span class="m_-3981536243164243846HOEnZb"><font color="#888888"><br>
</font></span></div>
<span class="m_-3981536243164243846HOEnZb"><font color="#888888">D<br>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
<div class="m_-3981536243164243846HOEnZb">
<div class="m_-3981536243164243846h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 9, 2017 at 9:46 AM, Hughlett, Taylor M <span dir="ltr">
&lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:12px;font-family:Helvetica,sans-serif">
<div>
<div>
<div>Hi Dennis,</div>
<div><br>
</div>
<div>I finally got around to doing this. I am attempting to copy over metadata from the lat/lon coordinates in a netCDF file to the flx variable in the binary file, but it tells me the syntax is wrong? I followed the examples on the website…</div>
<div><br>
</div>
<div>Here is the full script with the area of concern highlighted:</div>
<div><br>
</div>
<div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl&quot;</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl&quot;</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl&quot;</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div><br>
</div>
<div>begin</div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Set file paths</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div><br>
</div>
<div>&nbsp;fileb = &quot;sfwf_mm_PHC2_salx_flxio_20090<wbr>205.ieeer8&quot;</div>
<div>&nbsp;dirb &nbsp;= &quot;/glade/p/work/hughlett/PETM/p<wbr>aleo_setup/ocn/sfwf/&quot;</div>
<div>&nbsp;pathb = dirb&#43;fileb</div>
<div><br>
</div>
<div>&nbsp;reffl = &quot;<a href="http://b.e12.B1850CN.PETM8x.f09_g16.pop.h.0001-01.nc" target="_blank">b.e12.B1850CN.PETM8x.f09_g16.<wbr>pop.h.0001-01.nc</a>&quot;</div>
<div>&nbsp;refflpath = &quot;/glade/scratch/hughlett/csm/b<wbr>.e12.B1850CN.PETM8x.f09_g16/oc<wbr>n/hist/&quot;</div>
<div>&nbsp;refpth = refflpath&#43;reffl</div>
<div><br>
</div>
<div>&nbsp;pltnm &nbsp;= &quot;bin_sfwf_mm_PHC2_salx_flxio_2<wbr>0090205&quot;</div>
<div>&nbsp;pltdir = &quot;/glade/scratch/hughlett/plots<wbr>/b.e12.B1850CN.PETM8x.f09_g16/<wbr>ocn/horizontal/&quot;</div>
<div>&nbsp;pltpth = pltdir&#43;pltnm</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Set dimensions</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<span>
<div><br>
</div>
<div>&nbsp;ntim = 12</div>
<div>&nbsp;nlat = 320</div>
</span>
<div>&nbsp;nlon = 384</div>
<div><br>
</div>
<div>&nbsp;dims = (/ntim,nlat,nlon/)</div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Open and read binary file</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<span>
<div><br>
</div>
<div>&nbsp;setfileoption(&quot;bin&quot;,&quot;ReadByte<wbr>Order&quot;,&quot;BigEndian&quot;)</div>
</span>
<div>&nbsp;sss = fbindirread(pathb, 0, dims, &quot;double&quot;)</div>
<div>&nbsp;flx = fbindirread(pathb, 1, dims, &quot;double&quot;)</div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Open and read referece file</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div><br>
</div>
<div>&nbsp;f = addfile(refpth,&quot;r&quot;)</div>
<div>&nbsp;sfwf = f-&gt;SFWF</div>
<div><br>
</div>
<div>;<span style="background-color:rgb(255,255,0)">*****************************<wbr>******************************<wbr>*</span></div>
<div><span style="background-color:rgb(255,255,0)">; Copy variable attributes to the binary data</span></div>
<div><span style="background-color:rgb(255,255,0)">;*****************************<wbr>******************************<wbr>*</span></div>
<div><span style="background-color:rgb(255,255,0)"><br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">&nbsp;printVarSummary(flx)</span></div>
<div><span style="background-color:rgb(255,255,0)"><br>
</span></div>
<div><span style="background-color:rgb(255,255,0)">&nbsp;copyVarMeta(sfwf,flx)</span></div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Details of plot</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div><br>
</div>
<div>&nbsp;field = &quot;SFWF&quot;</div>
<div>&nbsp;plt_unit = &quot;kg m ~S~-2~N~ s~S~-1~N~&quot;</div>
<div>&nbsp;fieldname = &quot;Surface Freshwater Forcing&quot;</div>
<div><br>
</div>
<div>&nbsp;ContourMode = &quot;ManualLevels&quot;</div>
<div>&nbsp;;ContourMode = &quot;AutomaticLevels&quot;</div>
<div>&nbsp;;ContourMode = &quot;ExplicitLevels&quot;</div>
<div>&nbsp;maxcn = 0.0002</div>
<div>&nbsp;mincn = -0.0002</div>
<div>&nbsp;ci &nbsp; &nbsp;= 0.00005</div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Set workstation and resources</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>&nbsp;wks = gsn_open_wks(&quot;ps&quot;,pltpth) &nbsp;; open a postscript file</div>
<div>&nbsp;gsn_define_colormap(wks,&quot;MPL_<wbr>BrBG&quot;)</div>
<div><br>
</div>
<div>&nbsp;res = True</div>
<div>&nbsp;res@mpProjection &nbsp; &nbsp; &nbsp;= &quot;MOLLWEIDE&quot; &nbsp; &nbsp; &nbsp; ; choose projection</div>
<div>&nbsp;res@mpGridAndLimbOn &nbsp; = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; turn on lat/lon lines</div>
<div>&nbsp;res@mpPerimOn &nbsp; &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; turn off box around plot</div>
<div>&nbsp;res@mpGridLatSpacingF = 30. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; spacing for lat lines</div>
<div>&nbsp;res@mpGridLonSpacingF = 30. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; spacing for lon lines</div>
<div>&nbsp;res@cnFillOn &nbsp; &nbsp; &nbsp; = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Fill contours</div>
</div>
<div>
<div>&nbsp;res@mpGridLonSpacingF = 30. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; spacing for lon lines</div>
<div>&nbsp;res@cnFillOn &nbsp; &nbsp; &nbsp; = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Fill contours</div>
<div>&nbsp;res@cnSmoothingOn = True</div>
<div><br>
</div>
<div>&nbsp;;res@mpMinLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 30. &nbsp; &nbsp; &nbsp;; range to zoom in on</div>
<div>&nbsp;;res@mpMaxLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 60.</div>
<div>&nbsp;;res@mpMinLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 100.</div>
<div>&nbsp;;res@mpMaxLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 180.</div>
<div><br>
</div>
<div>&nbsp;cnSmoothingTensionF = -2.5</div>
<div>&nbsp;res@mpFillOn &nbsp; &nbsp; &nbsp; = False</div>
<div>&nbsp;res@mpCenterLonF = 0</div>
<div>&nbsp;res@cnLevelSelectionMode = ContourMode</div>
<div>&nbsp;if(ContourMode.eq.&quot;ExplicitLe<wbr>vels&quot;)then</div>
<div>&nbsp; res@cnLevels = contours</div>
<div>&nbsp;end if</div>
<div>&nbsp;if(ContourMode.eq.&quot;ManualLeve<wbr>ls&quot;)then</div>
<div>&nbsp; &nbsp;res@cnMaxLevelValF = maxcn</div>
<div>&nbsp; &nbsp;res@cnMinLevelValF = mincn</div>
<div>&nbsp; &nbsp;res@cnLevelSpacingF = ci</div>
<div>&nbsp;end if</div>
<div>&nbsp;res@gsnSpreadColors &nbsp;= True</div>
<div>&nbsp;res@cnLinesOn = True</div>
<div>&nbsp;res@cnLineLabelsOn = True</div>
<div>&nbsp;res@cnLineLabelFontHeightF = 0.006</div>
<div>&nbsp;;res@cnLineLabelFontAspectF = 1.1</div>
<div><br>
</div>
<div>&nbsp;res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp;= False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Do not draw plot</div>
<div>&nbsp;res@gsnFrame &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Do not advance frome</div>
<div>&nbsp;res@tiMainFontHeightF = .03</div>
<div>&nbsp;res@lbLabelFontHeightF = 0.012</div>
<div>&nbsp;res@cnLineLabelFontHeightF = .006</div>
<div>&nbsp;res@cnLineLabelBackgroundColo<wbr>r = &quot;white&quot;</div>
<div>&nbsp;res@txFontHeightF = 0.02</div>
<div>&nbsp;res@gsnRightString = plt_unit</div>
<div>&nbsp;res@gsnLeftString = fieldname</div>
<div>&nbsp;res@mpDataBaseVersion =&quot;MediumRes&quot;</div>
<div>&nbsp; res@txFont = 21</div>
<div>&nbsp; res@tiMainFont = 21</div>
<div>&nbsp; res@tiXAxisFont = 21</div>
<div>&nbsp; res@tiYAxisFont = 21</div>
<div>&nbsp; res@lbLabelFont = 21</div>
<div>&nbsp; res@tmXBLabelFont = 21</div>
<div>&nbsp; res@tmYLLabelFont = 21</div>
<div><br>
</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div>; Plot</div>
<div>;*****************************<wbr>******************************<wbr>*</div>
<div><br>
</div>
<div>&nbsp;plot = new(1,graphic)</div>
<div>&nbsp;plot(0) = gsn_csm_contour_map(wks,flx(1,<wbr>:,:),res)</div>
<div><br>
</div>
<div>&nbsp;end</div>
</div>
<span>
<div><br>
</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</span></div>
</div>
<div><br>
</div>
<span id="m_-3981536243164243846m_-4922833884156696792m_5172243696526585776OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Dennis Shea &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Thursday, January 5, 2017 at 12:26 PM<span><br>
<span style="font-weight:bold">To: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;<br>
</span><span style="font-weight:bold">Cc: </span>Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>&gt;, &quot;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&gt;
<div>
<div class="m_-3981536243164243846m_-4922833884156696792h5"><br>
<span style="font-weight:bold">Subject: </span>Re: [ncl-talk] Reading in .ieeer8 file and plotting it with NCL<br>
</div>
</div>
</div>
<div>
<div class="m_-3981536243164243846m_-4922833884156696792h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<pre>  ntim = 12<br></pre>
<pre>  nlat = 320<br></pre>
<pre>  mlon = 384 <br><br></pre>
<pre>  dims = (/ntim,nlat,mlon/)    ; dims(3)<br></pre>
<pre>  filb = &quot;binary_file_name&quot;<br></pre>
<pre>  dirb = &quot;/dir/where_binary_file/locate<wbr>d/&quot;<br></pre>
<pre>  pthb = dirb&#43;filb<br><br>  <br><strong>  setfileoption</strong>(&quot;bin&quot;,&quot;ReadByteO<wbr>rder&quot;,&quot;BigEndian&quot;)  <br><br>  sss = <strong>fbindirread</strong>(pthb, 0, dims, &quot;double&quot;)<br>  <br></pre>
<pre>  fx  = <strong>fbindirread</strong>(pthb, 1, dims, &quot;double&quot;)</pre>
<pre>  <br></pre>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 5, 2017 at 10:21 AM, Hughlett, Taylor M <span dir="ltr">
&lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:12px;font-family:Helvetica,sans-serif">
<div>
<div>
<div>Hi Dave,</div>
<div><br>
</div>
<div>Thank you so much for the information. I was able to track down the file that has all of the descriptions I required, and am now working on reading it in using NCL!</div>
<div><br>
</div>
<div>Cheers,</div>
<span>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</span></div>
</div>
<div><br>
</div>
<span id="m_-3981536243164243846m_-4922833884156696792m_5172243696526585776m_-8341745444498031110OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Wednesday, January 4, 2017 at 6:52 PM<span><br>
<span style="font-weight:bold">To: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [ncl-talk] Reading in .ieeer8 file and plotting it with NCL<br>
</span></div>
<div>
<div class="m_-3981536243164243846m_-4922833884156696792m_5172243696526585776h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">Taylor,
<div><br>
</div>
<div>&gt; 2.&nbsp;<span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">How do I know what data is stored on the file prior</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">&gt; to reading it in (i.e. Variables)? Or is this even possible?</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">Files called &quot;binary&quot; without additional qualification can only be understood by formal documentation, or by at least a minimal description from the person who created
 the file.&nbsp; You need to get this description from the source of your data.&nbsp; Typically there is no descriptive metadata stored inside such files, and the assumption is that this description is somewhere external.</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">The description should include file layout details such as array sizes, positions, dimension order of storage, elemental data type, byte order, fortran write mode if
 any, and record structure if any.&nbsp; The description should also include what variables and possibly metadata are stored.&nbsp; If the layout details are hard to get, it can sometimes help to find out just what software created the file.</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">The suffix&nbsp;</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">.ieeer8 says to me, &quot;8-byte reals&quot;, because only fortran uses
 the type name &quot;real&quot; instead of &quot;float&quot; or &quot;floating point&quot;.&nbsp; A fuller type description is&nbsp;</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">&quot;8-byte IEEE floating point values&quot;, but that is just a guess.&nbsp; If correct,
 that would be NCL data type &quot;double&quot;, and that does not answer any of the other questions about file layout</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">.</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;"><br>
</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">--Dave</span></div>
<div><font color="#000000" face="helvetica,sans-serif"><br>
</font>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 4, 2017 at 1:47 PM, Dennis Shea <span dir="ltr">
&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>Were the data records written by fortran or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; See: <a href="http://www.atmos.washington.edu/~salathe/osx_unix/endian.html" target="_blank">
http://www.atmos.washington.ed<wbr>u/~salathe/osx_unix/endian.htm<wbr>l</a><br>
<br>
</div>
<div>or ?????<br>
</div>
<div><br>
[0]<br>
</div>
<div>The problem with binary is that someone must describe how the data was written. Fortran's default (sequential) binary has **hidden record separators**. The user could also open a binary with &quot;access=direct&quot;. This means 'flat' binary files (no record separators.<br>
<br>
</div>
<div>[1] <br>
Were the binary files created on a big- or little-endian system? See: <a href="https://en.wikipedia.org/wiki/Endianness" target="_blank">
https://en.wikipedia.org/wiki/<wbr>Endianness</a><br>
</div>
<div><br>
[2]<br>
</div>
Likely, fbindirread *or* fbinrecread would work. However, without more knowledge not much more can be said.<br>
<br>
[3]<br>
</div>
One major reason for the creation of HDF and netCDF to allow the files to be 'blindly' examined via a suite of standard function functions.<br>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 4, 2017 at 1:30 PM, Hughlett, Taylor M <span dir="ltr">
&lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:12px;font-family:helvetica,sans-serif">
<div>
<div>
<div>
<div>Good afternoon everyone,</div>
<div><br>
</div>
<div>I am attempting to read in a .ieeer8 file using NCL so that it can be plotted.&nbsp;</div>
<div><br>
</div>
<div>I am completely new with binary files, so bear with me.</div>
<div><br>
</div>
<div>I understand that this is a binary file, so visualization and reading it is much more complicated than it would be with netCDF’s.&nbsp;</div>
<div><br>
</div>
<div>After having looked over the instructions on the NCL site, I am still having some confusion with how to get started.</div>
<div><br>
</div>
<div>Specifically, I have these questions:</div>
<ol>
<li>Will the fbindirread work to read in a .ieeer8 file (I am assuming the file is fortran as it is a restart file for CESM1’s POP2)?</li><li>How do I know what data is stored on the file prior to reading it in (i.e. Variables)? Or is this even possible?</li></ol>
<div>Any help would be greatly appreciated with this, and I am happy to provide more information if it is required.</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</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>
</div>
</div>
</div>
</span>
</body>
</html>