Warning, /verification/natl_box/input/mk_std_forc.m is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit b33fd832 on 2006-10-25 16:03:56 UTC
b33fd832c4 Jean*0001
0002 nx=20; ny=16; nit=62;
0003
0004 nrc=nx*ny*nit;
0005 %- check size:
0006 !ls -l kf_fu kf_fv
0007 fprintf('expected size to read : %i\n',nrc*4)
0008
0009 %- read wind stress
0010 namF='kf_fu'; fprintf([' read file: ',namF,' ...']);
0011 fid=fopen(namF,'r','b'); tx=fread(fid,nrc,'real*4'); fclose(fid);
0012 % tx=rdda(namF,[nx ny nit],1,'real*4','b');
0013 fprintf(' done\n');
0014
0015 namF='kf_fv'; fprintf([' read file: ',namF,' ...']);
0016 fid=fopen(namF,'r','b'); ty=fread(fid,nrc,'real*4'); fclose(fid);
0017 %ty=rdda(namF,[nx ny nit],1,'real*4','b');
0018 fprintf(' done\n');
0019
0020 %- from "usual" old convention to MITgcm sign convention: flux > 0 is upward
0021 % reverse sign of tx,ty
0022 tx=-tx;
0023 ty=-ty;
0024
0025 namF='kf_tx'; fprintf([' write tx to file: ',namF,' ...']);
0026 fid=fopen(namF,'w','b'); fwrite(fid,tx,'real*4'); fclose(fid);
0027 fprintf(' done\n');
0028
0029 namF='kf_ty'; fprintf([' write ty to file: ',namF,' ...']);
0030 fid=fopen(namF,'w','b'); fwrite(fid,ty,'real*4'); fclose(fid);
0031 fprintf(' done\n');
0032