Open Cdf File

Posted on  by 

This example shows how to use low-level functions to read data from a CDF file. The MATLAB® low-level CDF functions correspond to routines in the CDF C API library. To use the MATLAB CDF low-level functions effectively, you must be familiar with the CDF C interface.

I want to use the IStream, IStorage interface but cannot because I read a file as a stream. StgOpenStorage function can open a file only using File Path, cannot read it as stream. View MATLAB Command. Open the sample NetCDF file, example.nc with read-only access, read a variable, and then close the file. The netcdf.open function returns a file identifier. Ncid = netcdf.open ( 'example.nc') ncid = 65536. Read the data associated with the variable, avagadrosnumber, in the example file, using the netcdf.getVar function. How to Open CDF file To see if you have an application which supports CDF file format you need to double click on the file. This will either open it with matching application or Windows operating system will suggest you to look for an application for file extension CDF either on web or on local computer. CDF files can be opened using the Wolfram CDF Player, which is a standalone application and a Web browser plug-in provided freely by Wolfram Research. The player supports Mac, Windows, Linux, and mobile platforms. Open over 400 file formats with File Viewer Plus.

Open CDF File

Open the sample CDF File, example.cdf.

Get Information About File Contents

Use cdflib.inquire to get information about the number of variables in the file, the number of global attributes, and the number of attributes with variable scope.

Get Information About Variables

Use cdflib.inqurieVar to get information about the individual variables in the file. Variable ID numbers start at zero.

Read Variable Data Into Workspace

Read the data in a variable into the MATLAB workspace. The first variable contains CDF Epoch time values. The low-level interface returns these as double values.

Convert the time value to a date vector.

Read Global Attribute From File

Determine which attributes in the CDF file are global.

Open Cdf File

Read the value of the attribute. You must use the cdflib.getAttrgEntry function for global attributes.

Close CDF File

Open Cdf File

Use cdflib.close to close the CDF file.

See Also

cdflib | cdfread

Open cdf file mac os xOpen Cdf File

How To Open Cdf File Windows 10

External Websites

Coments are closed