id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 7165,NetCDF driver gives wrong dimension values if they are given under a different name,edzer,warmerdam,"See: https://lists.osgeo.org/pipermail/gdal-dev/2017-November/047800.html A NetCDF file with dimension kz does not have a corresponding variable kz but another, sigma(kz) with pressure values. The GDAL NetCDF driver gives wrongly the values of another value (time), and a wrong length value array. Some evidence: gdalinfo NETCDF:""CORDEXRUN_4_RAD.1990010100.nc"":cl | head -170 | tail -7 NETCDF_DIM_EXTRA={time,kz} NETCDF_DIM_kz_DEF={18,6} NETCDF_DIM_kz_VALUES={351390,351396,351402,351408,351414,351420,351426,351432,351438,351444,351450,351456,351462,351468,351474,351480,351486,351492,351498,351504,351510,351516,351522,351528,351534,351540,351546,351552,351558,351564,351570,351576,351582,351588,351594,351600,351606,351612,351618,351624,351630,351636,351642,351648,351654,351660,351666,351672,351678,351684,351690,351696,351702,351708,351714,351720,351726,351732,351738,351744,351750,351756,351762,351768,351774,351780,351786,351792,351798,351804,351810,351816,351822,351828,351834,351840,351846,351852,351858,351864,351870,351876,351882,351888,351894,351900,351906,351912,351918,351924,351930,351936,351942,351948,351954,351960,351966,351972,351978,351984,351990,351996,352002,352008,352014,352020,352026,352032,352038,352044,352050,352056,352062,352068,352074,352080,352086,352092,352098,352104} NETCDF_DIM_time_DEF={120,6} NETCDF_DIM_time_VALUES={351390,351396,351402,351408,351414,351420,351426,351432,351438,351444,351450,351456,351462,351468,351474,351480,351486,351492,351498,351504,351510,351516,351522,351528,351534,351540,351546,351552,351558,351564,351570,351576,351582,351588,351594,351600,351606,351612,351618,351624,351630,351636,351642,351648,351654,351660,351666,351672,351678,351684,351690,351696,351702,351708,351714,351720,351726,351732,351738,351744,351750,351756,351762,351768,351774,351780,351786,351792,351798,351804,351810,351816,351822,351828,351834,351840,351846,351852,351858,351864,351870,351876,351882,351888,351894,351900,351906,351912,351918,351924,351930,351936,351942,351948,351954,351960,351966,351972,351978,351984,351990,351996,352002,352008,352014,352020,352026,352032,352038,352044,352050,352056,352062,352068,352074,352080,352086,352092,352098,352104} time#bounds=time_bnds time#calendar=gregorian and the last band has metainfo: Band 2160 Block=65x1 Type=Float32, ColorInterp=Undefined NoData Value=9.96920996838686905e+36 Unit Type: 1 Metadata: cell_methods=time: point coordinates=xlat xlon grid_mapping=crs long_name=Cloud fractional cover NETCDF_DIM_Kz=351492 NETCDF_DIM_time=352104 NETCDF_VARNAME=cl standard_name=cloud_area_fraction_in_atmosphere_layer units=1 where Kz values should vary between 0 and 1.",defect,closed,normal,2.2.4,default,2.1.2,normal,fixed,,