<div dir="ltr">Many thanks for your help. I have now tried to add .hdfeos and .he2 but unfortunately the error message remains...<div><br><div><div>$ ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf.hdfeos</div><div>if: Expression Syntax.</div></div><div><br></div><div><div>$ ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf.he2</div><div>if: Expression Syntax.</div></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 August 2015 at 15:51, 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">If you examine the file via:<div><br></div><div>%&gt; ncl_filedump MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf | less</div><div><br></div><div>You will see that it is a HDF-EOS2 file.</div><div><br></div><div>I</div><div>







<p><span>Variable: f</span></p><p>Type: file</p><p>filename:       MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101</p>
<p><span>path:   MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf</span></p>
<p><span>   file global attributes:</span></p>
<p><span>      HDFEOSVersion : HDFEOS_V2.14</span></p>
<p><span>      StructMetadata_0 : GROUP=SwathStructure</span></p>
<p><span>END_GROUP=SwathStructure</span></p>
<p><span>GROUP=GridStructure</span></p>
<p><span>        GROUP=GRID_1</span></p>
<p><span>               GridName=&quot;EOSGRID&quot;</span></p>
<p><span>                XDim=540</span></p>
<p><span>                YDim=361</span></p><p><span>[SNIP]</span></p><p><span><br></span></p><p><span>====================</span></p><div>It is best to attach a .he2 (or .hdfeos) to the file in the command line. You need *not* rename the file. </div><p><span>%&gt; ncl_filedump MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf.he2 | less<br></span></p><p><span><br></span></p><p><span>===================</span></p><p><span>To make a netCDF, use the .he2 extension to the file name in the command line.</span></p><p><span><br></span></p><p><span>%&gt; </span>ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf.he2</p><p><br></p><p>Good Luck</p>







</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Aug 27, 2015 at 3:33 AM, Marit Marsh Stromberg <span dir="ltr">&lt;<a href="mailto:mmarsh04@mail.bbk.ac.uk" target="_blank">mmarsh04@mail.bbk.ac.uk</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,</div><div>I am trying to convert a hdf file to netcdf format via ncl_convert2nc but get an error message &quot;if:Expression Syntax&quot; (see below for input and output message). This seem to have been a problem raised on this email list before (e.g. <a href="http://www.ncl.ucar.edu/Support/talk_archives/2013/3087.html" target="_blank">http://www.ncl.ucar.edu/Support/talk_archives/2013/3087.html</a>) but following the email thread - and going through the proposed ways of solving the issue - the issue do not appear to have been solved (at least not posted on the mailing list). Does anybody have an idea on what the issue might be?</div><div>I have attached a link so that the file I want to convert can be downloaded.</div><div><br></div><div>Kind regards,</div><div>Marit Marsh Stromberg</div><div><br></div><div>The code I am running and the error message I get:</div><div><div>$ ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf</div><div>if: Expression Syntax.</div></div><div><br></div><div>My computer and ncl version info:</div><div><div><div><div><div>$ ncl -V</div><div>6.3.0</div></div></div></div><div>The NCL binary I downloaded was <a href="https://www.earthsystemgrid.org/download/fileDownload.htm?logicalFileId=81feecd3-cd9b-11e4-bb80-00c0f03d5b7c" style="font-size:13px;font-family:arial;line-height:16.0029983520508px;background-color:rgb(242,242,242)" target="_blank">ncl_​ncarg-​6.​3.​0.​MacOS_​10.​8_​64bit_​nodap_​gcc471.​tar.​gz</a></div><div><br></div><div>$ uname -a</div><div>Darwin DM-MacBook-Pro.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64</div></div><div><br></div><div>Mac OS X Version 10.8.5</div><div><br></div><div>What I have tried so far, as suggested in reply on this email list before:</div><div>* to add .he5 as file ending (as suggested in <a href="http://www.ncl.ucar.edu/Support/talk_archives/2013/3093.html" target="_blank">http://www.ncl.ucar.edu/Support/talk_archives/2013/3093.html</a>):<br></div><div><div>$ ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf.he5</div><div>if: Expression Syntax.</div></div><div><br></div><div>* To do a file dump (ncl_filedump) - which I am able to do. (as suggested in <a href="http://www.ncl.ucar.edu/Support/talk_archives/2013/3167.html" target="_blank">http://www.ncl.ucar.edu/Support/talk_archives/2013/3167.html</a>)</div><div><br></div><div>* Running the command prefixed by &#39;csh -xv&#39; (as suggested in <a href="http://www.ncl.ucar.edu/Support/talk_archives/2013/3208.html" target="_blank">http://www.ncl.ucar.edu/Support/talk_archives/2013/3208.html</a>)</div><div>This gives:</div><div><div>$ csh -xv ncl_convert2nc MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf</div><div>ncl_convert2nc: No such file or directory.</div></div><div>However, running</div><div><div>$ which ncl_convert2nc</div><div>/usr/local/ncl-6.3.0/bin/ncl_convert2nc</div></div><div>shows it should be there.</div><div>​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/a/mail.bbk.ac.uk/file/d/0B5nVy-cTj_CkUzQ3SUxoMi1IN0E/view?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">MERRA200.prod.assim.tavg1_2d_slv_Nx.20000101.hdf</span></a></div>​</div></div>
<br></div></div>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>