<div dir="ltr">Hi Lara,<br><br>On Wed, Jun 19, 2019 at 7:06 PM Lara DC <<a href="mailto:dellaceca.lara@gmail.com">dellaceca.lara@gmail.com</a>> wrote:<br>><br>> Hello!<br>><br>> I am just starting to use GRASS. <br>> I am trying to import a new Modis product about atmospheric aerosols.<br><div>> I need to import hdf files, which have 13 bands (I am interested in band 1).</div><div><br></div><div>this hdf has 13 subdatasets, not 13 bands:</div><div>gdalinfo  MCD19A2.A2018302.h19v05.006.2018311184807.hdf</div><div>...</div><div>Subdatasets:<br>  SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:Optical_Depth_047<br>  SUBDATASET_1_DESC=[4x1200x1200] Optical_Depth_047 grid1km (16-bit integer)<br>  SUBDATASET_2_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:Optical_Depth_055<br>  SUBDATASET_2_DESC=[4x1200x1200] Optical_Depth_055 grid1km (16-bit integer)<br>  SUBDATASET_3_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:AOD_Uncertainty<br>  SUBDATASET_3_DESC=[4x1200x1200] AOD_Uncertainty grid1km (16-bit integer)<br>  SUBDATASET_4_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:FineModeFraction<br>  SUBDATASET_4_DESC=[4x1200x1200] FineModeFraction grid1km (16-bit integer)<br>  SUBDATASET_5_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:Column_WV<br>  SUBDATASET_5_DESC=[4x1200x1200] Column_WV grid1km (16-bit integer)<br>  SUBDATASET_6_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:AOD_QA<br>  SUBDATASET_6_DESC=[4x1200x1200] AOD_QA grid1km (16-bit unsigned integer)<br>  SUBDATASET_7_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:AOD_MODEL<br>  SUBDATASET_7_DESC=[4x1200x1200] AOD_MODEL grid1km (8-bit unsigned integer)<br>  SUBDATASET_8_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:Injection_Height<br>  SUBDATASET_8_DESC=[4x1200x1200] Injection_Height grid1km (32-bit floating-point)<br>  SUBDATASET_9_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid5km:cosSZA<br>  SUBDATASET_9_DESC=[4x240x240] cosSZA grid5km (16-bit integer)<br>  SUBDATASET_10_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid5km:cosVZA<br>  SUBDATASET_10_DESC=[4x240x240] cosVZA grid5km (16-bit integer)<br>  SUBDATASET_11_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid5km:RelAZ<br>  SUBDATASET_11_DESC=[4x240x240] RelAZ grid5km (16-bit integer)<br>  SUBDATASET_12_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid5km:Scattering_Angle<br>  SUBDATASET_12_DESC=[4x240x240] Scattering_Angle grid5km (16-bit integer)<br>  SUBDATASET_13_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid5km:Glint_Angle<br>  SUBDATASET_13_DESC=[4x240x240] Glint_Angle grid5km (16-bit integer)</div><div><br></div>> My problem is that each band has 3 dimensions (x-y-z : 1200x1200x4)<br>> The z dimension corresponds to the orbit (Aqua or Terra, 2 daily overpass each). I would like to work with them separately.<br><div><br></div><div>each subdataset has 4 bands (Aqua or Terra, 2 daily overpass each), e.g. for the first subdataset<br></div><div>gdalinfo HDF4_EOS:EOS_GRID:"MCD19A2.A2018302.h19v05.006.2018311184807.hdf":grid1km:Optical_Depth_047</div><div>...</div><div>Band 1 Block=1200x833 Type=Int16, ColorInterp=Gray<br>  Description = AOD at 0.47 micron<br>  NoData Value=-28672<br>  Offset: 0,   Scale:0.001<br>Band 2 Block=1200x833 Type=Int16, ColorInterp=Gray<br>  Description = AOD at 0.47 micron<br>  NoData Value=-28672<br>  Offset: 0,   Scale:0.001<br>Band 3 Block=1200x833 Type=Int16, ColorInterp=Gray<br>  Description = AOD at 0.47 micron<br>  NoData Value=-28672<br>  Offset: 0,   Scale:0.001<br>Band 4 Block=1200x833 Type=Int16, ColorInterp=Gray<br>  Description = AOD at 0.47 micron<br>  NoData Value=-28672<br>  Offset: 0,   Scale:0.001</div><div><br></div><div>> When I try to open the file using r.in.gdal I get an error 'The band does not exist' (I guess the problem is the 3rd dimension...)</div><div><br></div><div>for r.in.gdal, you need to use the subdataset as input</div><div><br></div><div>HTH,</div><div><br></div><div>Markus M<br></div><div><br></div></div>