<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Thanks. </span></div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 16px; font-style: normal; background-color: transparent;"><span>I corrected my mistake and this is how the NCL file looks like now. </span></div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 16px; font-style: normal; background-color: transparent;"><span>;Reading HDF4-SDS files<br>;*********** Load Libraries ************************************<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load
 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>;**************************************************************<br>begin<br>;***************************************************************<br>; User Input<br>;***************************************************************<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; INPUT<br>&nbsp;&nbsp; diri&nbsp;&nbsp;&nbsp; = "./"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; input directory<br>&nbsp;&nbsp; fili&nbsp;&nbsp;&nbsp; = "2A12.20100702.71931.7.HDF"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file<br>&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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>;***************************************************************<br>; End User Input<br>;***************************************************************<br>; Read
 hdf<br>;***************************************************************<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>"hdf4sds_6.ncl" 188 lines, 6725 charac</span></div><div></div><div>&nbsp;</div><div>I run NCL but got following message. </div><div>bash-3.2$ ncl hdf4sds_6.ncl<br>&nbsp;Copyright (C) 1995-2007 - All Rights Reserved<br>&nbsp;University Corporation for Atmospheric Research<br>&nbsp;NCAR Command
 Language Version 5.0.0<br>&nbsp;The use of this software is governed by a License Agreement.<br>&nbsp;See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.<br>fatal:Either file (f) isn't defined or variable (geolocation) is not a variable in the file<br>fatal:Execute: Error occurred at or near line 31 in file hdf4sds_6.ncl<br>&nbsp;<br>bash-3.2$</div><div><br></div><div><br></div><div>I am attaching the ncl file for reference. </div><div><br></div><div>This is the header information that I extracted using </div><div>bash-3.2$ ncl_filedump 2A12.20100702.71931.7.HDF &gt;header2010</div><div><br></div><div>I am attaching the header2010 as well. there is NO geolocation Variable in that. So what I should DO. </div><div><br></div><div>Geeta. </div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div
 style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Tuesday, 2 September 2014 3:57 PM, Alessandra Giannini &lt;alesall@iri.columbia.edu&gt; wrote:<br> </font> </div>  <br><br> <div><br>Hi Geeta, <br><br>NCL is telling you what may be wrong…<br><br>Either your filename is slightly off: <br><br>in your script you call a file by the name "2A12.20100702.71931.6.HDF", but when you list, you have a file with a 7 at the end, instead of a 6: "2A12.20100702.71931.7.HDF"<br><br>Or there is no variable called "geolocation" in the file you are reading from.<br><br>What are latitude and longitude called in the file?<br><br>best, alessandra<br><br><br><br><br><br>-- <br>Alessandra Giannini<br>IRI for Climate and Society - The Earth Institute at Columbia University<br>P.O. Box 1000, Palisades NY 10964-8000<br>phone/fax: +1 845 680-4473/4864 - email: <a href="mailto:alesall@iri.columbia.edu"
 ymailto="mailto:alesall@iri.columbia.edu">alesall@iri.columbia.edu</a><br><br>On Sep 2, 2014, at 6:21 AM, Geeta Geeta &lt;<a href="mailto:geetag54@yahoo.com" ymailto="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>&gt; wrote:<br><br>&gt; Hi .<br>&gt; I am trying to plot the data in HDF format using NCL.<br>&gt; <br>&gt; I happen to see the ready script available <a href="https://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.ncl</a>which reads HDF data.<br>&gt; <br>&gt; On my system I downloaded this script and tried to run this but when I run this, following message comes.<br>&gt; bash-3.2$ ncl hdf4sds_6.ncl<br>&gt;&nbsp; Copyright (C) 1995-2007 - All Rights Reserved<br>&gt;&nbsp; University Corporation for Atmospheric Research<br>&gt;&nbsp; NCAR Command Language Version 5.0.0<br>&gt;&nbsp; The use of this software is governed by a License Agreement.<br>&gt;&nbsp; See <a
 href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a>for more details.<br>&gt; fatal:_NclCreateFile: Requested file does not exist as (./2A12.20100702.71931.6.HDF) or as (./2A12.20100702.71931.6), can't add file<br>&gt; fatal:Either file (f) isn't defined or variable (geolocation) is not a variable in the file<br>&gt; fatal:Execute: Error occurred at or near line 31 in file hdf4sds_6.ncl<br>&gt;&nbsp; <br>&gt; bash-3.2$ ls -l *HDF*<br>&gt; -rw-r--r--&nbsp; &nbsp; 1 model&nbsp; &nbsp; staff&nbsp; &nbsp; &nbsp; 55092053 Sep 01 15:54 2A12.20100702.71931.7.HDF<br>&gt; -rw-r--r--&nbsp; &nbsp; 1 model&nbsp; &nbsp; staff&nbsp; &nbsp; &nbsp; 55092079 Aug 12 11:13 2A12.20130523.88390.7.HDF<br>&gt; -rw-r--r--&nbsp; &nbsp; 1 model&nbsp; &nbsp; staff&nbsp; &nbsp; &nbsp; 55092085 Aug 12 15:27 2A12.20140602.94247.7.HDF<br>&gt; bash-3.2$ ls -l *hdf*ncl*<br>&gt; -rw-r--r--&nbsp; &nbsp; 1 model&nbsp; &nbsp; staff&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 6725 Sep 01 17:01 hdf4sds_6.ncl<br>&gt; bash-3.2$<br>&gt; <br>&gt; The files exist in my directory.<br>&gt; Can somebody tell me what's mistake???<br>&gt; Geeta.<br>&gt; <br>&gt;&nbsp; <br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; ncl-talk mailing list<br>&gt; List instructions, subscriber options, unsubscribe:<br>&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br><br><br></div>  </div> </div>  </div> </div></body></html>