= NetCDF Improvements = This page is for information regarding improvements to the GDAL NetCDF driver. For information on the current NetCDF driver, please consult: * [wiki:NetCDF] - GDAL NetCDF wiki entry. * http://www.gdal.org/frmt_netcdf.html - format docs. = Topics = == UNIDATA NetCDF Conventions == UNIDATA recommends the use of the CF Conventions (NetCDF Climate and Forecast (CF) Metadata Conventions) where applicable.[[BR]] It is intended that this driver fully support the CF-1.5 Conventions for import and export and COARDS for import. Provisions should be taken for back-wards compatibility with different CF-1.x versions. * [http://www.unidata.ucar.edu/software/netcdf/docs/conventions.html NetCDF Conventions at UNIDATA] * [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/cf-conventions.html CF-1.5 - NetCDF Climate and Forecast (CF) Metadata Conventions] * [http://ferret.wrc.noaa.gov/noaa_coop/coop_cdf_profile.html COARDS conventions (1995 standard that CF Conventions extends and generalizes)] * [http://cf-pcmdi.llnl.gov/conformance/compliance-checker/ CF compliance checker] [http://pypi.python.org/pypi/cfchecker/2.0.2 (python script)] - don't use to validate grid structure === Issues with the current implementation === * NetCDF created by GDAL not CF-1.0 compliant for geographical grids (issue #2129) - patch submitted * netcdf driver does not read and write CF-1.0 coordinate system properly for projected CRS (issue #2893) * support for read and write of projected coordinate values * export std_parallel variables into a single standard_parallel netcdf attribute * support packed data (with add_offset and scale_factor) properly - I don't see where they are used, must be tested == Metadata == GDAL and NetCDF support metadata in different ways, which should be harmonised. === Issues with the current implementation === * The import process does not use the Conventions attribute and does not consider different possible Conventions (COARDS, CF-1.0, CF-1.5, etc.) === Issues for which a patch has been submitted === * Duplication in Metadata when translating from NetCDF to NetCDF (issue #4204) * metadata from a NetCDF variable should be stored inside the GDAL Band metadata, instead of a global metadata item (issue #4211) * NetCDF variable name is lost when imported into GDAL (issue #4211) * Floating-point metadata in netcdf file is converted to GDAL metadata as string without sufficient precision (issue #4211) == Datum issues == CF supports Datum information but does not specify how datum ids (such as those found in EPSG codes) should be stored in the netcdf file * Which datum should be set when there is no datum information at all in a netcdf file? WGS84 or none? * How to export datum information that is present in a GDAL file, in a way that it can be restored later? * Import should correctly set appropriate CRS/datum information (e.g. WGS84) from the information in the netcdf file, when sufficient information is available. == Dimension issues == The driver should handle properly a time and Z-axis in a way that they they are not lost when importing and exporting. == I/O issues == * Support Create() method so that gdalwarp can be used on a netcdf file - #4221 * Fix access to different netcdf file types: nc (classic), nc2 (64-bit) and nc4 (NetCDF4 with HDF5 support) - #3890 and #2379 - patch submitted * Add option for file type (nc,nc2,nc4) at export * Support compressed netcdf data (szip, zip) and CF-1 packed data == Compatibility with other software == The driver should be compatible for import and/or export (with proper visualisation) with at least the following software: * ncdump from UNIDATA netcdf * [http://cf-pcmdi.llnl.gov/conformance/compliance-checker/ CF compliance checker] * [http://meteora.ucsd.edu/~pierce/ncview_home_page.html ncview] * [http://www.iges.org/grads GrADS] - Grid Analysis and Display System * [https://code.zmaw.de/projects/cdo CDO] - Climate Data Operator * [http://nco.sourceforge.net NCO] - netCDF Operators * others to come... == Test files == A place should be set up to store NetCDF sample files, provided they are free under the terms of http://download.osgeo.org/gdal/data/COPYING . [[BR]] Large files will be available at http://download.osgeo.org/gdal/data/netcdf .[[BR]] Having small (typically < or ~ 10 KB ) sample files is also good so they can be directly included in SVN under the autotest/gdrivers/data directory and thus easily used by regression tests. == Contribution == * Contributors are welcome and could be identified here in 3 categories: Ideas/reporting, testing, and/or development. * Discussions can take place here or the mailing list with the title "NetCDF Improvements" * Tickets can be used to track the implementation of specific items and bugfixes. * Backward compatibility issues, in particular with respect to files produced by older GDAL versions, might require voting, as in http://trac.osgeo.org/gdal/wiki/rfc1_pmc details = Discussion = I (etiennesky) have created this wiki entry after a discussion in the gdal-dev mailing list (Subject: discussion on improvements to the NetCDF driver and CF-1 convention). Even made a number of suggestions which I have followed (I also shamelessly copied some of his wording). [[BR]] I encourage interested parties in participating in this discussion here and in the mailing list. In particular, it would be useful to collect information on contributors and obtain test files with issues and the expected outcome. Simple files can also be included in order to test for regression issues in the future. Regards, etiennesky - Aug. 28 [[BR]] = Open Tickets = [[TicketQuery(status=new|assigned|reopened&keywords~=netcdf|netCDF|NETCDF|NetCDF&order=priority)]]