netCDF error in manipulating GRD files

Hello, I am struggling on erratic behavior of grdmath, which is likely an issue of netCDF.

I have installed GMT5 via Macports and using
gmt5 @5.4.5_3+gdal+nonfree+pcre
and
netcdf @4.7.4_0+cdf5+dap+netcdf4

When I excuse grdmath to manipulate grd files like
% gmt grdmath a.grd b.grd SUM = c.grd
then I saw a strange error message as
NetCDF: Attempting netcdf-4 operation on netcdf-3 file
This is my first time to see this message with GMT in last 20 or so years, and I suspect it does have something to do with recent upgrading of netCDF.

If you could inform me how to get out of this problem. I would be much appreciated.

Thanks in advance ,
Yosuke

THis is a new behavior in the netcdf library that we of course cannot do anything about in old GMT version. So combination of ancient GMT 5 and brand new netcdf is a problem. Either get a netcdf version from before April (I think).

Thank you for your quick response. So do you think that moving onto GMT6 (keeping the same new netCDF) will solve the problem?

No. GMT 6.0.0 was released last November while the netcdf update happened in April. We have fixed this on our end in GMT 6.1 repository so those who build from github already have the fix. We are working on a 6.1 release to come out before the end of June.

1 Like

Thank you for useful info!