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

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_misc/check_loop.m

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


Revision 1.1 - (hide annotations) (download)
Wed Feb 4 19:04:59 2015 UTC (10 years, 5 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65t
- check_budg.m : output precision measures
- check_loop.m (new) : loop over check_budg.m

1 gforget 1.1
2     dirIn='nctiles_budg/budgMo/'
3    
4     for tt=1:238;
5     tt
6     budgIn.tend=read_nctiles([dirIn 'tend/tend'],'tend',tt);
7     budgIn.trU=read_nctiles([dirIn 'trU/trU'],'trU',tt);
8     budgIn.trV=read_nctiles([dirIn 'trV/trV'],'trV',tt);
9     if dirIn(end-1)=='o';
10     budgIn.trW=read_nctiles([dirIn 'trW/trW'],'trW',tt);
11     %
12     budgIn.trWtop=budgIn.trW;
13     budgIn.trWbot=budgIn.trW(:,:,2:50);
14     budgIn.trWbot(:,:,50)=0;
15     %
16     %budgIn.tend(isnan(tend))=0;
17     %budgIn.trU(isnan(trU))=0; budgIn.trV(isnan(trV))=0;
18     %budgIn.trWtop(isnan(trWtop))=0; budgIn.trWbot(isnan(trWbot))=0;
19     else;
20     budgIn.trWtop=read_nctiles([dirIn 'trWtop/trWtop'],'trWtop',tt);
21     budgIn.trWbot=read_nctiles([dirIn 'trWbot/trWbot'],'trWbot',tt);
22     end;
23     %
24     nr=size(budgIn.tend{1},3);
25     for kk=1:nr; prec(kk,:)=check_budg(budgIn,kk); end;
26     if 0;
27     figureL;
28     plot(log10(prec(:,1)),'b');
29     hold on;
30     plot(log10(prec(:,2)),'r');
31     plot(log10(prec(:,3)),'k');
32     title(num2str(tt));
33     end;%if 0;
34     if tt==1;
35     store_prec=prec;
36     else;
37     store_prec(:,:,tt)=prec;
38     end;
39     end;%for tt=[1 119 238];
40    
41     max(store_prec(:))
42     eval(['save ' dirIn 'residuals.mat store_prec;']);
43    

  ViewVC Help
Powered by ViewVC 1.1.22