| 1 |
test for lab_sea forward model linearity |
Test for lab_sea forward model linearity. |
| 2 |
|
|
| 3 |
|
cd MITgcm/verification/lab_sea |
| 4 |
|
mkdir build |
| 5 |
|
cd build |
| 6 |
|
cp ../code/*.h ../code/*.F ../code/packages.conf . |
| 7 |
|
../../../tools/genmake2 |
| 8 |
|
make depend |
| 9 |
|
make |
| 10 |
|
cd ..; mkdir run; cd run; cp ../input/* . |
| 11 |
|
cp ../../../../MITgcm_contrib/lab_sea_test/* . |
| 12 |
|
../build/mitgcmuv >! output.txt & |
| 13 |
|
|
| 14 |
|
cd ..; mkdir run1; cd run1; cp ../input/* . |
| 15 |
|
cp ../../../../MITgcm_contrib/lab_sea_test/* . |
| 16 |
|
mv data.exf tmp |
| 17 |
|
sed s/tair/tair01/ tmp > data.exf |
| 18 |
|
../build/mitgcmuv >! output.txt & |
| 19 |
|
|
| 20 |
|
cd ..; mkdir run2; cd run2; cp ../input/* . |
| 21 |
|
cp ../../../../MITgcm_contrib/lab_sea_test/* . |
| 22 |
|
mv data.exf tmp |
| 23 |
|
sed s/tair/tair02/ tmp > data.exf |
| 24 |
|
../build/mitgcmuv >! output.txt & |
| 25 |
|
|
| 26 |
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 27 |
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 28 |
|
|
| 29 |
|
cd .. |
| 30 |
|
matlab |
| 31 |
|
|
| 32 |
|
clear all, clf reset, pn=''; ne=5; nt=120; |
| 33 |
|
heff=zeros(20,16,nt,ne+1); |
| 34 |
|
area=zeros(20,16,nt,ne+1); |
| 35 |
|
for e=0:ne |
| 36 |
|
for t=1:nt, disp([e t]) |
| 37 |
|
if e==0, fn=[pn 'run/HEFFtave.']; |
| 38 |
|
else fn=[pn 'run' int2str(e) '/HEFFtave.']; end |
| 39 |
|
fn=[fn myint2str(t*240,10) '.data']; |
| 40 |
|
heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); |
| 41 |
|
if e==0, fn=[pn 'run/AREAtave.']; |
| 42 |
|
else fn=[pn 'run' int2str(e) '/AREAtave.']; end |
| 43 |
|
fn=[fn myint2str(t*240,10) '.data']; |
| 44 |
|
area(:,:,t+1,e+1)=readbin(fn,[20 16],1); |
| 45 |
|
end |
| 46 |
|
end |
| 47 |
|
|
| 48 |
|
tmp=squeeze(sum(sum(sum(heff)))); |
| 49 |
|
clf,subplot(211),plot(tmp-mean(tmp)) |
| 50 |
|
grid,title([int2str((t-1)*10) ' days']) |
| 51 |
|
tmp=squeeze(sum(sum(sum(area)))); |
| 52 |
|
subplot(212),plot(tmp-mean(tmp)) |
| 53 |
|
grid,title([int2str((t-1)*10) ' days']) |
| 54 |
|
tmp=squeeze(sum(sum(heff(:,:,:,1)))); |
| 55 |
|
clf,subplot(211),plot(tmp-mean(tmp)) |
| 56 |
|
grid,title([int2str((t-1)*10) ' days']) |
| 57 |
|
tmp=squeeze(sum(sum(area(:,:,:,1)))); |
| 58 |
|
subplot(212),plot(tmp-mean(tmp)) |
| 59 |
|
grid,title([int2str((t-1)*10) ' days']) |
| 60 |
|
|
| 61 |
|
tmp1=squeeze(sum(sum(heff(:,:,:,1)))); |
| 62 |
|
tmp2=squeeze(sum(sum(heff(:,:,:,2)))); |
| 63 |
|
tmp3=squeeze(sum(sum(heff(:,:,:,3)))); |
| 64 |
|
t=1:length(tmp1); t=(t-1)*10 |
| 65 |
|
clf,subplot(211),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
grid,title([int2str((t-1)*10) ' days']) |
| 72 |
|
tmp=squeeze(sum(sum(area(:,:,:,1)))); |
| 73 |
|
subplot(212),plot(tmp-mean(tmp)) |
| 74 |
|
grid,title([int2str((t-1)*10) ' days']) |