1 |
% |
% |
2 |
% [ALPHA,LON,LAT,DPT] = compute_alpha(SNAPSHOT) |
% [ALPHA] = compute_alpha(SNAPSHOT) |
3 |
% |
% |
4 |
% This function computes the thermal expansion coefficient from |
% This function computes the thermal expansion coefficient from |
5 |
% files of potential temperature THETA and salinity anomaly |
% files of potential temperature THETA and salinity anomaly |
132 |
nc{ncid}(:,:,:) = ALPHA; |
nc{ncid}(:,:,:) = ALPHA; |
133 |
|
|
134 |
nc=close(nc); |
nc=close(nc); |
135 |
|
close(ncS); |
136 |
|
close(ncT); |
137 |
|
|
138 |
% Output: |
% Output: |
139 |
|
output = struct('ALPHA',ALPHA,'dpt',Tdpt,'lat',Tlat,'lon',Tlon); |
140 |
switch nargout |
switch nargout |
141 |
case 1 |
case 1 |
142 |
varargout(1) = ALPHA; |
varargout(1) = {output}; |
|
case 2 |
|
|
varargout(1) = ALPHA; |
|
|
varargout(2) = Tlon; |
|
|
case 3 |
|
|
varargout(1) = ALPHA; |
|
|
varargout(2) = Tlon; |
|
|
varargout(3) = Tlat; |
|
|
case 4 |
|
|
varargout(1) = ALPHA; |
|
|
varargout(2) = Tlon; |
|
|
varargout(3) = Tlat; |
|
|
varargout(4) = Tdpt; |
|
143 |
end |
end |