/[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.3 by roquet, Wed Apr 13 20:49:14 2011 UTC revision 1.4 by roquet, Thu Apr 14 23:35:42 2011 UTC
# Line 25  if useNativeMatlabNetcdf Line 25  if useNativeMatlabNetcdf
25          %write to file:          %write to file:
26          netcdf.putVar(nc,vv,VARvalue);          netcdf.putVar(nc,vv,VARvalue);
27      end;      end;
28        
29            
30  else;%try to use old mex stuff  else;%try to use old mex stuff
31            
32      if nargin>3;      if nargin==4;
33          nc{VARname}(varargin{:})=VARvalue;          eval(['nc{''' VARname '''}([' num2str(varargin{1}) '])=VARvalue;']);
34        elseif nargin==5,
35            eval(['nc{''' VARname '''}([' num2str(varargin{1}) '],[' num2str(varargin{2}) '])=VARvalue;']);
36      else;      else;
37          nc{VARname}(:)=VARvalue;          eval(['nc{''' VARname '''}(:)=VARvalue;']);
38      end;      end;
39            
40  end;  end;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22