Fix writing order of dimensions in netCDF maps writing