Hi, Marston!
You can also try our HDF4 to NetCDF (CF) converter [1].
I tested the uploaded file and it could convert it to NetCDF with a
single command like below:
% ./h4tonccf 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf
Done with writing netcdf file
2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.nc.
The software is still in beta so please let us know if you have any
issue with it.
We'll fix it in the next release.
Hope this helps!
[1] http://hdfeos.org/software/h4cflib/bin/
-- HDF: Software that Powers Science On Tue, Jul 23, 2013 at 9:13 AM, Dennis Shea <shea@ucar.edu> wrote: > THX for ftping the file > > The conversion works fine with the most recent version of NCL (6.1.2). > Please download that version. > > === > > %> ncl_convert2nc 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > > Further, > > %> ncl_filedump 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > > yields the fact that this is an HDF-EOS file. > > Variable: f > Type: file > filename: 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02 > path: 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > file global attributes: > HDFEOSVersion : HDFEOS_V2.5 <*********************** NOTE > StructMetadata_0 : GROUP=SwathStructure > > [SNIP-----SNIP] > > granule_number : 3607 > ID_SITE : Cooperative Institute for Research in the Atmosphere > ID_CENTER : CloudSat Data Processing Center > ID_CENTER_URL : http://cloudsat.cira.colostate.edu > ID_MACHINE : SKINKO > ID_CREATED : Wed Jul 18 09:25:40 2007 > algorithm_version : 5.3 > product_version : 011 > start_time : 20070101005141 > end_time : 20070101023034 > dimensions: > nray_2B_GEOPROF = 37081 > nbin_2B_GEOPROF = 125 > variables: > short Height ( nray_2B_GEOPROF, nbin_2B_GEOPROF ) > _FillValue : -9999 > factor : 1 > offset : 0 > long_name : Height of range bin in Reflectivity/Cloud Mask > above reference surface (~ mean sea level). > units : m > valid_range : ( -5000, 30000 ) > missing : -9999 > missop : == > hdf_name : Height > > byte CPR_Cloud_mask ( nray_2B_GEOPROF, nbin_2B_GEOPROF ) > _FillValue : -99 > factor : 1 > offset : 0 > long_name : CPR Cloud Mask > valid_range : ( 0, 40 ) > missing : -9 > missop : == > hdf_name : CPR_Cloud_mask > > > short Gaseous_Attenuation ( nray_2B_GEOPROF, nbin_2B_GEOPROF ) > _FillValue : 15360 > factor : 100 > offset : 0 > long_name : Gaseous_Attenuation > units : dBZe > valid_range : ( 0, 1000 ) > missing : -9999 > missop : == > hdf_name : Gaseous_Attenuation > > short Radar_Reflectivity ( nray_2B_GEOPROF, nbin_2B_GEOPROF ) > _FillValue : 15360 > factor : 100 > offset : 0 > long_name : Radar Reflectivity Factor > units : dBZe > valid_range : ( -4000, 5000 ) > missing : -8888 > missop : == > hdf_name : Radar_Reflectivity > > =================================================== > > Unfortunately, this means that you will likely need to read > the file twice. Once with the hdf extension and a 2nd time with > the .hdfeos extension to get all the informtion (eg, latitudes and > longitudes > > fhdf = addfile("2007001005141...hdf","r") > feos = addfile("2007001005141...hdf.hdfeos","r") > > Then access the data as required. > > === > > After you download 6.1.2, try > > %> ncl_filedump > 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf.hdfeos > > you will note different look includin the lat/lon arrays. > > [snip] > float Longitude_2B_GEOPROF ( nray_2B_GEOPROF ) > long_name : longitude > units : degrees_east > hdfeos_name : Longitude > > float Latitude_2B_GEOPROF ( nray_2B_GEOPROF ) > long_name : latitude > units : degrees_north > hdfeos_name : Latitude > > > > On 7/23/13 8:14 AM, Dennis Shea wrote: >> [1] ncl_convert2nc should work. PLease ftp the file so it >> can be examined. >> >> ftp ftp.cgd.ucar.edu >> anonymous >> email >> cd incoming >> put 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf >> quit >> >> [2] There is no functuon >> p = f(geometric_height) >> >> [a] If you have the appropriate information (z0, p0) and >> geopotential height is useful, use the hydrostatic equation >> >> p = p0*exp(-g*(z-z0)/(R*T)) >> >> where z0 and p0 are the reference levels. >> This could be done via array notation. >> >> [b] >> http://www.ncl.ucar.edu/Document/Functions/Built-in/stdatmus_z2tdp.shtml >> >> could also be used. >> >> On 7/23/13 7:53 AM, Marston Johnston wrote: >>> Hi, >>> >>> I'm trying to use NCL to bin CloudSat granules from 2007 and 2008. I'll be >>> using the bin_sum function and modifying the example given in >>> >>> http://www.ncl.ucar.edu/Applications/Scripts/cloudsat_1.ncl. >>> I have a few things I'd like to ask: >>> >>> 1.) I tried to convert the HDF files to netcdf, since I work mostly with >>> netcdf files, but ncl_convert2nc failed to convert the files. I'm using NCL >>> version 6.1.0. According to >>> http://www.ncl.ucar.edu/Document/Tools/ncl_convert2nc.shtml, this function >>> should be able to convert CloudSat files. The error I got is: >>> >>> ********* >>> ncl_convert2nc 2007001005141_03607_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf >>> fatal:syntax error: line 1 before or near 2007001005141 >>> ncl_convert2nc 2007001005141 >>> ---------------------------^ >>> >>> fatal:error in statement >>> ********* >>> >>> Ok, I can use ncl to read the hdd 4 data instead of converting first and >>> this should be ok. But I'm curious as to why the conversion failed. Did I >>> misunderstand the docs for NCL? >>> >>> 2.) The data is expressed on geometric height and I would like to express >>> it on pressure levels instead. The temperature with in each profile is >>> available in the granules. Can NCL do this? I did a quick search in the >>> function list but to no avail. >>> >>> Appreciate the help, >>> /M >>> >>> >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> List instructions, subscriber options, unsubscribe: >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk >>> >> _______________________________________________ >> ncl-talk mailing list >> List instructions, subscriber options, unsubscribe: >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk >> > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Jul 23 20:48:29 2013
This archive was generated by hypermail 2.1.8 : Thu Jul 25 2013 - 21:02:42 MDT