/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_misc/convertR8toR4.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/gcmfaces_misc/convertR8toR4.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Jun 23 19:02:47 2011 UTC (14 years ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65x, checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, HEAD
Changes since 1.1: +2 -0 lines
gcmfaces_misc	added headers to all routines
				added depthStretch.m and depthStretchPlot.m
				> removed myverticaldeform.m, verticalplot.m
				and runmean_cycle.m
				rewritten runmean.m
				> removed nanrunmean.m, nanrunmean_cycle.m and runmean_cycle.m
gcmfaces_legacy	added nanrunmean.m, nanrunmean_cycle.m, runmean_cycle.m
				myverticaldeform.m, verticalplot.m
plot_one_field	added example of depthStretchPlot
basic_diags_display_transport	added header

1 function []=convertR8toR4(fileIn,fileOut);
2 %object: read R8 fileIn, write R4 fileOut
3 %inputs: fileIn and fileOut
4
5 tmp1=dir(fileIn);
6 tmp1=tmp1.bytes/8;
7 fid=fopen(fileIn,'r','b'); tmp2=fread(fid,tmp1,'float64'); fclose(fid);
8 fid=fopen(fileOut,'w','b'); fwrite(fid,tmp2,'float32'); fclose(fid);
9
10

  ViewVC Help
Powered by ViewVC 1.1.22