/[MITgcm]/MITgcm_contrib/gmaze_pv/subfct/coordfromnc.m
ViewVC logotype

Annotation of /MITgcm_contrib/gmaze_pv/subfct/coordfromnc.m

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


Revision 1.2 - (hide annotations) (download)
Fri Oct 6 18:54:48 2006 UTC (18 years, 9 months ago) by gmaze
Branch: MAIN
Changes since 1.1: +18 -5 lines
update

1 gmaze 1.1 %
2     % [X,Y,Z] = COORDFROMNC(NC)
3     %
4     % Given a netcdf file, return 3D coordinates values
5     % in X, Y and Z
6     %
7    
8    
9 gmaze 1.2 function varargout = coordfromnc(nc)
10 gmaze 1.1
11 gmaze 1.2 co = coord(nc);
12 gmaze 1.1
13    
14 gmaze 1.2 switch nargout
15     case 1
16     varargout(1) = {co{1}(:)};
17     case 2
18     varargout(1) = {co{1}(:)};
19     varargout(2) = {co{2}(:)};
20     case 3
21     varargout(1) = {co{1}(:)};
22     varargout(2) = {co{2}(:)};
23     varargout(3) = {co{3}(:)};
24     case 4
25     varargout(1) = {co{1}(:)};
26     varargout(2) = {co{2}(:)};
27     varargout(3) = {co{3}(:)};
28     varargout(4) = {co{4}(:)};
29     end

  ViewVC Help
Powered by ViewVC 1.1.22