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

Contents of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/ncatts.m

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


Revision 1.3 - (show annotations) (download)
Sun Jan 24 17:07:09 2016 UTC (9 years, 5 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
- these routines were moved to gcmfaces/gcmfaces_IO

1 function [atts]=ncatts(ncid,varid);
2 %input: ncid is a netcdf file id
3 % varid is a netcdf variable id
4 %output: atts is the list of its attributes name (in cell)
5
6 [varname,xtype,dimids,natts] = netcdf.inqVar(ncid,varid);
7
8 for ii=1:natts;
9 aa=netcdf.inqAttName(ncid,varid,ii-1);
10 if ii==1; atts={aa}; else; atts=[atts aa]; end;
11 end;
12
13 if natts==0; atts=[]; end;

  ViewVC Help
Powered by ViewVC 1.1.22