Hi Ryo,
Thank you for your reply just now I ran the code again and saved the NetCDF files and they are looking good without the error. I do not understand was it due to the ferret crashing problem or related to saving the NetCDF but it is solved now. And interestingly after generating the NetCDF file from ferret which shows the error works fine if I extract the variable and save it using CDO. So anyone facing such a problem can do either of these steps
(1) Close ferret and the related linux terminals and relaunch ferret
OR if the problem still persists
(2) Use CDO, extract the variable using "selvar" and save it into NetCDF (cdo -r -f nc4 selvar,variable_name
input.nc output.nc)
Cheers, Saurabh