pyhdf

lat,lon information from hdf file python

二次信任 提交于 2021-02-08 11:39:57
问题 I have a hdf file and want to extract data from it. For some reason i cant able to extract latitude and longitude values: the code that i tried is : from pyhdf import SD hdf = SD.SD('MOD10C2.A2001033.006.2016092173057.hdf') data = hdf.select('Eight_Day_CMG_Snow_Cover') lat = (hdf.select('Latitude'))[:] it gives me an error: HDF4Error: select: non-existent dataset I tried with: lat = (hdf.select('Lat'))[:] still does not help! data can be found in this link any help will be highly appreciated!

lat,lon information from hdf file python

强颜欢笑 提交于 2021-02-08 11:37:59
问题 I have a hdf file and want to extract data from it. For some reason i cant able to extract latitude and longitude values: the code that i tried is : from pyhdf import SD hdf = SD.SD('MOD10C2.A2001033.006.2016092173057.hdf') data = hdf.select('Eight_Day_CMG_Snow_Cover') lat = (hdf.select('Latitude'))[:] it gives me an error: HDF4Error: select: non-existent dataset I tried with: lat = (hdf.select('Lat'))[:] still does not help! data can be found in this link any help will be highly appreciated!

lat,lon information from hdf file python

六眼飞鱼酱① 提交于 2021-02-08 11:37:48
问题 I have a hdf file and want to extract data from it. For some reason i cant able to extract latitude and longitude values: the code that i tried is : from pyhdf import SD hdf = SD.SD('MOD10C2.A2001033.006.2016092173057.hdf') data = hdf.select('Eight_Day_CMG_Snow_Cover') lat = (hdf.select('Latitude'))[:] it gives me an error: HDF4Error: select: non-existent dataset I tried with: lat = (hdf.select('Lat'))[:] still does not help! data can be found in this link any help will be highly appreciated!

lat,lon information from hdf file python

有些话、适合烂在心里 提交于 2021-02-08 11:37:00
问题 I have a hdf file and want to extract data from it. For some reason i cant able to extract latitude and longitude values: the code that i tried is : from pyhdf import SD hdf = SD.SD('MOD10C2.A2001033.006.2016092173057.hdf') data = hdf.select('Eight_Day_CMG_Snow_Cover') lat = (hdf.select('Latitude'))[:] it gives me an error: HDF4Error: select: non-existent dataset I tried with: lat = (hdf.select('Lat'))[:] still does not help! data can be found in this link any help will be highly appreciated!

could not figure out how to read the metadata

独自空忆成欢 提交于 2019-12-31 05:25:06
问题 I could not figure out how to read the metadata contained in the following HDF file. I could successfully read the datasets and attributes as follows: ftp://ladsweb.nascom.nasa.gov/allData/6/MOD07_L2/2014/126/MOD07_L2.A2014126.0640.006.2014126214544.hdf infile ='MOD07_L2.A2014126.0640.006.2014126214544.hdf' indata = SD(infile, SDC.READ) datasets = indata.datasets() print datasets reqdata = indata.select('Processing_Flag') attributes = reqdata.attributes() print datasets I hope someone can

Read Specific Z Component slice of 3D HDF from Python

跟風遠走 提交于 2019-12-25 06:59:50
问题 Does anyone know how to make the modification of the following code so that I can read the specific z component slice of 3D hdf data in Python? As you can see from the attached image, z value spans from 0 to 160 and I want to plot the '80' only. And the dimension is 400x160x160. Here is my code. import h5handler as h5h h5h.manager.setPath('E:\data\Data5', False) for i in np.arange(0,1,5000): cycleFile = h5h.CycleFile(h5h.manager.cycleFiles['cycle_'+str(i)+'.hdf'], 'r') fig = plt.figure() fig

could not figure out how to read the metadata

我们两清 提交于 2019-12-02 08:27:13
I could not figure out how to read the metadata contained in the following HDF file. I could successfully read the datasets and attributes as follows: ftp://ladsweb.nascom.nasa.gov/allData/6/MOD07_L2/2014/126/MOD07_L2.A2014126.0640.006.2014126214544.hdf infile ='MOD07_L2.A2014126.0640.006.2014126214544.hdf' indata = SD(infile, SDC.READ) datasets = indata.datasets() print datasets reqdata = indata.select('Processing_Flag') attributes = reqdata.attributes() print datasets I hope someone can help me. You can access the metadata, AKA file attributes, in a similar manner to the way you are