<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I want to plot the GRAUPEL WATER CONTENT at a LAT/LON with height. So Y axis will be the HEIGHT and on X axis it will Graupel </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>But the document of 2A12 (<a href="http://pps.gsfc.nasa.gov/Documents/filespec.TRMM.V7.pdf)%20says">http://pps.gsfc.nasa.gov/Documents/filespec.TRMM.V7.pdf)%20says</a> that The information ablout this variable is CONTAINED in the two variables (Pg 119)</span></div><span><div align="LEFT"><font face="CMSL10" size="2"><font face="CMSL10" size="2">7.5 2A12 - TMI Profiling </font></font><font face="CMR10" size="2"><font face="CMR10" size="2">119</font></font></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;"><font face="CMR10" size="2"><font face="CMR10" size="2">
<br></font></font></div><font face="CMTT12"><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;"><br></div><div align="LEFT">S = species(1-6)</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;">
<br></div><div align="LEFT">1 = cloud water content</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;">
<br></div><div align="LEFT">2 = rain water content</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;">
<br></div><div align="LEFT">3 = cloud ice content</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;">
<br></div><div align="LEFT">4 = snow water content</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;">
<br></div><div align="LEFT">5 = graupel water content</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;">
<br></div><div align="LEFT">6 = latent heat</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;">
<br></div><div align="LEFT">F = freezingHeightIndex</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;">
<br></div><div align="LEFT">C = clusterNumber</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;">
<br></div><div align="LEFT">In a Fortran program,</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;">
<br></div><div align="LEFT">Profile Value = clusterScale * cluster(S,F,L,C)</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;">
<br></div><div align="LEFT">In a C program,</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;">
<br></div><div>Profile Value = clusterScale * cluster[C-1][L-1][F-1][S-1]</div></font><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;"><br></div></span><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;">The two variables CLUSTER SCALE </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;"> float clusterScale ( nscan, npixel, nspecies )<br> hdf_name : clusterScale</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;"><br></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;">AND CLUSTER</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;"> float cluster ( ncluster, nlayer, nfindex, nspecies )<br> hdf_name :
cluster<br> </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;"><br></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;">are of different dimensions. </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;">I donot know how to proceed further with this. <br></div><div></div><div> </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 4:45 PM, Alessandra Giannini <alesall@iri.columbia.edu> wrote:<br> </font> </div> <br><br> <div><br clear="none">you need to continue to edit your script to adapt to your specific need…<br
clear="none">What is the variable that you want to plot? If it's not called "latentHeat" what is it called?<br clear="none">Then substitute just like you did for lat and lon…<br clear="none"><br clear="none"><br clear="none"><br clear="none"><div id="yqtfd09556"><br clear="none">On Sep 2, 2014, at 7:10 AM, Geeta Geeta <<a href="mailto:geetag54@yahoo.com" shape="rect" ymailto="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>> wrote:<br clear="none"><br clear="none">> Hi<br clear="none">> I have correctec the lines 34 and 35. of my file.<br clear="none">> <br clear="none">> 1 ;Reading HDF4-SDS files<br clear="none">> 2 ;*********** Load Libraries ************************************<br clear="none">> 3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br clear="none">> 4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br
clear="none">> 5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br clear="none">> 6 ;**************************************************************<br clear="none">> 7 begin<br clear="none">> 8 ;***************************************************************<br clear="none">> 9 ; User Input<br clear="none">> 10 ;***************************************************************<br clear="none">> 11 ; INPUT<br clear="none">> 12 diri = "./" ; input directory<br
clear="none">> 13 fili = "2A12.20100702.71931.7.HDF" ; file<br clear="none">> 14 var = "latentHeat" ; desired variable<br clear="none">> 15<br clear="none">> 16 ; OUTPUT<br clear="none">> 17 PLOT = True ; create a plot [?]<br clear="none">> 18 pltDir = "./" ;
directory for plot output<br clear="none">> 19 ;pltName = "2A12.100702.71931.6" ; plot name<br clear="none">> 20 pltName = "hdf4sds" ; plot name<br clear="none">> 21 pltType = "ps" ; ps, pdf, x11, png [5.2.0] <br
clear="none">> 22 ;***************************************************************<br clear="none">> 23 ; End User Input<br clear="none">> 24 ;***************************************************************<br clear="none">> 25 ; Read hdf<br clear="none">> 26 ;***************************************************************<br clear="none">> 27<br clear="none">> 28 f = addfile (diri+fili, "r") ; reading inputfile<br clear="none">> 29 ;print(f)<br clear="none">> 30<br clear="none">> 31 lat = f->Latitude(:,:) ; (scan, pixel)<br clear="none">> 32
lon = f->Longitude(:,:)<br clear="none">> 33<br clear="none">> 34 <a href="mailto:lat@units" shape="rect" ymailto="mailto:lat@units">lat@units</a> = "degrees_north" ; add units<br clear="none">> 35 <a href="mailto:lon@units" shape="rect" ymailto="mailto:lon@units">lon@units</a> = "degrees_east"<br clear="none">> 36<br clear="none">> 37 printMinMax(lat, True)<br clear="none">> 38 printMinMax(lon, True)<br clear="none">> 39<br clear="none">> 40 xs = f->$var$ ; ( scan, pixel, layer )<br clear="none">> 41 <a
href="mailto:xs@_FillValue" shape="rect" ymailto="mailto:xs@_FillValue">xs@_FillValue</a> = inttoshort( -9999 ) ; visually look at file/data<br clear="none">> 42 <a href="mailto:xs@long_name" shape="rect" ymailto="mailto:xs@long_name">xs@long_name</a> = <a href="mailto:xs@hdf_name" shape="rect" ymailto="mailto:xs@hdf_name">xs@hdf_name</a><br clear="none">> 43 ;printVarSummary(xs)<br clear="none">> 44 ;printMinMax(xs, True)<br clear="none">> <br clear="none">> <br clear="none">> Now when I run this <br clear="none">> I get following error<br clear="none">> bash-3.2$ ncl hdf4sds_6.ncl<br clear="none">> Copyright (C) 1995-2007 - All Rights Reserved<br clear="none">> University Corporation for Atmospheric Research<br clear="none">>
NCAR Command Language Version 5.0.0<br clear="none">> The use of this software is governed by a License Agreement.<br clear="none">> See <a href="http://www.ncl.ucar.edu/" target="_blank" shape="rect">http://www.ncl.ucar.edu/</a>for more details.<br clear="none">> (0)<br clear="none">> (0) min=-39.1053 max=39.0529<br clear="none">> (0)<br clear="none">> (0) min=-179.999 max=180<br clear="none">> fatal:Either file (f) isn't defined or variable (latentHeat) is not a variable in the file<br clear="none">> fatal:Execute: Error occurred at or near line 40 in file hdf4sds_6.ncl<br clear="none">> <br clear="none">> bash-3.2$<br clear="none">> <br clear="none">> I am beginner to NCL. Started a week before as I have to plot the Hydrometeor profile. Kindly guide further.
<br clear="none">> <br clear="none">> <br clear="none">> Geeta.<br clear="none">> <br clear="none">> <br clear="none">> On Tuesday, 2 September 2014 4:28 PM, Geeta Geeta <<a href="mailto:geetag54@yahoo.com" shape="rect" ymailto="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>> wrote:<br clear="none">> <br clear="none">> <br clear="none">> Thanks.<br clear="none">> I corrected my mistake and this is how the NCL file looks like now.<br clear="none">> ;Reading HDF4-SDS files<br clear="none">> ;*********** Load Libraries ************************************<br clear="none">> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br clear="none">> load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br clear="none">> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br clear="none">> ;**************************************************************<br clear="none">> begin<br clear="none">> ;***************************************************************<br clear="none">> ; User Input<br clear="none">> ;***************************************************************<br clear="none">> ; INPUT<br clear="none">> diri = "./" ; input directory<br clear="none">> fili = "2A12.20100702.71931.7.HDF" ; file<br
clear="none">> var = "latentHeat" ; desired variable<br clear="none">> <br clear="none">> ; OUTPUT<br clear="none">> PLOT = True ; create a plot [?]<br clear="none">> pltDir = "./"
; directory for plot output<br clear="none">> ;pltName = "2A12.100702.71931.6" ; plot name<br clear="none">> pltName = "hdf4sds" ; plot name<br clear="none">> pltType = "ps" ; ps, pdf, x11, png [5.2.0] <br clear="none">>
;***************************************************************<br clear="none">> ; End User Input<br clear="none">> ;***************************************************************<br clear="none">> ; Read hdf<br clear="none">> ;***************************************************************<br clear="none">> <br clear="none">> "hdf4sds_6.ncl" 188 lines, 6725 charac<br clear="none">> <br clear="none">> I run NCL but got following message.<br clear="none">> bash-3.2$ ncl hdf4sds_6.ncl<br clear="none">> Copyright (C) 1995-2007 - All Rights Reserved<br
clear="none">> University Corporation for Atmospheric Research<br clear="none">> NCAR Command Language Version 5.0.0<br clear="none">> The use of this software is governed by a License Agreement.<br clear="none">> See <a href="http://www.ncl.ucar.edu/" target="_blank" shape="rect">http://www.ncl.ucar.edu/</a>for more details.<br clear="none">> fatal:Either file (f) isn't defined or variable (geolocation) is not a variable in the file<br clear="none">> fatal:Execute: Error occurred at or near line 31 in file hdf4sds_6.ncl<br clear="none">> <br clear="none">> bash-3.2$<br clear="none">> <br clear="none">> <br clear="none">> I am attaching the ncl file for reference.<br clear="none">> <br clear="none">> This is the header information that I extracted using<br clear="none">> bash-3.2$ ncl_filedump 2A12.20100702.71931.7.HDF >header2010<br clear="none">> <br clear="none">> I am
attaching the header2010 as well. there is NO geolocation Variable in that. So what I should DO.<br clear="none">> <br clear="none">> Geeta.<br clear="none">> <br clear="none">> <br clear="none">> On Tuesday, 2 September 2014 3:57 PM, Alessandra Giannini <<a href="mailto:alesall@iri.columbia.edu" shape="rect" ymailto="mailto:alesall@iri.columbia.edu">alesall@iri.columbia.edu</a>> wrote:<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> Hi Geeta, <br clear="none">> <br clear="none">> NCL is telling you what may be wrong…<br clear="none">> <br clear="none">> Either your filename is slightly off: <br clear="none">> <br clear="none">> 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 clear="none">> <br clear="none">> Or there is no variable called
"geolocation" in the file you are reading from.<br clear="none">> <br clear="none">> What are latitude and longitude called in the file?<br clear="none">> <br clear="none">> best, alessandra<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> -- <br clear="none">> Alessandra Giannini<br clear="none">> IRI for Climate and Society - The Earth Institute at Columbia University<br clear="none">> P.O. Box 1000, Palisades NY 10964-8000<br clear="none">> phone/fax: +1 845 680-4473/4864 - email: <a href="mailto:alesall@iri.columbia.edu" shape="rect" ymailto="mailto:alesall@iri.columbia.edu">alesall@iri.columbia.edu</a><br clear="none">> <br clear="none">> On Sep 2, 2014, at 6:21 AM, Geeta Geeta <<a href="mailto:geetag54@yahoo.com" shape="rect" ymailto="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>> wrote:<br clear="none">> <br
clear="none">> > Hi .<br clear="none">> > I am trying to plot the data in HDF format using NCL.<br clear="none">> > <br clear="none">> > I happen to see the ready script available <a href="https://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.nclwhich" target="_blank" shape="rect">https://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.nclwhich</a>reads HDF data.<br clear="none">> > <br clear="none">> > On my system I downloaded this script and tried to run this but when I run this, following message comes.<br clear="none">> > bash-3.2$ ncl hdf4sds_6.ncl<br clear="none">> > Copyright (C) 1995-2007 - All Rights Reserved<br clear="none">> > University Corporation for Atmospheric Research<br clear="none">> > NCAR Command Language Version 5.0.0<br clear="none">> > The use of this software is governed by a License Agreement.<br clear="none">> > See <a
href="http://www.ncl.ucar.edu/for" target="_blank" shape="rect">http://www.ncl.ucar.edu/for</a>more details.<br clear="none">> > fatal:_NclCreateFile: Requested file does not exist as (./2A12.20100702.71931.6.HDF) or as (./2A12.20100702.71931.6), can't add file<br clear="none">> > fatal:Either file (f) isn't defined or variable (geolocation) is not a variable in the file<br clear="none">> > fatal:Execute: Error occurred at or near line 31 in file hdf4sds_6.ncl<br clear="none">> > <br clear="none">> > bash-3.2$ ls -l *HDF*<br clear="none">> > -rw-r--r-- 1 model staff 55092053 Sep 01 15:54 2A12.20100702.71931.7.HDF<br clear="none">> > -rw-r--r-- 1 model staff 55092079 Aug 12 11:13 2A12.20130523.88390.7.HDF<br clear="none">> > -rw-r--r-- 1 model staff 55092085 Aug 12
15:27 2A12.20140602.94247.7.HDF<br clear="none">> > bash-3.2$ ls -l *hdf*ncl*<br clear="none">> > -rw-r--r-- 1 model staff 6725 Sep 01 17:01 hdf4sds_6.ncl<br clear="none">> > bash-3.2$<br clear="none">> > <br clear="none">> > The files exist in my directory.<br clear="none">> > Can somebody tell me what's mistake???<br clear="none">> > Geeta.<br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > _______________________________________________<br clear="none">> > ncl-talk mailing list<br clear="none">> > List instructions, subscriber options, unsubscribe:<br clear="none">> > <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" shape="rect">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">> <br
clear="none">> <br clear="none">> <br clear="none">> <br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>