<div dir="ltr"><div><div>For a given dataset, all bands have to be of same dimensions in order to be treated as a single dataset, and not a number of different datasets. </div><div><br></div><div>This is documented in the GDAL data model page, right on top [1].</div>
<div><br></div><div>"<span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px">A dataset (represented by the </span><a class="" href="http://www.gdal.org/classGDALDataset.html" title="A set of associated raster bands, usually from one file." style="color:rgb(70,101,162);font-weight:bold;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px">GDALDataset</a><span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px"> class) is an assembly of related raster bands and some information common to them all. In particular the dataset has a concept of the raster size (in pixels and lines) that applies to all the bands. The dataset is also responsible for the georeferencing transform and coordinate system definition of all bands.</span>"</div>
<div><br></div><div>[1] <a href="http://www.gdal.org/gdal_datamodel.html">http://www.gdal.org/gdal_datamodel.html</a><br></div></div><div><br></div><div><br></div>I'm sorry but I don't understand what you mean by "In the creation of a NetCDF I treat subsets as bands.". <div>
<br></div><div>Is this file <a href="http://myfile.nc">myfile.nc</a> created by gdal? If the above explanation is not satisfactory, please provide the exact steps you are doing. </div><div><br></div><div><br></div><div>cheers, Etienne</div>
<div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 6, 2014 at 1:05 PM, Benedetta Onori <span dir="ltr"><<a href="mailto:benedetta.onori@gmail.com" target="_blank">benedetta.onori@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>In the creation of a NetCDF I treat subsets as bands.<br></div>with gdalinfo I get this:<br><br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">Subdatasets:<br>  SUBDATASET_1_NAME=NETCDF:"myfile.nc":Band1<br>
  SUBDATASET_1_DESC=[10000x1] Band1 (64-bit floating-point)<br>  SUBDATASET_2_NAME=NETCDF:"myfile.nc":Band2<br>  SUBDATASET_2_DESC=[10000x1] Band2 (64-bit floating-point)<br>  SUBDATASET_3_NAME=NETCDF:"myfile.nc":Band3<br>

  SUBDATASET_3_DESC=[10000x1] Band3 (64-bit floating-point)<br>  SUBDATASET_4_NAME=NETCDF:"myfile.nc":Band4<br>  SUBDATASET_4_DESC=[10000x1] Band4 (64-bit floating-point)<br></a><br></div>So it <span lang="en"><span>recognizes bands as netcdf subsets, but with Create( ) only one size for all bands is possible and not different sizes for different bands-subsets.<br>

</span></span><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-06 Etienne Tourigny <span dir="ltr"><<a href="mailto:etourigny.dev@gmail.com" target="_blank">etourigny.dev@gmail.com</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>What do you mean by subsets?  Do you mean datasets (known as variables in netcdf terminology)? If so, there is no way the netcdf driver can create a netcdf file with subdatasets, sorry.<br>

</div><div><br>
</div><div>A workaround is to use gdal to create a file for each subdataset and then merge them with the nco commandline tools (e.g. ncks -A <a href="http://file1.nc" target="_blank">file1.nc</a> <a href="http://file2.nc" target="_blank">file2.nc</a>).</div>


<div><br></div><div>cheers, Etienne</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Feb 6, 2014 at 10:22 AM, Benedetta Onori <span dir="ltr"><<a href="mailto:benedetta.onori@gmail.com" target="_blank">benedetta.onori@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Hi all, <br>I have a question about NetCDF writing using GDAL.<br>

</div>The netcdf driver doesn't support the option GA_Update used to edit dataset, but only GA_ReadOnly.<br>
</div>My question is: during the creation of a new netCDF dataset, how can I <span>differentiate the sizes of different subsets?</span><span><br>
</span></div><div><span>(For example the subset 1 must be 100x100, subset 2 100x1, ...etc...)<br>Thank you for the attention<br><br></span></div><div><span>Regards<span><font color="#888888"><br><br></font></span></span></div>


<span><font color="#888888"><div><span>b.o.</span><span></span></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div></div>
</blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>