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

Diff of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/ncputvar.m

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

revision 1.1 by gforget, Fri Nov 5 21:41:02 2010 UTC revision 1.2 by roquet, Mon Apr 11 20:48:54 2011 UTC
# Line 2  function []=ncputvar(nc,VARname,VARvalue Line 2  function []=ncputvar(nc,VARname,VARvalue
2    
3  global useNativeMatlabNetcdf; if isempty(useNativeMatlabNetcdf); useNativeMatlabNetcdf = ~isempty(which('netcdf.open')); end;  global useNativeMatlabNetcdf; if isempty(useNativeMatlabNetcdf); useNativeMatlabNetcdf = ~isempty(which('netcdf.open')); end;
4    
5  if (useNativeMatlabNetcdf);  if useNativeMatlabNetcdf
6            
7      %get variable id:      %get variable id:
8      vv = netcdf.inqVarID(nc,VARname);      vv = netcdf.inqVarID(nc,VARname);
# Line 26  if (useNativeMatlabNetcdf); Line 26  if (useNativeMatlabNetcdf);
26            
27            
28  else;%try to use old mex stuff  else;%try to use old mex stuff
29      if nargin>3;      
30      nc{VARname}(varargin{:})=VARvalue;      if nargin>3;
31            nc{VARname}(varargin{:})=VARvalue;
32      else;      else;
33      nc{VARname}(:)=VARvalue;          nc{VARname}(:)=VARvalue;
34      end;      end;
35        
36  end;  end;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22