Re: calipso datasets

From: Lin Su <Lin.Su_at_nyahnyahspammersnyahnyah>
Date: Fri, 2 May 2008 10:38:08 -0600 (MDT)

Thanks a lot, Dennis. Through Mary and your reply, I found "ind" is a very
convenient function/tool in NCL. I will try it soon:)

Have a great weekend,
-Lin

---
Lin Su
http://atoc.colorado.edu/~sul/
---- Original message ----
>Date: Fri, 02 May 2008 10:19:46 -0600
>From: Dennis Shea <shea_at_ucar.edu>  
>Subject: Re: calipso datasets  
>To: Lin Su <Lin.Su_at_colorado.edu>
>Cc: list NCL <ncl-talk_at_ucar.edu>
>
>I can not remember the details but you asked about an equivalent to the 
>IDL "find".
>That is the "ind" function in NCL. The difference is thathe "find" can 
>work with
>multidimensional arrays whereas the "ind" requires that the array be 
>one-dimensional.
>Hence, you must use the 'ndtooned' function. [See also, "onedtond", 
>"ind_resolve"]
>
>The "find" is more elegant but you can do much the same in NCL but with 
>more manual work.
>
>As I recall, the HDF arrays were nominally 2D but were of sizes (1,N). 
>You wanted to locate
>vales at particular locations. You could do
>
>            j = ind(lat(0,:).eq.zlat)
>            i = ind(lon(0,:).eq.zlon)
>
>Lin Su wrote:
>> Thanks Dennis:) The calipso team let me try WHERE function, but I'd like to 
use NCL. I just found there is WHERE function in NCL as well. Do you know 
anyone who works on CALIPSO data using NCL?
>>
>> Thank you,
>> -Lin
>> ---
>> Lin Su
>> http://atoc.colorado.edu/~sul/
>>
>> ---- Original message ----
>>   
>>> Date: Thu, 17 Apr 2008 12:41:20 -0600
>>> From: Dennis Shea <shea_at_ucar.edu>  
>>> Subject: Re: calipso datasets  
>>> To: Lin Su <Lin.Su_at_colorado.edu>
>>> Cc: Mary Haley <haley_at_ucar.edu>
>>>
>>> Perhaps the "ind" function is what you want.
>>>
>>>     http://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml
>>>
>>> I do not know IDL so .....
>>> D
>>>
>>> Lin Su wrote:
>>>     
>>>> Hi Dennis,
>>>>
>>>> Thanks for your knidly reply:) The lat&lon in calipso is a function of time, 
so they give me the half orbit data although I just ordered the lat&lon pair 
around (39.98N, 116.36E). Do you think there is a function similar to WHERE(idl) 
to find the lat&lon pair that I need?
>>>>
>>>> Thanks a lot,
>>>> -Lin
>>>> ---
>>>> Lin Su
>>>> http://atoc.colorado.edu/~sul/
>>>>
>>>> ---- Original message ----
>>>>   
>>>>       
>>>>> Date: Wed, 16 Apr 2008 10:18:24 -0600
>>>>> From: Dennis Shea <shea_at_ucar.edu>  
>>>>> Subject: Re: calipso datasets  
>>>>> To: Lin Su <Lin.Su_at_Colorado.EDU>
>>>>> Cc: ncl-talk_at_ucar.edu
>>>>>
>>>>> Lin Su wrote:
>>>>>     
>>>>>         
>>>>>> Dear All,
>>>>>>
>>>>>> Does anyone have any experience to work on the calipso satellite data 
using NCL? I found the software NASA provided is for idl users. 
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> Hiu Lin,
>>>>>
>>>>> It is a standard HDF file. You can always look at *any* supported
>>>>> NCL file [nc, hdf, hdf-eos, grib-1, grib-2] by using ncl_filedump:
>>>>>
>>>>>                      
>>>>> http://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml
>>>>>
>>>>> %> ncl_filedump 
>>>>> CAL_LID_L2_40kmAProCal-Beta-V2-01.2007-04-03T05-00-
44ZD.hdf  |  less
>>>>>
>>>>> filename:       CAL_LID_L2_40kmAProCal-Beta-V2-01.2007-04-
03T05-00-44ZD
>>>>> path:   CAL_LID_L2_40kmAProCal-Beta-V2-01.2007-04-03T05-00-
44ZD.hdf
>>>>>   file global attributes:
>>>>>      coremetadata :
>>>>> GROUP                  = INVENTORYMETADATA
>>>>>  GROUPTYPE            = MASTERGROUP
>>>>>  GROUP                  = GRANULE
>>>>>    OBJECT                 = GRANULEID
>>>>>      NUM_VAL              = 1
>>>>>      VALUE                = "L2_LIDAR"
>>>>>    END_OBJECT             = GRANULEID
>>>>> [SNIP --------------------------------------------------
-------]
>>>>>
>>>>> There are a number of "fakeDim*"  Why?  the HDF creators did not
>>>>> name the dimensions!!   Always explore the data .... this is how to 
>>>>> learn about it.
>>>>> IMHO .... much simpler than IDL.
>>>>>
>>>>> ncl 0> f = addfile 
>>>>> ("CAL_LID_L2_40kmAProCal-Beta-V2-01.2007-04-03T05-00-
44ZD.hdf" , "r")
>>>>> ncl 1> print(f)
>>>>> ncl 2> lstrt = f->Latitude_Start
>>>>> ncl 3> print(lstrt)
>>>>> Variable: lstrt
>>>>> Type: float
>>>>> Total Size: 4 bytes
>>>>>            1 values
>>>>> Number of Dimensions: 2
>>>>> Dimensions and sizes:   [fakeDim0 | 1] x [fakeDim1 | 1]
>>>>> Coordinates:
>>>>> Number Of Attributes: 4
>>>>>  units :       deg
>>>>>  format :      Float_32
>>>>>  valid_range : -90.0...90.0
>>>>>  hdf_name :    Latitude_Start
>>>>> (0,0)   -80.90755
>>>>>                                                     FYI: The 
>>>>> "Latitude_Stop" is -80.7469
>>>>>                                                              The 
>>>>> "Longitude_Start" is -165.3068
>>>>>                                                              The 
>>>>> "Longitude_Stop" is -167.3159
>>>>> --------------------------------
>>>>> ncl 4 > T = f->Temperature
>>>>> ncl 5 > print(T)
>>>>>
>>>>> Variable: T
>>>>> Type: float
>>>>> Total Size: 796 bytes
>>>>>            199 values
>>>>> Number of Dimensions: 2
>>>>> Dimensions and sizes:   [fakeDim20 | 1] x [fakeDim21 | 199]
>>>>> Coordinates:
>>>>> Number Of Attributes: 4
>>>>>  units :       degrees C
>>>>>  format :      Float_32
>>>>>  valid_range : TBD
>>>>>  hdf_name :    Temperature
>>>>> (0,0)   -62.10014
>>>>> (0,1)   -62.15202
>>>>> (0,2)   -62.20389
>>>>> (0,3)   -62.25577
>>>>> [SNIP--------------------------------]
>>>>>     
>>>>>         
>>> -- 
>>> 
=================================================
=====
>>> Dennis J. Shea                  tel: 303-497-1361    |
>>> P.O. Box 3000                   fax: 303-497-1333    |
>>> Climate Analysis Section                             |
>>> Climate & Global Dynamics Div.                       |
>>> National Center for Atmospheric Research             |
>>> Boulder, CO  80307                                   |
>>> USA                        email: shea 'at' ucar.edu |
>>> 
=================================================
=====
>>>
>>>     
>
>
>-- 
>================================================
======
>Dennis J. Shea                  tel: 303-497-1361    |
>P.O. Box 3000                   fax: 303-497-1333    |
>Climate Analysis Section                             |
>Climate & Global Dynamics Div.                       |
>National Center for Atmospheric Research             |
>Boulder, CO  80307                                   |
>USA                        email: shea 'at' ucar.edu |
>================================================
======
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 02 2008 - 10:38:08 MDT

This archive was generated by hypermail 2.2.0 : Mon May 05 2008 - 14:52:49 MDT