/[MITgcm]/MITgcm/verification/seaice_obcs/input/compare_lab_sea.m
ViewVC logotype

Contents of /MITgcm/verification/seaice_obcs/input/compare_lab_sea.m

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


Revision 1.2 - (show annotations) (download)
Wed Dec 19 02:44:21 2012 UTC (11 years, 5 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.1: +4 -3 lines
disabling SEAICE_GROWTH_LEGACY for verification/seaice_obcs

1 % Compare MITgcm/verification/seaice_obcs
2 % results to ../lab_sea/input.salt_plume
3
4 % preamble
5 %cd MITgcm/verification/seaice_obcs/input
6 nx=20; ny=16; nz=18; nt=10; ix=8:17; iy=4:11;
7 p1='../../lab_sea/tr_run.salt_plume/';
8 p2='../run/';
9
10 % compare U/V/T/S
11 for f={'T','S','U','V'}
12 J=0;
13 fn=[p1 f{1} '.' myint2str(nt,10) '.data'];
14 tmp=readbin(fn,[nx ny nz]); tmp1=tmp(ix,iy,:);
15 fn=[p2 f{1} '.' myint2str(nt,10) '.data'];
16 tmp2=readbin(fn,[length(ix) length(iy) nz]);
17 for k=1:nz
18 clf, subplot(311), mypcolor(tmp1(:,:,k)'); thincolorbar
19 title(['lab sea ' f{1} ', level ' int2str(k)]);
20 subplot(312), mypcolor(tmp2(:,:,k)'); thincolorbar
21 title(['seaice obcs ' f{1} ', level ' int2str(k)]);
22 tmp3=tmp2(:,:,k)-tmp1(:,:,k);
23 subplot(313), mypcolor(tmp3'); thincolorbar
24 title('difference'), pause(.2)
25 J=J+sum(sum(tmp3(2:(end-1),2:(end-1)).^2));
26 end
27 disp([f{1} ': ' num2str(J)])
28 end
29
30 % compare sea ice
31 for f={'UICE','VICE','AREA','HSNOW','HSALT','HEFF'}
32 J=0;
33 for t=0:nt
34 fn=[p1 f{1} '.' myint2str(t,10) '.data'];
35 tmp=readbin(fn,[nx ny]); tmp1=tmp(ix,iy,:);
36 fn=[p2 f{1} '.' myint2str(t,10) '.data'];
37 tmp2=readbin(fn,[length(ix) length(iy)]);
38 clf, subplot(311), mypcolor(tmp1'); cx=caxis; thincolorbar
39 title(['lab sea ' f{1} ', time step ' int2str(t)]);
40 subplot(312), mypcolor(tmp2'); caxis(cx), thincolorbar
41 title(['seaice obcs ' f{1} ', time step ' int2str(t)]);
42 tmp3=tmp2-tmp1;
43 subplot(313), mypcolor(tmp3'); thincolorbar
44 title('difference'), pause(.2)
45 J=J+sum(sum(tmp3(2:(end-1),2:(end-1)).^2));
46 end
47 disp([f{1} ': ' num2str(J)])
48 end

  ViewVC Help
Powered by ViewVC 1.1.22