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