/[MITgcm]/MITgcm_contrib/gael/matlab_class/sample_analysis/example_IO.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/sample_analysis/example_IO.m

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


Revision 1.3 - (show annotations) (download)
Tue Apr 11 16:26:53 2017 UTC (8 years, 3 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint66f, checkpoint66o, HEAD
Changes since 1.2: +9 -8 lines
- example_IO.m: update directions to only use release2 for demo
- example_transports.m: compute bolus velocity contribution from M_PsiX,GM_PsiY via calc_bolus
- example_transports_disp.m: update overturn plot title accordingly

1 function []=example_IO();
2 %
3 % EXAMPLE_IO computes and displays a standard deviation field
4 %
5 % stand-alone call:
6 % addpath gcmfaces/sample_analysis/; example_IO;
7 %
8 % needed input files:
9 % mkdir release2
10 % wget --recursive ftp://mit.ecco-group.org/ecco_for_las/version_4/release2/nctiles_climatology/ETAN
11 % mv mit.ecco-group.org/ecco_for_las/version_4/release2/nctiles_climatology release2_climatology/.
12
13 gcmfaces_global;
14
15 input_list_check('example_IO',nargin);
16
17 %expected location:
18 myenv.nctilesdir=fullfile(pwd,'/release2_climatology/nctiles_climatology/ETAN/');
19 %if ETAN is not found then try old locations:
20 if ~isdir(myenv.nctilesdir);
21 %if not found then try old location:
22 tmpdir=fullfile(pwd,'/release2_climatology/nctiles_climatology/ETAN/');
23 if isdir(tmpdir); myenv.nctilesdir=tmpdir; end;
24 end;
25 %if ETAN is still not found then issue warning and skip example_IO
26 if ~isdir(myenv.nctilesdir);
27 help example_IO;
28 warning('example_IO requires release2_climatology/nctiles_climatology/ETAN that was not found ---> abort!');
29 return;
30 end;
31
32 %%%%%%%%%%%%%%%%%
33 %load grid:
34 %%%%%%%%%%%%%%%%%
35
36 if isempty(mygrid);
37 grid_load;
38 end;
39
40 %%%%%%%%%%%
41 %get field:
42 %%%%%%%%%%%
43 fld=read_nctiles([myenv.nctilesdir 'ETAN'],'ETAN');
44 fld=std(fld,[],3); fld(find(fld==0))=NaN;
45 cc=[0:0.1:1]*0.10;
46
47 %%%%%%%%%%%%
48 %plot field:
49 %%%%%%%%%%%%
50 if ~myenv.lessplot;
51 figureL; gcmfaces_sphere(fld,cc,[],[],1);
52 end;
53
54

  ViewVC Help
Powered by ViewVC 1.1.22