/[MITgcm]/MITgcm_contrib/gael/matlab_class/ecco_v4/cost_altimeter_disp.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/ecco_v4/cost_altimeter_disp.m

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


Revision 1.1 - (hide annotations) (download)
Fri Jul 1 16:07:26 2011 UTC (14 years ago) by gforget
Branch: MAIN
ecco_v4/basic_diags_ecco.m
        make a function of dirModel,lChunk,iChunkm[,reLoadGrid]
        break records loop in chunks, and read nChnunk records at once
        write output to dirModel/mat/sic_diags_ecco_*.mat
        get grid from GRID/ if needed or as specified by reLoadGrid
ecco_v4/basic_diags_ecco_disp.m
        now a function of dirModel,addToTex
        dont reload grid
        m_map_gcmfaces updates
        added write2tex calls
ecco_v4/cost_altimeter.m
        function of dirModel
        added doDifObsOrMod loop
        get grid from GRID/ if needed
        the display part is kept for now, but the it will be
                replaced with new cost_altimeter_disp.m
        include faster cost_altimeter_read
        write output to dirModel/mat/cost_altimeter_*.mat
added functions
        ecco_v4/cost_altimeter_disp.m
        ecco_v4/cost_bp.m
        ecco_v4/cost_sst.m
        ecco_v4/plot_driver.m

1 gforget 1.1 function []=cost_altimeter_disp(dirModel,choicePlot,suf,varargin);
2     %object: compute or plot the various sea level statistics
3     % (std model-obs, model, obs, leading to cost function terms)
4     %inputs: dirModel is the model run directory
5     % doComp is the switch from computation to plot
6    
7     %if doDifObsOrMod==1; suf='modMobs'; elseif doDifObsOrMod==2; suf='obs'; else; suf='mod'; end;
8    
9     if nargin==4; addToTex=varargin{1}; else; addToTex=0; end;
10    
11     %%%%%%%%%%%
12     %load grid:
13     %%%%%%%%%%%
14    
15     dirGrid='GRID/';
16     global mygrid;
17     gcmfaces_path; grid_load(dirGrid,5,'compact');
18     gcmfaces_lines_zonal;
19    
20     %%%%%%%%%%%%%%%
21     %define pathes:
22     %%%%%%%%%%%%%%%
23    
24     dirData='/net/altix3700/raid4/gforget/mysetups/ecco_v4/INPUTS_90x50/';
25     dirOut=[dirModel 'mat/']; if isempty(dir(dirOut)); eval(['mkdir ' dirOut ';']); end;
26     runName=pwd; tmp1=strfind(runName,'/'); runName=runName(tmp1(end)+1:end);
27    
28     %%%%%%%%%%%%%%%%%
29     %do computations:
30     %%%%%%%%%%%%%%%%%
31    
32     eval(['load ' dirOut 'cost_altimeter_' suf '.mat myflds;']);
33    
34     if strcmp(suf,'modMobs'); tit='modeled-observed';
35     elseif strcmp(suf,'obs'); tit='observed';
36     elseif strcmp(suf,'mod'); tit='modeled';
37     else; error('unknown field');
38     end
39    
40     if choicePlot==1; tit=[tit ' rms'];
41     elseif choicePlot==2; tit=[tit ' uncertainty'];
42     else; tit=[tit ' cost'];
43     end;
44    
45     if choicePlot==1;%rms
46    
47     if strcmp(suf,'modMobs');
48     cc=[-0.4:0.05:-0.25 -0.2:0.03:-0.05 -0.03:0.01:0.03 0.05:0.03:0.2 0.25:0.05:0.4];
49     figure; m_map_gcmfaces(100*myflds.dif_mdt,0,{'myCaxis',100*cc}); drawnow;
50     myCaption={tit,'-- mean dynamic topography (cm)'};
51     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
52     end;
53    
54     cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4];
55     figure; m_map_gcmfaces(100*myflds.rms_sladiff_smooth,0,{'myCaxis',100*cc}); drawnow;
56     myCaption={tit,'-- sea level anomaly (cm) -- large space/time scales'};
57     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
58    
59     %figure; m_map_gcmfaces(100*myflds.rms_sladiff_point35d,0,{'myCaxis',100*cc}); drawnow;
60     %myCaption={tit,'-- sea level anomaly (cm) -- large time scales'};
61     %if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
62    
63     figure; m_map_gcmfaces(100*myflds.rms_sladiff_point,0,{'myCaxis',100*cc}); drawnow;
64     myCaption={tit,'-- sea level anomaly (cm) -- pointwise'};
65     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
66    
67     elseif choicePlot==2;%uncertainty fields
68    
69     cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4];
70     figure; m_map_gcmfaces(100*myflds.sig_mdt,0,{'myCaxis',100*cc}); drawnow;
71     myCaption={tit,'-- mean dynamic topography (cm)'};
72     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
73    
74     cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4];
75     figure; m_map_gcmfaces(100*myflds.sig_sladiff_smooth,0,{'myCaxis',100*cc}); drawnow;
76     myCaption={tit,'-- sea level anomaly (cm) -- large space/time scales'};
77     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
78    
79     %figure; m_map_gcmfaces(100*myflds.sig_sladiff_point,0,{'myCaxis',100*cc}); drawnow;
80     %myCaption={tit,'-- sea level anomaly (cm) -- large time scales'};
81     %if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
82    
83     figure; m_map_gcmfaces(100*myflds.sig_sladiff_point,0,{'myCaxis',100*cc}); drawnow;
84     myCaption={tit,'-- sea level anomaly (cm) -- pointwise'};
85     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
86    
87     else;%cost
88    
89     cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4]*100;
90    
91     figure; m_map_gcmfaces(((myflds.dif_mdt.^2)./(myflds.sig_mdt.^2)),0,{'myCaxis',cc}); drawnow;
92     myCaption={tit,'-- mean dynamic topography (cm)'};
93     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
94    
95     figure; m_map_gcmfaces(((myflds.rms_sladiff_smooth.^2)./(myflds.sig_sladiff_smooth.^2)),0,{'myCaxis',cc}); drawnow;
96     myCaption={tit,'-- sea level anomaly (cm) -- large space/time scales'};
97     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
98    
99     %figure; m_map_gcmfaces(((myflds.rms_sladiff_point35d.^2)./(myflds.sig_sladiff_point.^2)),0,{'myCaxis',cc}); drawnow;
100     %myCaption={tit,'-- sea level anomaly (cm) -- large time scales'};
101     %if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
102    
103     figure; m_map_gcmfaces(((myflds.rms_sladiff_point.^2)./(myflds.sig_sladiff_point.^2)),0,{'myCaxis',cc}); drawnow;
104     myCaption={tit,'-- sea level anomaly (cm) -- pointwise'};
105     if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end;
106    
107     end;
108    
109    
110    
111    
112    

  ViewVC Help
Powered by ViewVC 1.1.22