writing fortran equivalent binary file using python
oscar.j.benjamin at gmail.com
Thu Nov 14 15:18:56 CET 2013
On 14 November 2013 00:53, Sudheer Joseph <sjo.india at gmail.com> wrote:
> My trial code with Python (data is read from file here)
> from netCDF4 import Dataset as nc
> import numpy as np
> TITLE="NCMRWF 6HOURLY FORCING MKS"
> for i in np.arange(0,NREC):
> But the issue is that f.write do not allow multiple values( it allows one by one so throws an error with above code ) on same write statement like in the fortran code. experts may please advice if there a solution for this?
Can you just call write twice? e.g.:
More information about the Python-list