breezeintopl
breezeintopl

Reputation: 221

how to read netcdf4 data if I only have netcdf3 tool?

So, how should I do?

Upvotes: 1

Views: 839

Answers (1)

shoyer
shoyer

Reputation: 9603

With xarray you can control the version of files saved by specifying format='NETCDF3_CLASSIC' when calling to_netcdf. So a simple solution might be to use xarray, e.g.,

ds = xarray.open_dataset(path)
ds.to_netcdf(dest, format='NETCDF3_CLASSIC')

Upvotes: 4

Related Questions