/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/ncopen.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/ncopen.m

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


Revision 1.2 - (hide annotations) (download)
Wed Apr 13 22:56:19 2011 UTC (14 years, 3 months ago) by roquet
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65p, checkpoint65q
Changes since 1.1: +5 -1 lines
fix bugs relative to old netcdf toolbox

1 roquet 1.1 function [nc] = ncopen(theNetCDFFile, varargin);
2     % open a netcdf file.
3     % mode: 'write','nowrite'
4    
5     global useNativeMatlabNetcdf;
6     if isempty(useNativeMatlabNetcdf); useNativeMatlabNetcdf = ~isempty(which('netcdf.open')); end;
7    
8     mode=0;
9     if nargin>1,
10     mode=varargin{1};
11     end
12    
13     if useNativeMatlabNetcdf;
14     nc=netcdf.open(theNetCDFFile,mode);
15     else;%try to use old mex stuff
16 roquet 1.2 if mode==0,
17     nc=netcdf(theNetCDFFile);
18     else
19     nc=netcdf(theNetCDFFile,mode);
20     end
21 roquet 1.1 end;
22    
23    
24    

  ViewVC Help
Powered by ViewVC 1.1.22