Why is Ferret sometimes unable to properly read a netCDF file written in Python?
One way this can happen has to do with how you write out a 3-D array to the netCDF file. Say your array has shape (longitude, latitude, time) and that you want to write it to a netCDF file and later read the file with the graphical visualization tool Ferret. If so, you have to be careful to write out the three dimensions in the correct order; Ferret requires that the time dimension be the first dimension of the netCDF file's data array (in this case time x latitude x longitude).
By the way, sometimes the
ncdump -h command gives the
correct dimensions of the field, but Ferret doesn't. To get around
this make sure you write out the array dimensioned in the order Ferret likes.
Note: Thanks to Helene Brogniez for the tip!