<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>re: <font size="2" face="Arial"> <a href="http://www.ncl.ucar.edu/Applications/calipso.shtml" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/calipso.shtml</a> under the heading <b>calipso_3.ncl</b><br></font></div><div><br></div><div><font size="2"><font face="Arial">Hi Srishti</font></font></div><div><font size="2"><font face="Arial"><br></font></font></div><div><font size="2"><font face="Arial">[1] You 'forgot' to include 'time'<br></font></font></div><div><font size="2"><font face="Arial"><pre>;----------------------------------------------
; GET TIME FIELDS TO GET A TIME STRING, WHICH WILL BE USED TO STRIDE X-AXIS LATITUDE AND LONGITUDE
;----------------------------------------------
time = (/ f->Profile_T /) ; originally (/f[ifile]->Profile_Time/)
time@units = "seconds since 1993-01-01 00:00"
tstring = ut_string(time(:,0), "%Y-%N-%D %H:%M:%S")
stride = dimsizes(tstring)/15
</pre></font></font>[2] <b>gsn_csm_contour</b>: Consider some variable: FOO(<b>dim0</b>,<b>dim1</b>)</div><div> <br></div><div> When gsn_csm_contour plots the variable, it treats the <b>dim0</b> as the Y-axis and the <b>dim1 </b>as the X-axis</div><div><br></div><div> The CALIPSO variable <br></div><div> TBC_532 = hdf4_file->Total_Backscatter_Coefficient_532</div><div> <b>printVarSummary</b>(TBC_532)</div><div><br></div><div> has dimensions TBC_532(<b>dim1</b>,<b>dim0</b>) which are reversed. This is easily fixed via NCL's dimension reordering. The script renames the dimensions<br></div><div><br></div><div> plot = <b>gsn_csm_contour</b>(wks,TBC_532(<b>hgt|:,xcoord|:</b>),res) ; make 'hgt' the Y-Axis<br></div><div><br></div><div>Attached is a modification. A local CALIPSO file is used so you will have to make minor changes.</div><div>=============</div><div><br></div><div><br></div><div>If you are 'new to NCL', please see</div><div> <a href="http://www.ncl.ucar.edu/Document/Manuals/">http://www.ncl.ucar.edu/Document/Manuals/</a></div><div><br></div><div>Specifically, the NCL User Guide<br></div><div><br></div><div> D<br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 11, 2018 at 1:06 PM, Srishti Dasarathy <span dir="ltr"><<a href="mailto:srdasara@ucsd.edu" target="_blank">srdasara@ucsd.edu</a>></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 dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><font size="2" face="Arial">Dear ncl talk, </font><div><font size="2" face="Arial"><br></font></div><div><div dir="ltr"><div><font size="2" face="Arial">I’m a beginner with NCL, and I would greatly appreciate your advice regarding plotting the 532nm total backscatter coefficient from CALIPSO. I’ve attached my script to this message, which I modified from the script posted on <a href="http://www.ncl.ucar.edu/Applications/calipso.shtml" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/calipso.shtml</a> under the heading calipso_3.ncl. </font></div><div><font size="2" face="Arial"><br></font></div><div><font size="2" face="Arial">So far, I have not yet been able to construct my plot. Theoretically, I have all the values that I need: Lat/Lon, the total backscatter coefficient, and the altitude value which I extracted from the metadata. I have tried to troubleshoot my script, and examples of errors I received included errors with dimension mismatch between altitude heights and total backscatter coefficient. After I fixed that, it gave new errors complaining about the matched dimensions, etc. </font></div><div><font size="2" face="Arial"><br></font></div><div><font size="2" face="Arial">The first major error occurs at line 101: </font></div><div><font size="2" face="Arial"><br></font></div><div><font size="2" face="Arial">TBC_532&hgt = hgt ; </font></div><div><font size="2" face="Arial"><br></font></div><div><font size="2" face="Arial">Here, TBC_532 is total backscatter coefficient and hgt is my altitude height. Once NCL hits this line, it gives me the following error: </font></div><div><font size="2" face="Arial"><br></font></div><div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><b>fatal:Coordinate variables must be the same dimension as their dimension</b></font></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><b>fatal:No coordinate variable exists for dimension (hgt) in variable (TBC_532)</b></font></span></div></div><div><span style="font-variant-ligatures:no-common-ligatures"><font size="2" face="Arial"><br></font></span></div><div><font size="2" face="Arial">Afterwards, I changed the hgt dimensions to match the total backscatter coefficient dimension size (2 dimensions, 4224 * 399), but that also didn't work. I then collapsed both into a 1D array, but then it didn't allow me to plot either, and gave me the error: </font></div><div><span style="background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><br></font></span></div><div><span style="background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><b>Error: scalar_field: If the input data is 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of the same length.</b></font></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><b>warning:create: Bad HLU id passed to create, ignoring it</b></font></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font size="2" face="Arial" color="#000000"><br></font></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font size="2" face="Arial" color="#000000">If possible, could you give me some advice on how to move forward with my script? </font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font size="2" face="Arial" color="#000000"><br></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font size="2" face="Arial" color="#000000">Thanks ag</font><font style="font-size:13px" face="arial, helvetica, sans-serif" color="#000000">ain,</font></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal"><font face="arial, helvetica, sans-serif" color="#000000">Srishti</font></div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">-- <br><div class="m_-3232921033365901923m_7345571147436828285m_-8736104017920439508gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Srishti Dasarathy<div>Graduate Student</div><div>Scripps Institution of Oceanography</div></div></div></div></font></span></div></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>