JGCRI/tethys

netCDF outputs are badly formatted

Closed this issue · 0 comments

Here is the header for one of the netCDF output files:

WE27755% ncdump -h twddom.nc 
netcdf twddom {
dimensions:
	index = 67420 ;
	month = 72 ;
variables:
	float data(index, month) ;
		data :units = "km3/month" ;
		data :description = "Downscaled Results: 67420 rows, 72 columns (months)" ;
	int ID(index) ;
	float lon(index) ;
	float lat(index) ;
	int ilon(index) ;
	int ilat(index) ;
	int mapindex(index) ;
	int months(month) ;
}

I suppose that this is technically correct, but it's not all that useful. What we should be writing out is a georeferenced array with dimensions of lat, lon, time (with NaN values in the ocean grid cells). I don't particularly object to including the flattened array, but most people using netCDF are going to want to use those netCDF files with tools that are expecting results in geographical coordinates.