/[MITgcm]/MITgcm_contrib/gael/comm/course-idma2016/matlab/idma_resample.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/comm/course-idma2016/matlab/idma_resample.m

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


Revision 1.2 - (show annotations) (download)
Mon Feb 1 17:56:51 2016 UTC (9 years, 5 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +16 -6 lines
- if release1/nctiles/THETA/ is vailable then resample it too.
- remove call to idma_float_plot; update help section accordingly.

1 function [profIn]=idma_resample(profIn);
2 %
3 % IDMA_RESAMPLE subsamples ECCO temperature fields to observed locations and times
4 %
5 % Example:
6 % [p]=idma_float_plot('4900828');
7 % grid_load;
8 % p=idma_resample(p);
9
10 p = genpath('gcmfaces/'); addpath(p);%TBE
11 p = genpath('MITprof/'); addpath(p);%TBE
12 p = genpath('matlab/'); addpath(p);%TBE
13
14 fil='release1/nctiles_climatology/THETA';
15 fld=read_nctiles([fil '/THETA'],'THETA');
16 THETA=mean(fld,4);
17 THETAfil=fil;
18
19 fldIn.tim='const';
20 fldIn.fil=THETAfil;
21 fldIn.name='prof_THETAconst';
22 fldIn.fld=THETA;
23 profIn=MITprof_resample(profIn,fldIn);
24
25 fldIn.tim='monclim';
26 fldIn.fil=THETAfil;
27 fldIn.name='prof_THETAclim';
28 fldIn.fld=[];
29 profIn=MITprof_resample(profIn,fldIn);
30
31 if isdir('release1/nctiles/THETA/');
32 fldIn.tim='monser';
33 fldIn.fil='release1/nctiles/THETA';
34 fldIn.name='prof_THETA';
35 fldIn.fld=[];
36 profIn=MITprof_resample(profIn,fldIn);
37 end;
38

  ViewVC Help
Powered by ViewVC 1.1.22