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

Diff of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/ncatts.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 gforget, Fri Jan 7 02:52:58 2011 UTC
# Line 1  Line 1 
1  function [atts]=ncvatts(ncid,varid);  function [atts]=ncatts(ncid,varid);
2  %input:     ncid is a netcdf file id  %input:     ncid is a netcdf file id
3  %           varid is a netcdf variable id  %           varid is a netcdf variable id
4  %output:    atts is the list of its attributes name (in cell)  %output:    atts is the list of its attributes name (in cell)
# Line 9  for ii=1:natts; Line 9  for ii=1:natts;
9      aa=netcdf.inqAttName(ncid,varid,ii-1);      aa=netcdf.inqAttName(ncid,varid,ii-1);
10      if ii==1; atts={aa}; else; atts=[atts aa]; end;      if ii==1; atts={aa}; else; atts=[atts aa]; end;
11  end;  end;
12    
13    if natts==0; atts=[]; end;

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

  ViewVC Help
Powered by ViewVC 1.1.22