; IDL-OPENDAP interface. ; Copyright (c) 2006 OPeNDAP, Inc. ; Author: Patrick West UCAR/HAO ; ; Based on IDL-DODS Written by Daniel J. Carr - Research Systems, Inc. ; ; This is free software; you can redistribute it and/or ; modify it under the terms of the GNU Lesser General Public ; License as published by the Free Software Foundation; either ; version 2.1 of the License, or (at your option) any later version. ; ; This library is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ; Lesser General Public License for more details. ; ; You should have received a copy of the GNU Lesser General Public ; License along with this library; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; ; You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112. FUNCTION opendap_handle_attributes, opendap_data, node, debug ;{ stat = 1ul OPENDAP_GET_ATTRIBUTE_TABLE, node, attr_table, num_attrs IF( debug GT 0ul ) THEN BEGIN ;{ PRINT,'num_attrs = ',num_attrs ENDIF ;} IF( attr_table NE 0ul ) THEN BEGIN ;{ OPENDAP_GET_ATTRIBUTE, attr_table, 0ul, attr OPENDAP_HANDLE_ATTRIBUTE, opendap_attr, attr_name, attr IF( debug GT 0ul ) THEN BEGIN ;{ PRINT,'attr[0]: name = ',attr_name,' value: ',opendap_attr ENDIF ;} opendap_data = CREATE_STRUCT( attr_name, opendap_attr ) FOR i_num_attrs = 1ul, num_attrs-1 DO BEGIN ;{ OPENDAP_GET_ATTRIBUTE, attr_table, i_num_attrs, attr OPENDAP_HANDLE_ATTRIBUTE, opendap_attr, attr_name, attr IF( debug GT 0ul ) THEN BEGIN ;{ PRINT,'attr[',i_num_attrs,']: name = ',attr_name,' value: ',opendap_attr ENDIF ;} opendap_data = CREATE_STRUCT( opendap_data, attr_name, opendap_attr) ENDFOR ;} ENDIF ;} RETURN, stat ;} END