[ncl-talk] Plotting CALIPSO 532nm total backscatter coefficient
Dennis Shea
shea at ucar.edu
Wed Sep 12 08:29:17 MDT 2018
re: http://www.ncl.ucar.edu/Applications/calipso.shtml under the heading
*calipso_3.ncl*
Hi Srishti
[1] You 'forgot' to include 'time'
;----------------------------------------------
; 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 at units = "seconds since 1993-01-01 00:00"
tstring = ut_string(time(:,0), "%Y-%N-%D %H:%M:%S")
stride = dimsizes(tstring)/15
[2] *gsn_csm_contour*: Consider some variable: FOO(*dim0*,*dim1*)
When gsn_csm_contour plots the variable, it treats the *dim0* as the
Y-axis and the *dim1 *as the X-axis
The CALIPSO variable
TBC_532 = hdf4_file->Total_Backscatter_Coefficient_532
*printVarSummary*(TBC_532)
has dimensions TBC_532(*dim1*,*dim0*) which are reversed. This is
easily fixed via NCL's dimension reordering. The script renames the
dimensions
plot = *gsn_csm_contour*(wks,TBC_532(*hgt|:,xcoord|:*),res) ;
make 'hgt' the Y-Axis
Attached is a modification. A local CALIPSO file is used so you will have
to make minor changes.
=============
If you are 'new to NCL', please see
http://www.ncl.ucar.edu/Document/Manuals/
Specifically, the NCL User Guide
D
On Tue, Sep 11, 2018 at 1:06 PM, Srishti Dasarathy <srdasara at ucsd.edu>
wrote:
> Dear ncl talk,
>
> 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 http://www.ncl.ucar.edu/Applications/calipso.shtml under the
> heading calipso_3.ncl.
>
> 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.
>
> The first major error occurs at line 101:
>
> TBC_532&hgt = hgt ;
>
> Here, TBC_532 is total backscatter coefficient and hgt is my altitude
> height. Once NCL hits this line, it gives me the following error:
>
> *fatal:Coordinate variables must be the same dimension as their dimension*
> *fatal:No coordinate variable exists for dimension (hgt) in variable
> (TBC_532)*
>
> 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:
>
> *Error: scalar_field: If the input data is 1-dimensional, you must set
> sfXArray and sfYArray to 1-dimensional arrays of the same length.*
> *warning:create: Bad HLU id passed to create, ignoring it*
>
> If possible, could you give me some advice on how to move forward with my
> script?
>
> Thanks again,
> Srishti
>
> --
> Srishti Dasarathy
> Graduate Student
> Scripps Institution of Oceanography
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180912/d01ab9b7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CALIPSO_Backscatter_Test_NCL_Listserv.ncl
Type: application/octet-stream
Size: 7525 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180912/d01ab9b7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CALIPSO_Backscatter_Test_2010-01-30T16-21-48ZD.png
Type: image/png
Size: 137990 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180912/d01ab9b7/attachment.png>
More information about the ncl-talk
mailing list