<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-fareast-language:EN-US;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="PT" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Even, sorry to keep bothering you with this but found no docs on this.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The CreateCopy() solution created me a file with the coordinates system info stored in the “transverse_mercator” attribute (why?)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Metadata:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Band1#grid_mapping=transverse_mercator<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Band1#long_name=GDAL Band Number 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Band1#_FillValue=65535<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#Conventions=CF-1.5<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#GDAL=GDAL 3.4.0dev, released 2021/99/99<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#history=Thu Oct 14 20:59:24 2021: GDAL CreateCopy( gd_cube.nc, ... )<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_EXTRA={time}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time_DEF={7,6}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time_VALUES={1,2,3,4,5,6,7}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> time#axis=t<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#false_easting=500000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#false_northing=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#GeoTransform=481845 30 0 4287765 0 -30<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#grid_mapping_name=transverse_mercator<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#inverse_flattening=298.257223563<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#latitude_of_projection_origin=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#longitude_of_central_meridian=-9<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#longitude_of_prime_meridian=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#long_name=CRS definition<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#scale_factor_at_central_meridian=0.9996<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#semi_major_axis=6378137<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> transverse_mercator#spatial_ref=PROJCS["unknown",GEOGCS["unknown",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The problem is that either GMT and Mirone look for that info in global attribute called “grid_mapping” as in<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Metadata:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> grid_mapping#spatial_ref=PROJCS["unknown",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> GEOGCS["unknown",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> DATUM["Unknown based on WGS84 ellipsoid",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> SPHEROID["WGS 84",6378137,298.257223563,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How can I control the name of the attribute where the CRS is tored so I can find it from other programs?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Also, is there a way of setting the “actual_range” and “_Fillvalue” data attributes?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Joaquim<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:PT">From:</span></b><span lang="EN-US" style="mso-fareast-language:PT"> Joaquim Manuel Freire Luís <jluis@ualg.pt>
<br>
<b>Sent:</b> Thursday, October 14, 2021 9:03 PM<br>
<b>To:</b> Joaquim Manuel Freire Luís <jluis@ualg.pt>; Even Rouault <even.rouault@spatialys.com>; gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> RE: [gdal-dev] Writing multi-bands vs multi-datasets<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">On more. The warning about “No 1D variable is indexed by dimension time” turned out to be because I was calling<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gdal.setmetadataitem(ds, "NETCDF_DIM_EXTRA", “{time}”)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">(like you call ‘{time,Z}’ in your Python example). Removing the curly braces here made that warning go away.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:PT">From:</span></b><span lang="EN-US" style="mso-fareast-language:PT"> gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org">gdal-dev-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Joaquim Manuel Freire Luís<br>
<b>Sent:</b> Thursday, October 14, 2021 8:42 PM<br>
<b>To:</b> Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [gdal-dev] Writing multi-bands vs multi-datasets<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Much better (I was confused by those curly braces thinking it was part of python syntax).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Though still get this warning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Warning 1: No 1D variable is indexed by dimension time<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But otherwise gdalinfo does not complain on anything wrong<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The “-co” is confusing. I had to add in other situations otherwise some options were not set.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Julia does not use bindings, it can access the exported functions in shared libraries directly<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">(if you are curious see <a href="https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/">
https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">and <a href="https://docs.julialang.org/en/v1/base/c/#ccall">
https://docs.julialang.org/en/v1/base/c/#ccall</a>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">so passing that vector of strings should be translated automatically to a “char *string[]” and GDAL expects the “-co” (I think)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:PT">From:</span></b><span lang="EN-US" style="mso-fareast-language:PT"> Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>>
<br>
<b>Sent:</b> Thursday, October 14, 2021 8:14 PM<br>
<b>To:</b> Joaquim Manuel Freire Luís <<a href="mailto:jluis@ualg.pt">jluis@ualg.pt</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [gdal-dev] Writing multi-bands vs multi-datasets<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><o:p> </o:p></p>
<div>
<p class="MsoNormal">Le 14/10/2021 à 21:03, Joaquim Manuel Freire Luís a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Even,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">There are some issues with this way.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">My draft Julia function looks like bellow (tested with a MxNx7 array) but get this errors</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">julia> GMT.write_multiband(cube, "gd_cube.nc")</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Warning 1: No 1D variable is indexed by dimension time</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Warning 6: creation option '-co' is not formatted with the key=value format</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Warning 6: creation option '-co' is not formatted with the key=value format</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Warning 6: creation option '-co' is not formatted with the key=value format</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="mso-fareast-language:PT">I don't know the Julia bindings, but the error message seems to suggest you can remove the "-co" element in your options[] array since it presumably must only contain the
"key=value" creation options, like in the Python bindings<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">ERROR 1: netcdf error #-45 : NetCDF: Not a valid data type or _FillValue type mismatch .</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">at (C:\programs\compa_libs\gdal_GIT\gdal\frmts\netcdf\netcdfdataset.cpp,netCDFDataset::CreateCopy,9012)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">ERROR 1: netcdf error #-49 : NetCDF: Variable not found .</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">at (C:\programs\compa_libs\gdal_GIT\gdal\frmts\netcdf\netcdfdataset.cpp,NCDFPutAttr,10454)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Warning 1: No 1D variable is indexed by dimension time</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">And indeed the “time” variable shows up filled with 7 zeros when I open the nc file that is nevertheless created.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Also checked with getmetadataitem(ds, "NETCDF_DIM_time_VALUES") that the "1,2,3,4,5,6,7" info was correctly set.</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="mso-fareast-language:PT">You need to surround the values of the _DEF and _VALUES items with { and } braces to indicate this is a list (this is the particular syntax expected by the netCDF driver)<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’s also strange the warnings about the “-co” options also because they were in fact taken into account. Omitting them creates a classic nc file.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">function write_multiband(cube, fname::AbstractString, v=nothing; dim_name::String="time")</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> nbands = size(cube,3)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> ds = gmt2gd(cube)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span>Gdal.setmetadataitem(ds, "NETCDF_DIM_EXTRA", dim_name)<o:p></o:p></p>
<p class="MsoNormal"> Gdal.setmetadataitem(ds, "NETCDF_DIM_" * dim_name * "_DEF", "$(nbands),6")<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Gdal.setmetadataitem(ds, "NETCDF_DIM_" * dim_name * "_VALUES", "1,2,3,4,5,6,7")</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Gdal.setmetadataitem(ds, dim_name * "#axis", string(dim_name[1]))</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> crs = Gdal.getproj(cube, wkt=true)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> (crs != "" ) && Gdal.setproj!(ds, crs)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Gdal.unsafe_copy(ds, filename=fname, driver=getdriver("netCDF"), options=["-co", "FORMAT=NC4", "-co", "COMPRESS=DEFLATE", "-co", "ZLEVEL=4"])</span><o:p></o:p></p>
<p class="MsoNormal">end<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:PT">From:</span></b><span lang="EN-US" style="mso-fareast-language:PT"> Even Rouault
<a href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a> <br>
<b>Sent:</b> Sunday, October 10, 2021 10:48 PM<br>
<b>To:</b> Joaquim Manuel Freire Luís <a href="mailto:jluis@ualg.pt"><jluis@ualg.pt></a>;
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [gdal-dev] Writing multi-bands vs multi-datasets</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p>Joaquim,<o:p></o:p></p>
<p><a href="https://github.com/OSGeo/gdal/pull/4634">https://github.com/OSGeo/gdal/pull/4634</a> should hopefully help<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 10/10/2021 à 22:26, Joaquim Manuel Freire Luís a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I have a Julia version of gdal_translate (that ends up calling GDALDatasetRasterIOEx) that works in saving a MxNxP array, but not the way I wanted.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">It creates a multi-subdatasets file, whilst what I wished is to write a multi-band file.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">For example, the file written with this Julia function looks like below</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">How can I write a multi-band instead of a multi-datasets?
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’ve been looking at the docs of GDALDatasetRasterIOEx but can’t see any way of picking one or the other.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Joaquim</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">gdalinfo cube_rad.nc</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Driver: netCDF/Network Common Data Format</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Files: cube_rad.nc</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Size is 512, 512</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Metadata:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#Conventions=CF-1.5</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#GDAL=GDAL 3.4.0dev, released 2021/99/99</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#history=Sun Oct 10 13:01:06 2021: GDAL CreateCopy( cube_rad.nc, ... )</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Subdatasets:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> SUBDATASET_1_NAME=NETCDF:"cube_rad.nc":Band1</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> SUBDATASET_1_DESC=[1567x1519] Band1 (32-bit floating-point)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> SUBDATASET_2_NAME=NETCDF:"cube_rad.nc":Band2</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> SUBDATASET_2_DESC=[1567x1519] Band2 (32-bit floating-point)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">…</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Saving the same data (or similar) from a Matlab code that I wrote long ago to stack grids, shows</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">gdalinfo evi_cube.nc</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Driver: netCDF/Network Common Data Format</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Files: evi_cube.nc</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Size is 37, 59</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Origin = (580140.000000000000000,4418550.000000000000000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Pixel Size = (30.000000000000000,-30.000000000000000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Metadata:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">…</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> latitude#actual_range={4416795,4418535}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> latitude#long_name=latitude</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> latitude#units=degrees_north</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> longitude#actual_range={580155,581235}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> longitude#long_name=longitude</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> longitude#units=degrees_east</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#Conventions=COARDS</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#description=File written from Matlab</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#node_offset=0</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#Source_Software=Mirone</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NC_GLOBAL#title=Grid created by Mirone</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_EXTRA={time}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time_DEF={67,6}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time_VALUES={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> z#actual_range={-856.4703369140625,176.8457641601562}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> z#long_name=z</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> z#units=unknown</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> z#_FillValue=-nan(ind)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Corner Coordinates:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Upper Left ( 580140.000, 4418550.000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Lower Left ( 580140.000, 4416780.000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Upper Right ( 581250.000, 4418550.000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Lower Right ( 581250.000, 4416780.000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Center ( 580695.000, 4417665.000)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Band 1 Block=37x59 Type=Float32, ColorInterp=Undefined</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NoData Value=nan</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Unit Type: unknown</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Metadata:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> actual_range={-856.4703369140625,176.8457641601562}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> long_name=z</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time=1</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_VARNAME=z</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> units=unknown</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> _FillValue=-nan(ind)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Band 2 Block=37x59 Type=Float32, ColorInterp=Undefined</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NoData Value=nan</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Unit Type: unknown</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> Metadata:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> actual_range={-856.4703369140625,176.8457641601562}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> long_name=z</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_DIM_time=2</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> NETCDF_VARNAME=z</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> units=unknown</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> _FillValue=-nan(ind)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">…</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>