/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_IO/nccreateFile.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_IO/nccreateFile.m

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


Revision 1.2 - (hide annotations) (download)
Thu Feb 23 18:18:52 2017 UTC (8 years, 4 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66f, checkpoint66e, HEAD
Changes since 1.1: +1 -1 lines
- update function name to nccreateFile.m

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

  ViewVC Help
Powered by ViewVC 1.1.22