"171" IDL read HDF file

Source: Internet
Author: User

; +;:D    Escription:; Describe the procedure.; Author:dyq 2009-7-19;;; -pro TEST_READHDF compile_opt idl2 file = File_dirname (Routine_filepath (' TEST_READHDF ')) + $ ' \data\mod04_l2.  A2004196.0140.005.2007023163311.HDF ';  ISHDF = HDF_ISHDF (file) IF ishdf EQ 0 then RETURN;  ; Call IDL's own function to obtain information of current HDF data;  Hdf_info,file; If we need to do a geo-corrective operation, we need to obtain the original data, and the latitude data grid, data acquisition two ways, through the SD information in the name index to judge, such as latitude data representation latitude; open hdfsd file; sd_id = Hdf_sd_start (file,/read) hdf_sd_fileinfo,sd_id,nmfsds,attr for i=0,nmfsds-1 do BEGIN Sds_id=hdf_sd_sele CT (sd_id,i); the name of the data set in the dataset hdf_sd_getinfo,sds_id,name=n,ndims=r,type=t,natts=nats,$ hdf_type=h,unit=u IF n EQ ' L  Atitude ' then BEGIN hdf_sd_getdata,sds_id,latdata break ENDIF endfor; custom read; Calculate the index of Latitude in SD Latindex = Hdf_sd_nametoindex (sd_id, ' Latitude '); Gets the ID of the index where Result = Hdf_sd_select (sd_id, Latindex); Read data Hdf_sd_getdata, result, templatdata; see if the read results are consistent help,array_equal (latdata,templatdata) END;;

"171" IDL read HDF file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.