35 |
tim_prof=(profIn.prof_date-tmp2); |
tim_prof=(profIn.prof_date-tmp2); |
36 |
tim_prof(tim_prof>365)=365; |
tim_prof(tim_prof>365)=365; |
37 |
tim_prof=tim_prof/365*12;%neglecting differences in months length |
tim_prof=tim_prof/365*12;%neglecting differences in months length |
38 |
elseif strcmp(fldIn.tim,'const'); |
elseif strcmp(fldIn.tim,'const')|strcmp(fldIn.tim,'std'); |
39 |
tim_fld=[1 2]; rec_fld=[1 2]; |
tim_fld=[1 2]; rec_fld=[1 1]; |
40 |
tim_prof=1.5*ones(profIn.np,1); |
tim_prof=1.5*ones(profIn.np,1); |
41 |
else; |
else; |
42 |
error('this case remains to be implemented'); |
error('this case remains to be implemented'); |
55 |
% |
% |
56 |
ii=find(tim_prof>=tim_fld(tt)&tim_prof<tim_fld(tt+1)); |
ii=find(tim_prof>=tim_fld(tt)&tim_prof<tim_fld(tt+1)); |
57 |
if ~isempty(ii); |
if ~isempty(ii); |
58 |
arr=gcmfaces_interp(fld,lon(ii),lat(ii),'polygons'); |
arr=gcmfaces_interp(fld,lon(ii),lat(ii),method); |
59 |
arr2=gcmfaces_interp_1d(2,depIn,arr,depOut); |
arr2=gcmfaces_interp_1d(2,depIn,arr,depOut); |
60 |
|
if strcmp(fldIn.tim,'std'); |
61 |
|
arr2=arr2.*randn(size(arr2)); |
62 |
|
end; |
63 |
end; |
end; |
64 |
% |
% |
65 |
k0=floor(tim_prof(ii)); k1=k0+1; |
k0=floor(tim_prof(ii)); k1=k0+1; |