Error: Undefined function 'netcdf' for input arguments of type 'char'

Hi, I am struggling to load netCDF files w. R2014b & FiatFlux ratio, on a Mac El Capitan 10.11.5 I downloaded latest versions of mexnc and snctools, placed them in the path. Included tests on both come up positive. But, when trying to load a CDF file I receive the error: Undefined function 'netcdf' for input arguments of type 'char'

4 件のコメント

José-Luis
José-Luis 2016 年 7 月 7 日
編集済み: José-Luis 2016 年 7 月 7 日
Without looking at your code, this is an exercise in guessing.
I don't really follow the issue. You can directly handle netCDF files from Matlab.
Patrik Jones
Patrik Jones 2016 年 7 月 7 日
Many thanks Jose-Luis (or Walter),
Much appreciated that you take the time to respond. I am not a computational scientist (wet lab rather), so its a challenge for me to follow. I followed these instructions: http://mexcdf.sourceforge.net/downloads/13a.php
The FiatFlux system is not openly available though without some agreement with the authors: http://www.imsb.ethz.ch/research/zamboni/resources/fiatflux.html
And, yes, I had read that Matlab can directly handle netCDF files so its all a mystery to me...
Best regards, Patrik
José-Luis
José-Luis 2016 年 7 月 7 日
It is really nice when people take the time to type a simple thank you.
I don't know the particulars of your specific setup, but if you have a newish Matlab version, I'd recommend using the native Matlab capabilities and not that external library unless you have a compelling reason to do so (e.g. functionality that is difficult to disentangle).
I am not familiar at all with FiatFlux so I'm afraid I can't say much about that.
If you run into specific Matlab issues while solving your problem, please do ask questions here.
Walter Roberson
Walter Roberson 2016 年 7 月 7 日
The description is marked as requiring MATLAB 6.0 or later, which is early enough that there was no built-in NetCDF support. Ideally the code "should" be updated to a newer version. (But as usual with the many many many projects available: who is going to pay for that kind of upgrade effort?)
I do not see a download link for FiatFlux... or information about how to obtain it.
Did you have a look at http://openflux.sourceforge.net/ ? Or 13cflux or 13cflux2 ? https://www.13cflux.net/13cflux2/

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 7 月 7 日

0 投票

From R2011a onwards you do not need any external libraries for NetCDF. Use ncinfo() and ncread()

質問済み:

2016 年 7 月 7 日

コメント済み:

2016 年 7 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by