; ; this program reads in the Netcdf data and store all data into one ; structure with their original names ; Chuntao Liu ; 9/2003 pro read_ncdf, filein, fdata ; ; idl> read_ncdf,'filename.nc',f ; f is a structure containing all the parameters in the netcdf file ; fid=ncdf_open(filein) fstr=ncdf_inquire(fid) fdata={fdata,filename: filein} for k=0,fstr.nvars-1 do begin id_str=ncdf_varinq(fid,k) var_name=id_str.name vid=ncdf_varid(fid,var_name) ncdf_varget,fid,vid,data fdata=create_struct(fdata,var_name,data) endfor ncdf_close,fid end