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

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

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


Revision 1.1 - (hide annotations) (download)
Mon Apr 11 20:48:54 2011 UTC (14 years, 3 months ago) by roquet
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65p, checkpoint65q
interface for old/new Matlab netcdf toolbox

1 roquet 1.1 function ncdefDim(ncid,dimname,dimlen);
2     % add a dimension in a netcdf file.
3    
4     global useNativeMatlabNetcdf;
5     if isempty(useNativeMatlabNetcdf); useNativeMatlabNetcdf = ~isempty(which('netcdf.open')); end;
6    
7     if useNativeMatlabNetcdf;
8     netcdf.defDim(ncid,dimname,dimlen);
9     else;%try to use old mex stuff
10     eval(sprintf('ncid(''%s'')=%d;',dimname,dimlen));
11     end;
12    
13    
14    

  ViewVC Help
Powered by ViewVC 1.1.22