/[MITgcm]/MITgcm/verification/1D_ocean_ice_column/matlab_scripts/analyze_adjoint_run_general.m
ViewVC logotype

Contents of /MITgcm/verification/1D_ocean_ice_column/matlab_scripts/analyze_adjoint_run_general.m

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


Revision 1.2 - (show annotations) (download)
Wed Jan 23 17:10:52 2013 UTC (11 years, 3 months ago) by ifenty
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint64n, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, 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, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint65, checkpoint64j, checkpoint64m, checkpoint64l, HEAD
Changes since 1.1: +95 -0 lines
added a readme on how to run a 11,000 time step simulation in the 1D_ocean_ice_column along with some matlab scripts and two sample figures.  It is understood that one doesn't put these kinds of files a verification directory but one doesn't have much of a choice when one is asked not to use contrib. so... there it is

1 clear all;%close all;
2
3 addpath(pwd)
4 cdir = pwd;
5
6 % the directory with adjoint output
7 addir = '/net/ross/raid1/ifenty/MITgcm_20130115/MITgcm/verification/1D_ocean_ice_column/temp/mnc_test_0001/'
8
9 % how many vertical cells out output
10 dep_ind = 5;
11
12 % the experiment name
13 exp_name = 'temp'
14
15 % boolean for writing the figure to a png file
16 do_print = 1 ;
17
18 % cd([dirRoot rdir '/' addir])
19 cd(addir)
20
21 add = dir('adstate*');
22 ads = dir('adseaice*');
23 ade = dir('adexf*');
24
25 adseaice = nc_getall(ads(1).name);
26 adstate = nc_getall(add(1).name);
27 adexf = nc_getall(ade(1).name);
28
29 T = adseaice.T.data;
30 adheff = permute(adseaice.adheff.data,[ 3 2 1]);
31 adarea = permute(adseaice.adarea.data,[ 3 2 1]);
32
33 adqnet = permute(adstate.adQnet.data,[3 2 1]);
34 adatemp = permute(adexf.adatemp.data,[3 2 1]);
35 advwind = permute(adexf.advwind.data,[3 2 1]);
36 adswdown = permute(adexf.adswdown.data,[3 2 1]);
37 adT = permute(adstate.adT.data,[4 3 2 1 ]);
38 adS = permute(adstate.adS.data,[4 3 2 1 ]);
39
40 ipt=1;if(size(adheff,1)==5);ipt=3;end;
41
42 figure(2);clf;
43
44 subplot(423); hold on;
45 plot(T,squeeze(adarea(ipt,ipt,:)));grid;title('adarea');
46 tenPercentAboveBelowLeftRight;
47 nn = find(isnan(squeeze(adarea(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
48
49 subplot(424); hold on;
50 plot(T,squeeze(adheff(ipt,ipt,:)));axis tight;grid;title('adheff')
51 tenPercentAboveBelowLeftRight;
52 nn = find(isnan(squeeze(adheff(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
53
54 subplot(425); hold on;
55 plot(T,squeeze(adqnet(ipt,ipt,:)));axis tight;grid;title('adqnet');
56 tenPercentAboveBelowLeftRight;
57 nn = find(isnan(squeeze(adqnet(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
58
59 subplot(426); hold on;
60 plot(T,squeeze(advwind(ipt,ipt,:)));axis tight;grid;title('advwind');
61 tenPercentAboveBelowLeftRight;
62 nn = find(isnan(squeeze(advwind(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
63
64 subplot(421); hold on;
65 plot(T,squeeze(adT(ipt,ipt,1:dep_ind,:))');axis tight;grid;title('adT')
66 tenPercentAboveBelowLeftRight;
67 nn = find(isnan(squeeze(adT(ipt,ipt,1,:)))); plot(T(nn),T(nn).*0,'rx')
68 h=legend('l1','l2','l3', 'l4','Location','SouthWest');
69 set(h,'FontSize',6)
70
71 subplot(422); hold on;
72 plot(T,squeeze(adS(ipt,ipt,1:dep_ind,:))');axis tight;grid;title('adS')
73 tenPercentAboveBelowLeftRight;
74
75 subplot(427); hold on;
76 plot(T,squeeze(adatemp(ipt,ipt,:)));axis tight;grid;title('adatemp');
77 tenPercentAboveBelowLeftRight;
78 nn = find(isnan(squeeze(adatemp(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
79
80 subplot(428); hold on;
81 plot(T,squeeze(adswdown(ipt,ipt,:)));axis tight;grid;title('adswdown');
82 tenPercentAboveBelowLeftRight;
83 nn = find(isnan(squeeze(adswdown(ipt,ipt,:)))); plot(T(nn),T(nn).*0,'rx')
84
85 % cd(cdir)
86
87 set(gcf,'Position',[350 120 600 1000])
88
89 if (do_print)
90 set(gcf,'PaperPosition',[0 0 8 12])
91 print('-dpng','-r100',['AdjointAnalysis_' exp_name])
92 ['printing ' exp_name]
93 end
94
95 %cd(cdir)

  ViewVC Help
Powered by ViewVC 1.1.22