xianwang
xianwang

Reputation: 1

how to transfer netcdf to binary IN PYTHON

I want to know how to translate a netcdf file to a binary file IN PYTHON. I have some timeseries data in a netcdf file. I want to change it to a binary file so that I can run TIMESAT to extract phenological metrics.

Has someone already solved this problem? Or can I use Arcmap to build models to do this process?

Upvotes: 0

Views: 1923

Answers (2)

Charlie Zender
Charlie Zender

Reputation: 6352

NCO converts netCDF to binary as illustrated here, e.g.,

ncks -C -O -v one_dmn_rec_var -b bnr.dat -p ~/nco/data in.nc out.nc

Upvotes: 2

Rich Signell
Rich Signell

Reputation: 16375

You can just use gdal_translate to convert from netcdf to binary. See: http://web.nateko.lu.se/timesat/timesat.asp?cat=5 and http://www.gdal.org/gdal_translate.html

My favorite way to install gdal is with conda. Download anaconda or miniconda and for free from https://www.anaconda.com/ and then do:

conda install -c conda-forge gdal

Upvotes: 1

Related Questions