Re: Reading hdf metadata

From: Mohamed Abdel Kader <m.abdelkader_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 02 2013 - 11:28:48 MST

Wei Huang,
Thanks a lot. Indeed, this helps a lot. Not a problem to work with it for each file.
Thanks a lot for your great help.

On Dec 2, 2013, at 7:53 PM, Wei Huang <huangwei@ucar.edu> wrote:

> Mohamed Abdel Kader,
>
> The LIDAR altitude is in hdf4 Vdata. Unfortunately, NCL can not read Vdata from hdf4 yet.
> You need to do some extra work to retrieve these Vdata and manually put them into NCL.
>
> For example, you may try:
>
> hdp dumpvd CAL_LID_L2_05kmAPro-Prov-V3-01.2009-07-10T14-32-05ZD.hdf_Subset.hdf > vdata
>
> Then edit this Vdata file to get something like:
>
> Product_ID = "L2_LIDAR"
> Date_Time_at_Granule_Start = "2009-07-10T14:50:43.766000Z"
> Date_Time_at_Granule_End = "2009-07-10T14:59:00.668400Z"
> Initial_Subsatellite_Latitude = 0.039497
> Initial_Subsatellite_Longitude = -15.592452
> Final_Subsatellite_Latitude = 30.027323
> Final_Subsatellite_Longitude = -22.398491
> Lidar_Data_Altitudes = (/29.796324, 29.616693, 29.437065, 29.257437, 29.077806, \
> 28.898178, 28.718550, 28.538919, 28.359291, 28.179663, \
> 28.000032, 27.820404, 27.640776, 27.461147, 27.281517, \
> 27.101889, 26.922260, 26.742630, 26.563002, 26.383373, \
> 26.203743, 26.024115, 25.844486, 25.664856, 25.485228, \
> 25.305599, 25.125969, 24.946341, 24.766712, 24.587084, \
> 24.407454, 24.227825, 24.048197, 23.868567, 23.688938, \
> 23.509310, 23.329679, 23.150051, 22.970423, 22.790792, \
> 22.611164, 22.431536, 22.251907, 22.072277, 21.892649, \
> 21.713020, 21.533390, 21.353762, 21.174133, 20.994503, \
> 20.814875, 20.635246, 20.455616, 20.275988, 20.156235, \
> 20.096359, 20.036482, 19.976606, 19.916729, 19.856853, \
> 19.796978, 19.737101, 19.677225, 19.617348, 19.557472, \
> 19.497595, 19.437719, 19.377844, 19.317966, 19.258091, \
> 19.198214, 19.138338, 19.078461, 19.018585, 18.958708, \
> 18.898832, 18.838957, 18.779079, 18.719204, 18.659327, \
> 18.599451, 18.539574, 18.479698, 18.419823, 18.359945, \
> 18.300070, 18.240192, 18.180317, 18.120440, 18.060564, \
> 18.000687, 17.940811, 17.880936, 17.821058, 17.761183, \
> 17.701305, 17.641430, 17.581553, 17.521677, 17.461802, \
> 17.401924, 17.342049, 17.282171, 17.222296, 17.162418, \
> 17.102543, 17.042667, 16.982790, 16.922915, 16.863037, \
> 16.803162, 16.743284, 16.683409, 16.623531, 16.563656, \
> 16.503780, 16.443903, 16.384027, 16.324150, 16.264275, \
> 16.204397, 16.144522, 16.084646, 16.024769, 15.964892, \
> 15.905016, 15.845140, 15.785264, 15.725388, 15.665511, \
> 15.605635, 15.545758, 15.485882, 15.426005, 15.366130, \
> 15.306253, 15.246377, 15.186501, 15.126624, 15.066748, \
> 15.006871, 14.946995, 14.887119, 14.827243, 14.767366, \
> 14.707490, 14.647614, 14.587737, 14.527861, 14.467984, \
> 14.408109, 14.348232, 14.288356, 14.228479, 14.168603, \
> 14.108727, 14.048850, 13.988974, 13.929098, 13.869222, \
> 13.809345, 13.749469, 13.689592, 13.629716, 13.569839, \
> 13.509963, 13.450088, 13.390211, 13.330335, 13.270458, \
> 13.210582, 13.150705, 13.090829, 13.030952, 12.971077, \
> 12.911201, 12.851324, 12.791448, 12.731571, 12.671695, \
> 12.611818, 12.551942, 12.492066, 12.432190, 12.372313, \
> 12.312437, 12.252561, 12.192684, 12.132808, 12.072931, \
> 12.013056, 11.953179, 11.893303, 11.833426, 11.773550, \
> 11.713674, 11.653797, 11.593921, 11.534045, 11.474169, \
> 11.414292, 11.354416, 11.294539, 11.234663, 11.174787, \
> 11.114911, 11.055035, 10.995158, 10.935282, 10.875405, \
> 10.815529, 10.755652, 10.695776, 10.635900, 10.576024, \
> 10.516148, 10.456271, 10.396395, 10.336518, 10.276642, \
> 10.216765, 10.156890, 10.097013, 10.037137, 9.977261, \
> 9.917384, 9.857508, 9.797631, 9.737755, 9.677879, \
> 9.618003, 9.558126, 9.498250, 9.438374, 9.378497, \
> 9.318621, 9.258744, 9.198869, 9.138992, 9.079116, \
> 9.019239, 8.959363, 8.899487, 8.839610, 8.779734, \
> 8.719858, 8.659982, 8.600105, 8.540229, 8.480352, \
> 8.420476, 8.360600, 8.300723, 8.240848, 8.180971, \
> 8.121095, 8.061218, 8.001342, 7.941465, 7.881589, \
> 7.821712, 7.761837, 7.701961, 7.642084, 7.582208, \
> 7.522331, 7.462455, 7.402578, 7.342702, 7.282826, \
> 7.222950, 7.163074, 7.103197, 7.043321, 6.983444, \
> 6.923568, 6.863692, 6.803816, 6.743939, 6.684063, \
> 6.624187, 6.564310, 6.504434, 6.444557, 6.384681, \
> 6.324805, 6.264929, 6.205052, 6.145176, 6.085299, \
> 6.025423, 5.965547, 5.905671, 5.845795, 5.785918, \
> 5.726042, 5.666165, 5.606289, 5.546412, 5.486536, \
> 5.426660, 5.366784, 5.306908, 5.247031, 5.187155, \
> 5.127278, 5.067402, 5.007525, 4.947649, 4.887774, \
> 4.827897, 4.768021, 4.708144, 4.648268, 4.588391, \
> 4.528515, 4.468639, 4.408763, 4.348886, 4.289010, \
> 4.229134, 4.169257, 4.109381, 4.049504, 3.989628, \
> 3.929752, 3.869876, 3.809999, 3.750123, 3.690247, \
> 3.630370, 3.570494, 3.510618, 3.450742, 3.390865, \
> 3.330989, 3.271112, 3.211236, 3.151360, 3.091484, \
> 3.031607, 2.971731, 2.911855, 2.851978, 2.792102, \
> 2.732226, 2.672349, 2.612473, 2.552597, 2.492720, \
> 2.432844, 2.372968, 2.313091, 2.253215, 2.193339, \
> 2.133462, 2.073586, 2.013710, 1.953833, 1.893957, \
> 1.834081, 1.774204, 1.714328, 1.654452, 1.594576, \
> 1.534699, 1.474823, 1.414947, 1.355070, 1.295194, \
> 1.235318, 1.175441, 1.115565, 1.055689, 0.995812, \
> 0.935936, 0.876060, 0.816183, 0.756307, 0.696431, \
> 0.636554, 0.576678, 0.516802, 0.456925, 0.397049, \
> 0.337173, 0.277296, 0.217420, 0.157544, 0.097667, \
> 0.037791, -0.022085, -0.081961, -0.141838, -0.201714, \
> -0.261590, -0.321467, -0.381343, -0.441219/)
>
> And you have to work on these for every hdd file.
>
> Please let us know if these help.
>
> Wei
>
> huangwei@ucar.edu
> VETS/CISL
> National Center for Atmospheric Research
> P.O. Box 3000 (1850 Table Mesa Dr.)
> Boulder, CO 80307-3000 USA
> (303) 497-8924
>
>
>
>
>
>
> On Nov 28, 2013, at 10:53 AM, Mohamed Abdel Kader <m.abdelkader@cyi.ac.cy> wrote:
>
>> Dear Dr. Shea,
>> Thanks a lot for your support.
>> I am sorry for not being precise.
>>
>> Sure, I have made many trials
>> 1. The file formate is hdf4. (CALIPSO L2 AProv V3.01 file).
>> 2. ncl_filedump gives the variables and the global attributes of the file but not the metadata.
>> 3. When I open the file using ncl script I and print(fid) gives the same out as ncl_filedump.
>> 4. I tried to change the file extension since sometimes it matters
>> referring to http://www.ncl.ucar.edu/Applications/HDF.shtml
>>
>> To be more specific, the meta data contains an array of altitudes of the LIDAR. I opened the file using hdfview and I check the meta.
>> If you need more information just let me know.
>>
>> Thanks a lot
>>
>>
>>
>>
>>
>> On Nov 28, 2013, at 5:28 PM, Dennis Shea <shea@ucar.edu> wrote:
>>
>>> This question is rather vague (non-specific).
>>> ALso, is the file hdf4, hdf4-eos, hdf5, hdf5-eos ???
>>>
>>> Have you done any exploration of NCL's many examples?
>>> Look under 'Datasets' at:
>>> http://www.ncl.ucar.edu/Applications/
>>>
>>> Have you tried
>>> http://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml
>>>
>>> %> ncl_filedump foo.{hdf,hdfeos,h5,he5}
>>>
>>> ===
>>> http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml
>>>
>>> f = addfile("foo.{hdf,hdfeos,h5,he5}, "r")
>>> print(f)
>>>
>>> ===================================================
>>> Please note: we do expect NCL users to expend some effort
>>> to learn the language. If you are new to NCL, please
>>> read the Mini-Language Manual at
>>> http://www.ncl.ucar.edu/Document/Manuals/
>>>
>>> On 11/28/13 3:08 AM, Mohamed Abdel Kader wrote:
>>>> Hello everybody,
>>>> I would like to read an hdd file meta data
>>>> Thanks a lot
>>>>
>>>> Best Regards
>>>> Mohamed M. Abdel Kader
>>>> Atmosphere and Climate Modelling Group
>>>> Research Assistant/PhD Candidate
>>>> Environmental & Atmospheric Sciences
>>>> The Cyprus Institute, Cyprus
>>>> 20 Constantinou Kavafi Street
>>>> P.O. Box: 27456
>>>> Nicosia 2121, Cyprus
>>>> Tel. +357 222 08679
>>>> Fax. +357 222 08625
>>>> Mobile: +357 992 62108
>>>> e-mails: m.abdelkader@cyi.ac.cy
>>>> mmkader@gmail.com
>>>> Skype: mmkader
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>
>> Best Regards
>> Mohamed M. Abdel Kader
>> Atmosphere and Climate Modelling Group
>> Research Assistant/PhD Candidate
>> Environmental & Atmospheric Sciences
>> The Cyprus Institute, Cyprus
>> 20 Constantinou Kavafi Street
>> P.O. Box: 27456
>> Nicosia 2121, Cyprus
>> Tel. +357 222 08679
>> Fax. +357 222 08625
>> Mobile: +357 992 62108
>> e-mails: m.abdelkader@cyi.ac.cy
>> mmkader@gmail.com
>> Skype: mmkader
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

Best Regards
Mohamed M. Abdel Kader
Atmosphere and Climate Modelling Group
Research Assistant/PhD Candidate
Environmental & Atmospheric Sciences
The Cyprus Institute, Cyprus
20 Constantinou Kavafi Street
P.O. Box: 27456
Nicosia 2121, Cyprus
Tel. +357 222 08679
Fax. +357 222 08625
Mobile: +357 992 62108
e-mails: m.abdelkader@cyi.ac.cy
mmkader@gmail.com
Skype: mmkader

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 2 11:31:28 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST