<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> ; INPUT<br> diri = "./" ; input directory<br> fili = "2A12.20100702.71931.7.HDF" ; file<br>
var = "latentHeat" ; desired variable<br>
<br> ; OUTPUT<br> PLOT = True ; create a plot [?]<br> pltDir = "./" ; directory for plot output<br> ;pltName = "2A12.100702.71931.6" ; plot name<br> pltName =
"hdf4sds" ; plot name<br> pltType = "ps" ; ps, pdf, x11, png
[5.2.0] <br>;***************************************************************<br>; End User Input<br>;***************************************************************<br>; Read
hdf<br>;***************************************************************<br> <br>"hdf4sds_6.ncl" 188 lines, 6725 charac</span></div><div></div><div> </div><div>I run NCL but got following message. </div><div>bash-3.2$ ncl hdf4sds_6.ncl<br> Copyright (C) 1995-2007 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command
Language Version 5.0.0<br> The use of this software is governed by a License Agreement.<br> 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> <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 >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 <alesall@iri.columbia.edu> 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 <<a href="mailto:geetag54@yahoo.com" ymailto="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>> wrote:<br><br>> Hi .<br>> I am trying to plot the data in HDF format using NCL.<br>> <br>> 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>> <br>> On my system I downloaded this script and tried to run this but when I run this, following message comes.<br>> bash-3.2$ ncl hdf4sds_6.ncl<br>> Copyright (C) 1995-2007 - All Rights Reserved<br>> University Corporation for Atmospheric Research<br>> NCAR Command Language Version 5.0.0<br>> The use of this software is governed by a License Agreement.<br>> See <a
href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a>for more details.<br>> fatal:_NclCreateFile: Requested file does not exist as (./2A12.20100702.71931.6.HDF) or as (./2A12.20100702.71931.6), can't add file<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>> <br>> bash-3.2$ ls -l *HDF*<br>> -rw-r--r-- 1 model staff 55092053 Sep 01 15:54 2A12.20100702.71931.7.HDF<br>> -rw-r--r-- 1 model staff 55092079 Aug 12 11:13 2A12.20130523.88390.7.HDF<br>> -rw-r--r-- 1 model staff 55092085 Aug 12 15:27 2A12.20140602.94247.7.HDF<br>> bash-3.2$ ls -l *hdf*ncl*<br>> -rw-r--r-- 1 model staff
6725 Sep 01 17:01 hdf4sds_6.ncl<br>> bash-3.2$<br>> <br>> The files exist in my directory.<br>> Can somebody tell me what's mistake???<br>> Geeta.<br>> <br>> <br>> <br>> <br>> _______________________________________________<br>> ncl-talk mailing list<br>> List instructions, subscriber options, unsubscribe:<br>> <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>