1. matlab write in grads in this format : fid=fopen('compSSTa-Jn_Myap.bin','wb'); a=fwrite(fid,mh,'float32'); a=fwrite(fid,mp,'float32'); fclose(fid); and mh(i,j) == When loading from the data library : usually y is reversed for : u and v psst runs.