We have come upon this unpleasant rename/tempfilename problem too long.
It is time to fix it. The problem is related to netcdf using a different
location to create a temporary file. It thinks this temporary area is in
the same filesystem as the desired output file. The simplistic fix is
to catch the rename error and fall back on a copy and delete. A better
fix is to more accurately determine the appropriate directory for a
temporary file. This latter problem is a bit messy and less easy to
generalize for each platform. The simplistic first part of the fix
should be put in now.