<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Times New Roman, Times, serif">Hi everyone!</font></p>
<p><font face="Times New Roman, Times, serif">I have s question regarding the conversion of a multiband file (like GeoTIFF) to NetCDF.
<br>
</font></p>
<p><font face="Times New Roman, Times, serif">First my observations: <br>
</font></p>
<p><font face="Times New Roman, Times, serif">I used gdal_translate to convert a Geotiff to NetCDF:</font></p>
<p><font face="Times New Roman, Times, serif">gdal_translate -of input.tif result.nc<br>
</font></p>
<p><font face="Times New Roman, Times, serif">The gdalinfo result is:</font></p>
<p><font face="Times New Roman, Times, serif"><font color="#000099" size="-1">Driver: netCDF/Network Common Data Format<br>
Files: result.nc<br>
Size is 512, 512<br>
Coordinate System is `'<br>
Metadata:<br>
NC_GLOBAL#Conventions=CF-1.5<br>
NC_GLOBAL#GDAL=GDAL 1.10.0, released 2013/04/24<br>
NC_GLOBAL#GDAL_AREA_OR_POINT=Area<br>
NC_GLOBAL#history=Wed Jul 18 15:33:16 2018: GDAL CreateCopy( result.nc, ... )<br>
Subdatasets:<br>
SUBDATASET_1_NAME=NETCDF:"result.nc":Band1<br>
SUBDATASET_1_DESC=[1500x1650] Band1 (32-bit floating-point)<br>
SUBDATASET_2_NAME=NETCDF:"result.nc":Band2<br>
SUBDATASET_2_DESC=[1500x1650] Band2 (32-bit floating-point)<br>
SUBDATASET_3_NAME=NETCDF:"result.nc":Band3<br>
SUBDATASET_3_DESC=[1500x1650] Band3 (32-bit floating-point)<br>
SUBDATASET_4_NAME=NETCDF:"result.nc":Band4<br>
SUBDATASET_4_DESC=[1500x1650] Band4 (32-bit floating-point)<br>
SUBDATASET_5_NAME=NETCDF:"result.nc":Band5<br>
SUBDATASET_5_DESC=[1500x1650] Band5 (32-bit floating-point)<br>
Corner Coordinates:<br>
Upper Left ( 0.0, 0.0)<br>
Lower Left ( 0.0, 512.0)<br>
Upper Right ( 512.0, 0.0)<br>
Lower Right ( 512.0, 512.0)<br>
Center ( 256.0, 256.0)</font><br>
</font></p>
<p><font face="Times New Roman, Times, serif">As you can see, the different bands are written in different SUBDATASET. I would like the output to be only different bands, not different datasets. I don't think I saw a creation option that could do that...
<br>
</font></p>
<p><font face="Times New Roman, Times, serif"><br>
I would like something like:</font></p>
<p><font face="Times New Roman, Times, serif"><font color="#000099" size="-1">Driver: netCDF/Network Common Data Format<br>
Files: output.nc<br>
Size is 1068, 510<br>
Coordinate System is `'<br>
Origin = (-140.999964377091317,83.499994903744323)<br>
Pixel Size = (0.083333295198278,-0.083333313348017)<br>
Metadata:<br>
lat#axis=Y<br>
lat#long_name=latitude<br>
lat#standard_name=latitude<br>
lat#units=degrees_north<br>
lon#axis=X<br>
lon#long_name=longitude<br>
lon#standard_name=longitude<br>
lon#units=degrees_east<br>
...Some metadata...<br>
Corner Coordinates:<br>
Upper Left (-140.9999644, 83.4999949) <br>
Lower Left (-140.9999644, 41.0000051) <br>
Upper Right ( -52.0000051, 83.4999949) <br>
Lower Right ( -52.0000051, 41.0000051) <br>
Center ( -96.4999847, 62.2500000) <br>
Band 1 Block=1068x1 Type=Float32, ColorInterp=Undefined<br>
Computed Min/Max=-29.841,11.720<br>
NoData Value=-99<br>
Metadata:<br>
long_name=Autumn mean temperature<br>
missing_value=-99<br>
NETCDF_DIM_time=17093376<br>
NETCDF_VARNAME=tm_son<br>
_FillValue=-99<br>
Band 2 Block=1068x1 Type=Float32, ColorInterp=Undefined<br>
Computed Min/Max=-30.198,11.576<br>
NoData Value=-99<br>
Metadata:<br>
long_name=Autumn mean temperature<br>
missing_value=-99<br>
NETCDF_DIM_time=17102136<br>
NETCDF_VARNAME=tm_son<br>
_FillValue=-99<br>
Band 3 Block=1068x1 Type=Float32, ColorInterp=Undefined<br>
Computed Min/Max=-30.479,11.854<br>
NoData Value=-99<br>
Metadata:<br>
long_name=Autumn mean temperature<br>
missing_value=-99<br>
NETCDF_DIM_time=17110920<br>
NETCDF_VARNAME=tm_son<br>
_FillValue=-99</font><br>
<br>
</font></p>
<p><font face="Times New Roman, Times, serif">Is there anything I missed ? Can you think of another way to do that ?</font></p>
<p><font face="Times New Roman, Times, serif">Thanks a lot!</font></p>
<p><font face="Times New Roman, Times, serif">LP<br>
</font></p>
</body>
</html>