NetCDF files are a common format for distributing Earth Observation data and allow the ability to store a number of variables alongside metadata. However, using netCDF files in a GIS is not always as easy as it could be.
The NERC Earth Observation Data Acquisition and Analysis Service (NEODAAS) routinely produce products such as Chlorophyll from EO data and store as netCDF files. For the UK they use a Mercator projection within a netCDF file storing the latitude and longitude of each pixel within separate arrays. Unfortunately QGIS and ArcMap are often unable to read this information so don’t read data into the correct location making it difficult to use with other datasets.
To read data into the correct location I wrote a script which converts the latitude and longitude values in the netCDF file into tie points and then uses these to warp a GeoTiff into the correct location. It exports a single variable at a time.
To use for creating a GeoTiff from Chlorophyll data:
python reproject_neodaas_netcdf.py \ sentinel3a_olci_all_products_L3 median_uk_7d_20180720_20180726.nc \ sentinel3a_olci_all_products_L3-median_uk_7d_20180720_20180726_chl.tif \ --variable CHL_OC4ME
The script is below. It requires the GDAL and netCDF Python libraries.
Note although the files should line up with other datasets you are warping the data which may introduce some errors. For best results, if you have a research project funded by NERC or are eligible for a NERC research grant or training award you can contact NEODAAS to discuss specific processing requirements.